function wpcf7_jetpack_admin_notices() { global $wpdb; if (!class_exists('Jetpack') || !Jetpack::is_module('contact-form') || !in_array('contact-form', Jetpack::get_active_modules())) { return; } $q = "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_old_cf7_unit_id'"; if (!$wpdb->get_var($q)) { return; } $desc_link = wpcf7_link(__('http://contactform7.com/jetpack-overrides-contact-forms/', 'contact-form-7'), __('Jetpack Overrides Contact Forms', 'contact-form-7')); ?> <div class="notice notice-warning"> <p><?php echo sprintf(esc_html(__('Jetpack may cause problems for other plugins in certain cases. For more details, see %s.', 'contact-form-7')), $desc_link); ?> </p> </div> <?php }
function wpcf7_welcome_panel() { global $plugin_page; if ('wpcf7' != $plugin_page || !empty($_GET['post'])) { return; } $classes = 'welcome-panel'; $vers = (array) get_user_meta(get_current_user_id(), 'wpcf7_hide_welcome_panel_on', true); if (wpcf7_version_grep(wpcf7_version('only_major=1'), $vers)) { $classes .= ' hidden'; } ?> <div id="welcome-panel" class="<?php echo esc_attr($classes); ?> "> <?php wp_nonce_field('wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false); ?> <a class="welcome-panel-close" href="<?php echo esc_url(menu_page_url('wpcf7', false)); ?> "><?php echo esc_html(__('Dismiss', 'contact-form-7')); ?> </a> <div class="welcome-panel-content"> <div class="welcome-panel-column-container"> <div class="welcome-panel-column"> <h4><?php echo esc_html(__('Contact Form 7 Needs Your Support', 'contact-form-7')); ?> </h4> <p class="message"><?php echo esc_html(__("It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider making a donation.", 'contact-form-7')); ?> </p> <p><?php echo wpcf7_link(__('http://contactform7.com/donate/', 'contact-form-7'), __('Donate', 'contact-form-7'), array('class' => 'button button-primary')); ?> </p> </div> <div class="welcome-panel-column"> <h4><?php echo esc_html(__('Get Started', 'contact-form-7')); ?> </h4> <ul> <li><?php echo wpcf7_link(__('http://contactform7.com/getting-started-with-contact-form-7/', 'contact-form-7'), __('Getting Started with Contact Form 7', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/admin-screen/', 'contact-form-7'), __('Admin Screen', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/tag-syntax/', 'contact-form-7'), __('How Tags Work', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/setting-up-mail/', 'contact-form-7'), __('Setting Up Mail', 'contact-form-7')); ?> </li> </ul> </div> <div class="welcome-panel-column"> <h4><?php echo esc_html(__('Did You Know?', 'contact-form-7')); ?> </h4> <ul> <li><?php echo wpcf7_link(__('http://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7'), __('Spam Filtering with Akismet', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7'), __('Save Messages with Flamingo', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/selectable-recipient-with-pipes/', 'contact-form-7'), __('Selectable Recipient with Pipes', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/tracking-form-submissions-with-google-analytics/', 'contact-form-7'), __('Tracking with Google Analytics', 'contact-form-7')); ?> </li> </ul> </div> </div> </div> </div> <?php }
function wpcf7_welcome_panel() { $classes = 'welcome-panel'; $vers = (array) get_user_meta(get_current_user_id(), 'wpcf7_hide_welcome_panel_on', true); if (wpcf7_version_grep(wpcf7_version('only_major=1'), $vers)) { $classes .= ' hidden'; } ?> <div id="welcome-panel" class="<?php echo esc_attr($classes); ?> "> <?php wp_nonce_field('wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false); ?> <a class="welcome-panel-close" href="<?php echo esc_url(menu_page_url('wpcf7', false)); ?> "><?php echo esc_html(__('Dismiss', 'contact-form-7')); ?> </a> <div class="welcome-panel-content"> <div class="welcome-panel-column-container"> <div class="welcome-panel-column"> <h3><span class="dashicons dashicons-shield"></span> <?php echo esc_html(__("Getting spammed? You have protection.", 'contact-form-7')); ?> </h3> <p><?php echo esc_html(__("Spammers target everything; your contact forms aren’t an exception. Before you get spammed, protect your contact forms with the powerful anti-spam features Contact Form 7 provides.", 'contact-form-7')); ?> </p> <p><?php echo sprintf(esc_html(__('Contact Form 7 supports spam-filtering with %1$s. Intelligent %2$s blocks annoying spambots. Plus, using %3$s, you can block messages containing specified keywords or those sent from specified IP addresses.', 'contact-form-7')), wpcf7_link(__('http://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7'), __('Akismet', 'contact-form-7')), wpcf7_link(__('http://contactform7.com/recaptcha/', 'contact-form-7'), __('reCAPTCHA', 'contact-form-7')), wpcf7_link(__('http://contactform7.com/comment-blacklist/', 'contact-form-7'), __('comment blacklist', 'contact-form-7'))); ?> </p> </div> <div class="welcome-panel-column"> <h3><span class="dashicons dashicons-editor-help"></span> <?php echo esc_html(__("Before you cry over spilt mail…", 'contact-form-7')); ?> </h3> <p><?php echo esc_html(__("Contact Form 7 doesn’t store submitted messages anywhere. Therefore, you may lose important messages forever if your mail server has issues or you make a mistake in mail configuration.", 'contact-form-7')); ?> </p> <p><?php echo sprintf(esc_html(__('Install a message storage plugin before this happens to you. %s saves all messages through contact forms into the database. Flamingo is a free WordPress plugin created by the same author as Contact Form 7.', 'contact-form-7')), wpcf7_link(__('http://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7'), __('Flamingo', 'contact-form-7'))); ?> </p> </div> </div> </div> </div> <?php }
function wpcf7_tg_pane_hidden($contact_form, $args = '') { $args = wp_parse_args($args, array()); $description = __("Generate a form tag for a hidden field. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('https://wordpress.org/plugins/contact-form-7-modules/', 'contact-form-7'), __('the plugin page on WordPress.org', 'contact-form-7'), array('target' => '_blank')); ?> <div class="control-box"> <fieldset> <legend><?php printf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('ID attribute', 'contact-form-7')); ?> (<?php echo esc_html(__('optional', 'cf7_modules')); ?> )</label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"> <?php _e('Value', 'cf7_modules'); ?> </th> <td> <input type="text" name="values" class="oneline" /> <div> <input type="checkbox" name="watermark" class="option" /> <?php echo esc_html(__('Use this text as watermark?', 'cf7_modules')); ?> </div> </td> </tr> <tr> <th scope="row"> <?php _e('Dynamic Values', 'cf7_modules'); ?> </th> <td> <span class="howto" style="font-size:1em;"><?php _e('To use dynamic data from the post or page the form is embedded on, you can use the following values:', 'cf7_modules'); ?> </span> <ul> <li><?php _e('<code>post_title</code>: The title of the post/page', 'cf7_modules'); ?> </li> <li><?php _e('<code>post_url</code>: The URL of the post/page', 'cf7_modules'); ?> </li> <li><?php _e('<code>post_category</code>: The categories the post is in, comma-separated', 'cf7_modules'); ?> </li> <li><?php _e('<code>post_date</code>: The date the post/page was created', 'cf7_modules'); ?> </li> <li><?php _e('<code>post_author</code>: The name of the author of the post/page', 'cf7_modules'); ?> </li> </ul> <span class="howto"><?php _e('The following values will be replaced if an user is logged in:', 'cf7_modules'); ?> </span> <ul> <li><?php _e('<code>user_name</code>: User Login', 'cf7_modules'); ?> </li> <li><?php _e('<code>user_id</code>: User ID', 'cf7_modules'); ?> </li> <li><?php _e('<code>user_email</code>: User Email Address', 'cf7_modules'); ?> </li> <li><?php _e('<code>user_display_name</code>: Display Name (Generally the first and last name of the user)', 'cf7_modules'); ?> </li> </ul> </td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="hidden" class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> <br class="clear" /> <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?> "><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?> <input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?> " /></label></p> </div> <?php }
function wpcf7_notice_config_errors() { if (!($contact_form = wpcf7_get_current_contact_form())) { return; } if (!wpcf7_validate_configuration() || !current_user_can('wpcf7_edit_contact_form', $contact_form->id())) { return; } $config_validator = new WPCF7_ConfigValidator($contact_form); if ($count_errors = $config_validator->count_errors()) { $message = sprintf(_n('%s configuration error found', '%s configuration errors found', $count_errors, 'contact-form-7'), number_format_i18n($count_errors)); $link = wpcf7_link(__('http://contactform7.com/configuration-validator-faq/', 'contact-form-7'), __("What's this?", 'contact-form-7'), array('class' => 'external')); echo sprintf('<div class="misc-pub-section warning">%1$s<br />%2$s</div>', $message, $link); } }
function wpcf7_tag_generator_quiz($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = 'quiz'; $description = __("Generate a form-tag for a question-answer pair. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/quiz/', 'contact-form-7'), __('Quiz', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><?php echo esc_html(__('Questions and answers', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Questions and answers', 'contact-form-7')); ?> </legend> <textarea name="values" class="values" id="<?php echo esc_attr($args['content'] . '-values'); ?> "></textarea><br /> <label for="<?php echo esc_attr($args['content'] . '-values'); ?> "><span class="description"><?php echo esc_html(__("One pipe-separated question-answer pair (e.g. The capital of Brazil?|Rio) per line.", 'contact-form-7')); ?> </span></label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="<?php echo $type; ?> " class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> </div> <?php }
function wpcf7_tag_generator_acceptance($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = 'acceptance'; $description = __("Generate a form-tag for an acceptance checkbox. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/acceptance-checkbox/', 'contact-form-7'), __('Acceptance Checkbox', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </legend> <label><input type="checkbox" name="default:on" class="option" /> <?php echo esc_html(__('Make this checkbox checked by default', 'contact-form-7')); ?> </label><br /> <label><input type="checkbox" name="invert" class="option" /> <?php echo esc_html(__('Make this work inversely', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="<?php echo $type; ?> " class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> </div> <?php }
function wpcf7_notice_config_errors() { if (!($contact_form = wpcf7_get_current_contact_form())) { return; } if (!wpcf7_validate_configuration() || !current_user_can('wpcf7_edit_contact_form', $contact_form->id())) { return; } if ($config_errors = $contact_form->get_config_errors()) { $message = sprintf(_n("This contact form has a configuration error.", "This contact form has %s configuration errors.", count($config_errors), 'contact-form-7'), number_format_i18n(count($config_errors))); $link = wpcf7_link(__('http://contactform7.com/configuration-errors/', 'contact-form-7'), __('How to Resolve Configuration Errors', 'contact-form-7')); echo sprintf('<div class="notice notice-warning is-dismissible"><p>%s » %s</p></div>', esc_html($message), $link); } }
/** * Tag generator (GUI at admin) * * @param WPCF7_ContactForm $contact_form wpcf7 form object handler * @param string $args * * @return void */ function wpcf7_tag_generator_authoremail($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = 'authoremail'; $description = __("Generate a form-tag for a iten's email hidden field.", 'contact-form-7'); $desc_link = wpcf7_link('https://indexti.com.br/', 'Item email field'); ?> <div class="control-box"> TODO control-box </div> <div class="insert-box"> TODO insert box </div> <?php }
function wpcf7c_tg_pane_back($contact_form, $args = '') { $args = wp_parse_args($args, array()); $description = __("Generate a form-tag for a back button. For more details, see %s.", 'contact-form-7-add-confirm'); $desc_link = wpcf7_link(__('http://www.eyeta.jp/archives/908', 'contact-form-7-add-confirm'), __('Back Button', 'contact-form-7-add-confirm')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?> "><?php echo esc_html(__('Label', 'contact-form-7')); ?> </label> </th> <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?> "/></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label> </th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> "/></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label> </th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> "/></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="back" class="tag code" readonly="readonly" onfocus="this.select()"/> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> "/> </div> </div> <?php }
function wpcf7_tag_generator_menu($contact_form, $args = '') { $args = wp_parse_args($args, array()); $description = __("Generate a form-tag for a drop-down menu. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/checkboxes-radio-buttons-and-menus/', 'contact-form-7'), __('Checkboxes, Radio Buttons and Menus', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </legend> <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </legend> <textarea name="values" class="values" id="<?php echo esc_attr($args['content'] . '-values'); ?> "></textarea> <label for="<?php echo esc_attr($args['content'] . '-values'); ?> "><span class="description"><?php echo esc_html(__("One option per line.", 'contact-form-7')); ?> </span></label><br /> <label><input type="checkbox" name="multiple" class="option" /> <?php echo esc_html(__('Allow multiple selections', 'contact-form-7')); ?> </label><br /> <label><input type="checkbox" name="include_blank" class="option" /> <?php echo esc_html(__('Insert a blank item as the first option', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="select" class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> <br class="clear" /> <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?> "><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?> <input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?> " /></label></p> </div> <?php }
function wpcf7_editor_panel_additional_settings($post) { $desc_link = wpcf7_link(__('http://contactform7.com/additional-settings/', 'contact-form-7'), __('Additional Settings', 'contact-form-7')); $description = __("You can add customization code snippets here. For details, see %s.", 'contact-form-7'); $description = sprintf(esc_html($description), $desc_link); ?> <h2><?php echo esc_html(__('Additional Settings', 'contact-form-7')); ?> </h2> <fieldset> <legend><?php echo $description; ?> </legend> <textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text"><?php echo esc_textarea($post->prop('additional_settings')); ?> </textarea> </fieldset> <?php }
function wpcf7_editor_panel_additional_settings($post, $args = '') { $desc_link = wpcf7_link(__('http://contactform7.com/additional-settings/', 'contact-form-7'), __('Additional Settings', 'contact-form-7')); $description = __("You can add customization code snippets here. For details, see %s.", 'contact-form-7'); $description = sprintf(esc_html($description), $desc_link); $args = wp_parse_args($args, array('id' => 'wpcf7-mail', 'name' => 'jira_serv')); $id = esc_attr($args['id']); $jira_serv = wp_parse_args($post->prop($args['name']), array('url' => '', 'project' => '', 'issuetype' => '', 'username' => '', 'password' => '')); ?> <h3><?php echo esc_html(__('Additional Settings', 'contact-form-7')); ?> </h3> <fieldset> <legend><?php echo $description; ?> </legend> <textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text"><?php echo esc_textarea($post->prop('additional_settings')); ?> </textarea> <table class="form-table"> <tbody> <tr> <th scope="row"> <label for="wpcf7-jira-url">Jira Server REST URL</label> </th> <td> <input id="wpcf7-jira-url" name="wpcf7-jira-url" class="large-text code" size="70" value="<?php echo $jira_serv['url']; ?> " type="text"> </td> </tr> <tr> <th scope="row"> <label for="wpcf7-jira-project">Jira Project</label> </th> <td> <input id="wpcf7-jira-project" name="wpcf7-jira-project" class="large-text code" size="70" value="<?php echo $jira_serv['project']; ?> " type="text"> </td> </tr> <tr> <th scope="row"> <label for="wpcf7-jira-issuetype">Jira Issue Type</label> </th> <td> <input id="wpcf7-jira-issuetype" name="wpcf7-jira-issuetype" class="large-text code" size="70" value="<?php echo $jira_serv['issuetype']; ?> " type="text"> </td> </tr> <tr> <th scope="row"> <label for="wpcf7-jira-username">Jira Username</label> </th> <td> <input id="wpcf7-jira-username" name="wpcf7-jira-username" class="large-text code" size="70" value="<?php echo $jira_serv['username']; ?> " type="text"> </td> </tr> <tr> <th scope="row"> <label for="wpcf7-jira-password">Jira Password</label> </th> <td> <input id="wpcf7-jira-password" name="wpcf7-jira-password" class="large-text code" size="70" value="<?php echo $jira_serv['password']; ?> " type="text"> </td> </tr> </table> </fieldset> <?php }
public function display($action = '') { ?> <p><?php echo esc_html(__("reCAPTCHA is a free service to protect your website from spam and abuse.", 'contact-form-7')); ?> </p> <?php if ('setup' == $action) { $this->display_setup(); return; } if ($this->is_active()) { $sitekey = $this->get_sitekey(); $secret = $this->get_secret($sitekey); ?> <table class="form-table"> <tbody> <tr> <th scope="row"><?php echo esc_html(__('Site Key', 'contact-form-7')); ?> </th> <td class="code"><?php echo esc_html($sitekey); ?> </td> </tr> <tr> <th scope="row"><?php echo esc_html(__('Secret Key', 'contact-form-7')); ?> </th> <td class="code"><?php echo esc_html(wpcf7_mask_password($secret)); ?> </td> </tr> </tbody> </table> <p><a href="<?php echo esc_url($this->menu_page_url('action=setup')); ?> " class="button"><?php echo esc_html(__("Reset Keys", 'contact-form-7')); ?> </a></p> <?php } else { ?> <p><?php echo esc_html(__("To use reCAPTCHA, you need to install an API key pair.", 'contact-form-7')); ?> </p> <p><a href="<?php echo esc_url($this->menu_page_url('action=setup')); ?> " class="button"><?php echo esc_html(__("Configure Keys", 'contact-form-7')); ?> </a></p> <p><?php echo sprintf(esc_html(__("For more details, see %s.", 'contact-form-7')), wpcf7_link(__('http://contactform7.com/recaptcha/', 'contact-form-7'), __('reCAPTCHA', 'contact-form-7'))); ?> </p> <?php } }
function wpcf7_tag_generator_textarea($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = 'textarea'; $description = __("Generate a form-tag for a multi-line text input field. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/text-fields/', 'contact-form-7'), __('Text Fields', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </legend> <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?> "><?php echo esc_html(__('Default value', 'contact-form-7')); ?> </label></th> <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?> " /><br /> <label><input type="checkbox" name="placeholder" class="option" /> <?php echo esc_html(__('Use this text as the placeholder of the field', 'contact-form-7')); ?> </label></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="<?php echo $type; ?> " class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> <br class="clear" /> <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?> "><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?> <input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?> " /></label></p> </div> <?php }
function wpcf7_tag_generator_captcha($contact_form, $args = '') { $args = wp_parse_args($args, array()); if (!class_exists('ReallySimpleCaptcha')) { ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html(__("To use CAPTCHA, you first need to install and activate %s plugin.", 'contact-form-7')), wpcf7_link('http://wordpress.org/extend/plugins/really-simple-captcha/', 'Really Simple CAPTCHA')); ?> </legend> </fieldset> </div> <?php return; } $description = __("Generate form-tags for a CAPTCHA image and corresponding response input field. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/captcha/', 'contact-form-7'), __('CAPTCHA', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> </tbody> </table> <table class="form-table scope captchac"> <caption><?php echo esc_html(__("Image settings", 'contact-form-7')); ?> </caption> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-captchac-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-captchac-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-captchac-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-captchac-class'); ?> " /></td> </tr> </tbody> </table> <table class="form-table scope captchar"> <caption><?php echo esc_html(__("Input field settings", 'contact-form-7')); ?> </caption> <tbody> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-captchar-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-captchar-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-captchar-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-captchar-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="captcha" class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> </div> <?php }
function wpcf7_tag_generator_file($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = 'file'; $description = __("Generate a form-tag for a file uploading field. For more details, see %s.", 'contact-form-7'); $desc_link = wpcf7_link(__('http://contactform7.com/file-uploading-and-attachment/', 'contact-form-7'), __('File Uploading and Attachment', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </legend> <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-limit'); ?> "><?php echo esc_html(__("File size limit (bytes)", 'contact-form-7')); ?> </label></th> <td><input type="text" name="limit" class="filesize oneline option" id="<?php echo esc_attr($args['content'] . '-limit'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-filetypes'); ?> "><?php echo esc_html(__('Acceptable file types', 'contact-form-7')); ?> </label></th> <td><input type="text" name="filetypes" class="filetype oneline option" id="<?php echo esc_attr($args['content'] . '-filetypes'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="<?php echo $type; ?> " class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> <br class="clear" /> <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?> "><?php echo sprintf(esc_html(__("To attach the file uploaded through this field to mail, you need to insert the corresponding mail-tag (%s) into the File Attachments field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?> <input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?> " /></label></p> </div> <?php }
public function sidebar() { $content = '<p><strong>' . __('For more information:', 'contact-form-7') . '</strong></p>'; $content .= '<p>' . wpcf7_link(__('http://contactform7.com/docs/', 'contact-form-7'), __('Docs', 'contact-form-7')) . '</p>'; $content .= '<p>' . wpcf7_link(__('http://contactform7.com/faq/', 'contact-form-7'), __('FAQ', 'contact-form-7')) . '</p>'; $content .= '<p>' . wpcf7_link(__('http://contactform7.com/support/', 'contact-form-7'), __('Support', 'contact-form-7')) . '</p>'; $this->screen->set_help_sidebar($content); }
<h3><?php echo esc_html(__('Information', 'contact-form-7')); ?> </h3> <div class="inside"> <ul> <li><?php echo wpcf7_link(__('http://contactform7.com/docs/', 'contact-form-7'), __('Docs', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/faq/', 'contact-form-7'), __('FAQ', 'contact-form-7')); ?> </li> <li><?php echo wpcf7_link(__('http://contactform7.com/support/', 'contact-form-7'), __('Support', 'contact-form-7')); ?> </li> </ul> </div> </div><!-- #informationdiv --> </div><!-- #postbox-container-1 --> <div id="postbox-container-2" class="postbox-container"> <div id="contact-form-editor"> <div class="keyboard-interaction"><?php echo sprintf(esc_html(__('%s keys switch panels', 'contact-form-7')), '<span class="dashicons dashicons-leftright"></span>'); ?> </div>
function wpcf7_tag_generator_checkbox($contact_form, $args = '') { $args = wp_parse_args($args, array()); $type = $args['id']; if ('radio' != $type) { $type = 'checkbox'; } if ('checkbox' == $type) { $description = __("Generate a form-tag for a group of checkboxes. For more details, see %s.", 'contact-form-7'); } elseif ('radio' == $type) { $description = __("Generate a form-tag for a group of radio buttons. For more details, see %s.", 'contact-form-7'); } $desc_link = wpcf7_link(__('http://contactform7.com/checkboxes-radio-buttons-and-menus/', 'contact-form-7'), __('Checkboxes, Radio Buttons and Menus', 'contact-form-7')); ?> <div class="control-box"> <fieldset> <legend><?php echo sprintf(esc_html($description), $desc_link); ?> </legend> <table class="form-table"> <tbody> <?php if ('checkbox' == $type) { ?> <tr> <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?> </legend> <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?> </label> </fieldset> </td> </tr> <?php } ?> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?> "><?php echo esc_html(__('Name', 'contact-form-7')); ?> </label></th> <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?> " /></td> </tr> <tr> <th scope="row"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </th> <td> <fieldset> <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'contact-form-7')); ?> </legend> <textarea name="values" class="values" id="<?php echo esc_attr($args['content'] . '-values'); ?> "></textarea> <label for="<?php echo esc_attr($args['content'] . '-values'); ?> "><span class="description"><?php echo esc_html(__("One option per line.", 'contact-form-7')); ?> </span></label><br /> <label><input type="checkbox" name="label_first" class="option" /> <?php echo esc_html(__('Put a label first, a checkbox last', 'contact-form-7')); ?> </label><br /> <label><input type="checkbox" name="use_label_element" class="option" /> <?php echo esc_html(__('Wrap each item with label element', 'contact-form-7')); ?> </label> <?php if ('checkbox' == $type) { ?> <br /><label><input type="checkbox" name="exclusive" class="option" /> <?php echo esc_html(__('Make checkboxes exclusive', 'contact-form-7')); ?> </label> <?php } ?> </fieldset> </td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?> "><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?> " /></td> </tr> <tr> <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?> "><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?> </label></th> <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?> " /></td> </tr> </tbody> </table> </fieldset> </div> <div class="insert-box"> <input type="text" name="<?php echo $type; ?> " class="tag code" readonly="readonly" onfocus="this.select()" /> <div class="submitbox"> <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?> " /> </div> <br class="clear" /> <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?> "><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?> <input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?> " /></label></p> </div> <?php }