/** * Callback for SEO Settings meta box. * * @since 2.0.0 * * @uses \Genesis_Admin::get_field_id() Construct full field id. * @uses \Genesis_Admin::get_field_name() Construct full field name. * @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field. * * @see \Genesis_Admin_Settings::metaboxes() Register meta boxes. */ public function seo_box() { ?> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><label for="<?php $this->field_id('doctitle'); ?> "><b><?php _e('Custom Document Title', 'genesis'); ?> </th> <td> <p><input class="large-text" type="text" name="<?php $this->field_name('doctitle'); ?> " id="<?php $this->field_id('doctitle'); ?> " value="<?php echo esc_attr($this->get_field_value('doctitle')); ?> " /></p> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php $this->field_id('doctitle'); ?> "><b><?php _e('Meta Description', 'genesis'); ?> </th> <td> <p><input class="large-text" type="text" name="<?php $this->field_name('description'); ?> " id="<?php $this->field_id('description'); ?> " value="<?php echo esc_attr($this->get_field_value('description')); ?> " /></p> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php $this->field_id('doctitle'); ?> "><b><?php _e('Meta Keywords', 'genesis'); ?> </th> <td> <p><input class="large-text" type="text" name="<?php $this->field_name('keywords'); ?> " id="<?php $this->field_id('keywords'); ?> " value="<?php echo esc_attr($this->get_field_value('keywords')); ?> " /></p> <p class="description"><?php _e('Comma separated list', 'genesis'); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Robots Meta Tags:', 'genesis'); ?> </th> <td> <p> <label for="<?php $this->field_id('noindex'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex'); ?> " id="<?php $this->field_id('noindex'); ?> " value="1" <?php checked($this->get_field_value('noindex')); ?> /> <?php printf(__('Apply %s to this archive', 'genesis'), genesis_code('noindex')); ?> <a href="http://yoast.com/articles/robots-meta-tags/" target="_blank">[?]</a></label><br /> <label for="<?php $this->field_id('nofollow'); ?> "><input type="checkbox" name="<?php $this->field_name('nofollow'); ?> " id="<?php $this->field_id('nofollow'); ?> " value="1" <?php checked($this->get_field_value('nofollow')); ?> /> <?php printf(__('Apply %s to this archive', 'genesis'), genesis_code('nofollow')); ?> <a href="http://yoast.com/articles/robots-meta-tags/" target="_blank">[?]</a></label><br /> <label for="<?php $this->field_id('noarchive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive'); ?> " id="<?php $this->field_id('noarchive'); ?> " value="1" <?php checked($this->get_field_value('noarchive')); ?> /> <?php printf(__('Apply %s to this archive', 'genesis'), genesis_code('noarchive')); ?> <a href="http://yoast.com/articles/robots-meta-tags/" target="_blank">[?]</a></label> </p> </td> </tr> </tbody> </table> <?php }
/** * Callback for Theme Settings Header / Footer Scripts meta box. * * @since 1.0.0 * * @uses \Genesis_Admin::get_field_id() Construct field ID. * @uses \Genesis_Admin::get_field_name() Construct field name. * @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field. * * @see \Genesis_Admin_Settings::metaboxes() Register meta boxes on the Theme Settings page. */ function scripts_box() { ?> <p> <label for="<?php $this->field_id('header_scripts'); ?> "><?php printf(__('Enter scripts or code you would like output to %s:', 'genesis'), genesis_code('wp_head()')); ?> </label> </p> <textarea name="<?php $this->field_name('header_scripts'); ?> " class="large-text" id="<?php $this->field_id('header_scripts'); ?> " cols="78" rows="8"><?php echo esc_textarea($this->get_field_value('header_scripts')); ?> </textarea> <p><span class="description"><?php printf(__('The %1$s hook executes immediately before the closing %2$s tag in the document source.', 'genesis'), genesis_code('wp_head()'), genesis_code('</head>')); ?> </span></p> <hr class="div" /> <p> <label for="<?php $this->field_id('footer_scripts'); ?> "><?php printf(__('Enter scripts or code you would like output to %s:', 'genesis'), genesis_code('wp_footer()')); ?> </label> </p> <textarea name="<?php $this->field_name('footer_scripts'); ?> " class="large-text" id="<?php $this->field_id('footer_scripts'); ?> " cols="78" rows="8"><?php echo esc_textarea($this->get_field_value('footer_scripts')); ?> </textarea> <p><span class="description"><?php printf(__('The %1$s hook executes immediately before the closing %2$s tag in the document source.', 'genesis'), genesis_code('wp_footer()'), genesis_code('</body>')); ?> </span></p> <?php }
/** * Callback for in-post Scripts meta box. * * @since 2.0.0 * * @uses genesis_get_custom_field() Get custom field value. */ function genesis_inpost_scripts_box() { wp_nonce_field('genesis_inpost_scripts_save', 'genesis_inpost_scripts_nonce'); ?> <p><label for="genesis_scripts" class="screen-reader-text"><strong><?php _e('Page-specific Scripts', 'genesis'); ?> </strong></label></p> <p><textarea class="widefat" rows="4" cols="4" name="genesis_seo[_genesis_scripts]" id="genesis_scripts"><?php echo esc_textarea(genesis_get_custom_field('_genesis_scripts')); ?> </textarea></p> <p><?php printf(__('Suitable for custom tracking, conversion or other page-specific script. Must include %s tags.', 'genesis'), genesis_code('script')); ?> </p> <?php }
/** * Echo title, description, keywords and robots meta SEO fields on the taxonomy term edit form. * * If populated, the values saved in these fields may be used on taxonomy archives. * * @since 1.2.0 * * @see genesis_add-taxonomy_seo_options() Callback caller. * * @param \stdClass $tag Term object. * @param string $taxonomy Name of the taxonomy. */ function genesis_taxonomy_seo_options($tag, $taxonomy) { ?> <h3><?php _e('Theme SEO Settings', 'genesis'); ?> </h3> <table class="form-table"> <tbody> <tr class="form-field"> <th scope="row"><label for="genesis-meta[doctitle]"><?php _e('Custom Document Title', 'genesis'); ?> </label></th> <td> <input name="genesis-meta[doctitle]" id="genesis-meta[doctitle]" type="text" value="<?php echo esc_attr(get_term_meta($tag->term_id, 'doctitle', true)); ?> " size="40" /> </td> </tr> <tr class="form-field"> <th scope="row"><label for="genesis-meta[description]"><?php _e('Meta Description', 'genesis'); ?> </label></th> <td> <textarea name="genesis-meta[description]" id="genesis-meta[description]" rows="5" cols="50" class="large-text"><?php echo esc_html(get_term_meta($tag->term_id, 'description', true)); ?> </textarea> </td> </tr> <tr class="form-field"> <th scope="row"><label for="genesis-meta[keywords]"><?php _e('Meta Keywords', 'genesis'); ?> </label></th> <td> <input name="genesis-meta[keywords]" id="genesis-meta[keywords]" type="text" value="<?php echo esc_attr(get_term_meta($tag->term_id, 'keywords', true)); ?> " size="40" /> <p class="description"><?php _e('Comma separated list', 'genesis'); ?> </p> </td> </tr> <tr> <th scope="row"><?php _e('Robots Meta', 'genesis'); ?> </th> <td> <label for="genesis-meta[noindex]"><input name="genesis-meta[noindex]" id="genesis-meta[noindex]" type="checkbox" value="1" <?php checked(get_term_meta($tag->term_id, 'noindex', true)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('noindex')); ?> </label><br /> <label for="genesis-meta[nofollow]"><input name="genesis-meta[nofollow]" id="genesis-meta[nofollow]" type="checkbox" value="1" <?php checked(get_term_meta($tag->term_id, 'nofollow', true)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('nofollow')); ?> </label><br /> <label for="genesis-meta[noarchive]"><input name="genesis-meta[noarchive]" id="genesis-meta[noarchive]" type="checkbox" value="1" <?php checked(get_term_meta($tag->term_id, 'noarchive', true)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('noarchive')); ?> </label> </td> </tr> </tbody> </table> <?php }
/** * Callback for displaying the Genesis Import / Export admin page. * * Call the genesis_import_export_form action after the last default table row. * * @since 1.4.0 * * @uses \Genesis_Admin_Import_Export::export_checkboxes() Echo export checkboxes. * @uses \Genesis_Admin_Import_Export::get_export_options() Get array of export options. */ public function admin() { ?> <div class="wrap"> <?php screen_icon('tools'); ?> <h2><?php echo esc_html(get_admin_page_title()); ?> </h2> <table class="form-table"> <tbody> <tr> <th scope="row"><b><?php _e('Import Genesis Settings File', 'genesis'); ?> </p></th> <td> <p><?php printf(__('Upload the data file (%s) from your computer and we\'ll import your settings.', 'genesis'), genesis_code('.json')); ?> </p> <p><?php _e('Choose the file from your computer and click "Upload file and Import"', 'genesis'); ?> </p> <p> <form enctype="multipart/form-data" method="post" action="<?php echo menu_page_url('genesis-import-export', 0); ?> "> <?php wp_nonce_field('genesis-import'); ?> <input type="hidden" name="genesis-import" value="1" /> <label for="genesis-import-upload"><?php sprintf(__('Upload File: (Maximum Size: %s)', 'genesis'), ini_get('post_max_size')); ?> </label> <input type="file" id="genesis-import-upload" name="genesis-import-upload" size="25" /> <?php submit_button(__('Upload File and Import', 'genesis'), 'primary', 'upload'); ?> </form> </p> </td> </tr> <tr> <th scope="row"><b><?php _e('Export Genesis Settings File', 'genesis'); ?> </b></th> <td> <p><?php printf(__('When you click the button below, Genesis will generate a data file (%s) for you to save to your computer.', 'genesis'), genesis_code('.json')); ?> </p> <p><?php _e('Once you have saved the download file, you can use the import function on another site to import this data.', 'genesis'); ?> </p> <p> <form method="post" action="<?php echo menu_page_url('genesis-import-export', 0); ?> "> <?php wp_nonce_field('genesis-export'); $this->export_checkboxes(); if ($this->get_export_options()) { submit_button(__('Download Export File', 'genesis'), 'primary', 'download'); } ?> </form> </p> </td> </tr> <?php do_action('genesis_import_export_form'); ?> </tbody> </table> </div> <?php }
/** * Add fields for author archive SEO to the user edit screen. * * Input / Textarea fields are: * * * Custom Document Title * * Meta Description * * Meta Keywords * * Checkbox fields are: * * * Apply noindex to this archive? * * Apply nofollow to this archive? * * Apply noarchive to this archive? * * @since 1.4.0 * * @param \WP_User $user User object. * * @return false Return false if current user can not edit users. */ function genesis_user_seo_fields($user) { if (!current_user_can('edit_users', $user->ID)) { return false; } ?> <h3><?php _e('Theme SEO Settings', 'genesis'); ?> </h3> <p><span class="description"><?php _e('These settings apply to this author\'s archive pages.', 'genesis'); ?> </span></p> <table class="form-table"> <tbody> <tr> <th scope="row" valign="top"><label for="doctitle"><?php _e('Custom Document Title', 'genesis'); ?> </label></th> <td> <input name="meta[doctitle]" id="doctitle" type="text" value="<?php echo esc_attr(get_the_author_meta('doctitle', $user->ID)); ?> " class="regular-text" /> </td> </tr> <tr> <th scope="row" valign="top"><label for="meta-description"><?php _e('Meta Description', 'genesis'); ?> </label></th> <td> <textarea name="meta[meta_description]" id="meta-description" rows="5" cols="30"><?php echo esc_textarea(get_the_author_meta('meta_description', $user->ID)); ?> </textarea> </td> </tr> <tr> <th scope="row" valign="top"><label for="meta-keywords"><?php _e('Meta Keywords', 'genesis'); ?> </label></th> <td> <input name="meta[meta_keywords]" id="meta-keywords" type="text" value="<?php echo esc_attr(get_the_author_meta('meta_keywords', $user->ID)); ?> " class="regular-text" /><br /> <span class="description"><?php _e('Comma separated list', 'genesis'); ?> </span> </td> </tr> <tr> <th scope="row" valign="top"><?php _e('Robots Meta', 'genesis'); ?> </th> <td> <label for="meta[noindex]"><input id="meta[noindex]" name="meta[noindex]" id="noindex" type="checkbox" value="1" <?php checked(get_the_author_meta('noindex', $user->ID)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('noindex')); ?> </label><br /> <label for="meta[nofollow]"><input id="meta[nofollow]" name="meta[nofollow]" id="nofollow" type="checkbox" value="1" <?php checked(get_the_author_meta('nofollow', $user->ID)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('nofollow')); ?> </label><br /> <label for="meta[noarchive]"><input id="meta[noarchive]" name="meta[noarchive]" id="noarchive" type="checkbox" value="1" <?php checked(get_the_author_meta('noarchive', $user->ID)); ?> /> <?php printf(__('Apply %s to this archive?', 'genesis'), genesis_code('noarchive')); ?> </label> </td> </tr> </tbody> </table> <?php }
/** * Callback for SEO Settings Robots meta box. * * Variations of some of the settings contained in this meta box were first added to a 'Search Engine Indexing' meta * box, added in 1.0.0. * * @since 1.3.0 * * @see \Genesis_Admin_SEO_Settings::metaboxes() Register meta boxes on the SEO Settings page. */ function robots_meta_box() { ?> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><?php _e('Indexing', 'genesis'); ?> </th> <td> <p> <label for="<?php $this->field_id('noindex_cat_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_cat_archive'); ?> " id="<?php $this->field_id('noindex_cat_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_cat_archive')); ?> /> <?php printf(__('Apply %s to Category Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_tag_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_tag_archive'); ?> " id="<?php $this->field_id('noindex_tag_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_tag_archive')); ?> /> <?php printf(__('Apply %s to Tag Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_author_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_author_archive'); ?> " id="<?php $this->field_id('noindex_author_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_author_archive')); ?> /> <?php printf(__('Apply %s to Author Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_date_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_date_archive'); ?> " id="<?php $this->field_id('noindex_date_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_date_archive')); ?> /> <?php printf(__('Apply %s to Date Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_search_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_search_archive'); ?> " id="<?php $this->field_id('noindex_search_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_search_archive')); ?> /> <?php printf(__('Apply %s to Search Archives?', 'genesis'), genesis_code('noindex')); ?> </label> </p> </td> </tr> </tbody> </table> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><?php _e('Archiving', 'genesis'); ?> </th> <td> <p> <label for="<?php $this->field_id('noarchive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive'); ?> " id="<?php $this->field_id('noarchive'); ?> " value="1" <?php checked($this->get_field_value('noarchive')); ?> /> <?php printf(__('Apply %s to Entire Site?', 'genesis'), genesis_code('noarchive')); ?> </label> </p> <p> <label for="<?php $this->field_id('noarchive_cat_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_cat_archive'); ?> " id="<?php $this->field_id('noarchive_cat_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_cat_archive')); ?> /> <?php printf(__('Apply %s to Category Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_tag_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_tag_archive'); ?> " id="<?php $this->field_id('noarchive_tag_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_tag_archive')); ?> /> <?php printf(__('Apply %s to Tag Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_author_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_author_archive'); ?> " id="<?php $this->field_id('noarchive_author_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_author_archive')); ?> /> <?php printf(__('Apply %s to Author Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_date_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_date_archive'); ?> " id="<?php $this->field_id('noarchive_date_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_date_archive')); ?> /> <?php printf(__('Apply %s to Date Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_search_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_search_archive'); ?> " id="<?php $this->field_id('noarchive_search_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_search_archive')); ?> /> <?php printf(__('Apply %s to Search Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> </p> </td> </tr> </tbody> </table> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><?php _e('Directories', 'genesis'); ?> </th> <td> <p> <label for="<?php $this->field_id('noodp'); ?> "><input type="checkbox" name="<?php $this->field_name('noodp'); ?> " id="<?php $this->field_id('noodp'); ?> " value="1" <?php checked($this->get_field_value('noodp')); ?> /> <?php printf(__('Apply %s to your site?', 'genesis'), genesis_code('noodp')); ?> </label> <br /> <label for="<?php $this->field_id('noydir'); ?> "><input type="checkbox" name="<?php $this->field_name('noydir'); ?> " id="<?php $this->field_id('noydir'); ?> " value="1" <?php checked($this->get_field_value('noydir')); ?> /> <?php printf(__('Apply %s to your site?', 'genesis'), genesis_code('noydir')); ?> </label> </p> </td> </tr> </tbody> </table> <?php }
/** * Callback for SEO Settings Robots meta box. * * Variations of some of the settings contained in this meta box were first added to a 'Search Engine Indexing' meta * box, added in 1.0.0. * * @since 1.3.0 * * @uses \Genesis_Admin::get_field_id() Construct field ID. * @uses \Genesis_Admin::get_field_name() Construct field name. * @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field. * * @see \Genesis_Admin_SEO_Settings::metaboxes() Register meta boxes on the SEO Settings page. */ function robots_meta_box() { ?> <p><span class="description"><?php _e('Depending on your situation, you may or may not want the following archive pages to be indexed by search engines. Only you can make that determination.', 'genesis'); ?> </span></p> <p> <label for="<?php $this->field_id('noindex_cat_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_cat_archive'); ?> " id="<?php $this->field_id('noindex_cat_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_cat_archive')); ?> /> <?php printf(__('Apply %s to Category Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_tag_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_tag_archive'); ?> " id="<?php $this->field_id('noindex_tag_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_tag_archive')); ?> /> <?php printf(__('Apply %s to Tag Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_author_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_author_archive'); ?> " id="<?php $this->field_id('noindex_author_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_author_archive')); ?> /> <?php printf(__('Apply %s to Author Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_date_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_date_archive'); ?> " id="<?php $this->field_id('noindex_date_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_date_archive')); ?> /> <?php printf(__('Apply %s to Date Archives?', 'genesis'), genesis_code('noindex')); ?> </label> <br /> <label for="<?php $this->field_id('noindex_search_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noindex_search_archive'); ?> " id="<?php $this->field_id('noindex_search_archive'); ?> " value="1" <?php checked($this->get_field_value('noindex_search_archive')); ?> /> <?php printf(__('Apply %s to Search Archives?', 'genesis'), genesis_code('noindex')); ?> </label> </p> <p><span class="description"><?php printf(__('Some search engines will cache pages in your site (e.g. Google Cache). The %1$s tag will prevent them from doing so. Choose which archives you want %1$s applied to.', 'genesis'), genesis_code('noarchive')); ?> </span></p> <p> <label for="<?php $this->field_id('noarchive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive'); ?> " id="<?php $this->field_id('noarchive'); ?> " value="1" <?php checked($this->get_field_value('noarchive')); ?> /> <?php printf(__('Apply %s to Entire Site?', 'genesis'), genesis_code('noarchive')); ?> </label> </p> <p> <label for="<?php $this->field_id('noarchive_cat_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_cat_archive'); ?> " id="<?php $this->field_id('noarchive_cat_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_cat_archive')); ?> /> <?php printf(__('Apply %s to Category Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_tag_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_tag_archive'); ?> " id="<?php $this->field_id('noarchive_tag_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_tag_archive')); ?> /> <?php printf(__('Apply %s to Tag Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_author_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_author_archive'); ?> " id="<?php $this->field_id('noarchive_author_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_author_archive')); ?> /> <?php printf(__('Apply %s to Author Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_date_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_date_archive'); ?> " id="<?php $this->field_id('noarchive_date_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_date_archive')); ?> /> <?php printf(__('Apply %s to Date Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> <br /> <label for="<?php $this->field_id('noarchive_search_archive'); ?> "><input type="checkbox" name="<?php $this->field_name('noarchive_search_archive'); ?> " id="<?php $this->field_id('noarchive_search_archive'); ?> " value="1" <?php checked($this->get_field_value('noarchive_search_archive')); ?> /> <?php printf(__('Apply %s to Search Archives?', 'genesis'), genesis_code('noarchive')); ?> </label> </p> <p><span class="description"><?php printf(__('Occasionally, search engines use resources like the Open Directory Project and the Yahoo! Directory to find titles and descriptions for your content. Generally, you will not want them to do this. The %s and %s tags prevent them from doing so.', 'genesis'), genesis_code('noodp'), genesis_code('noydir')); ?> </span></p> <p> <label for="<?php $this->field_id('noodp'); ?> "><input type="checkbox" name="<?php $this->field_name('noodp'); ?> " id="<?php $this->field_id('noodp'); ?> " value="1" <?php checked($this->get_field_value('noodp')); ?> /> <?php printf(__('Apply %s to your site?', 'genesis'), genesis_code('nooodp')); ?> </label> <br /> <label for="<?php $this->field_id('noydir'); ?> "><input type="checkbox" name="<?php $this->field_name('noydir'); ?> " id="<?php $this->field_id('noydir'); ?> " value="1" <?php checked($this->get_field_value('noydir')); ?> /> <?php printf(__('Apply %s to your site?', 'genesis'), genesis_code('noydir')); ?> </label> </p> <?php }
/** * Callback for in-post Scripts meta box. * * @since 2.0.0 */ function genesis_inpost_scripts_box() { wp_nonce_field('genesis_inpost_scripts_save', 'genesis_inpost_scripts_nonce'); ?> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><label for="genesis_scripts"><strong><?php _e('Page-specific Scripts', 'genesis'); ?> </strong></label></th> <td> <p><textarea class="widefat" rows="4" name="genesis_seo[_genesis_scripts]" id="genesis_scripts"><?php echo esc_textarea(genesis_get_custom_field('_genesis_scripts')); ?> </textarea></p> <p><?php printf(__('Suitable for custom tracking, conversion or other page-specific script. Must include %s tags.', 'genesis'), genesis_code('script')); ?> </p> </td> </tr> </tbody> </table> <?php }
<p> <label for="<?php echo GENESIS_SETTINGS_FIELD . '[wpdc_body_scripts]'; ?> "><?php printf(__('Enter scripts or code you would like output just after the %s tag:', 'wpdc'), genesis_code('<body>')); ?> </label> </p> <textarea name="<?php echo GENESIS_SETTINGS_FIELD . '[wpdc_body_scripts]'; ?> " class="large-text" id="wpdc_body_scripts" cols="78" rows="8"><?php echo esc_textarea(genesis_get_option('wpdc_body_scripts')); ?> </textarea>
/** * Callback for Theme Settings Header / Footer Scripts meta box. * * @since 1.0.0 * * @see \Genesis_Admin_Settings::metaboxes() Register meta boxes on the Theme Settings page. */ function scripts_box() { ?> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><label for="<?php $this->field_id('header_scripts'); ?> "><?php _e('Header Scripts', 'genesis'); ?> </label></th> <td> <p><textarea name="<?php $this->field_name('header_scripts'); ?> " class="large-text" id="<?php $this->field_id('header_scripts'); ?> " cols="78" rows="8"><?php echo esc_textarea($this->get_field_value('header_scripts')); ?> </textarea></p> <p><span class="description"><?php printf(__('This code will output immediately before the closing %s tag in the document source.', 'genesis'), genesis_code('</head>')); ?> </span></p> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php $this->field_id('footer_scripts'); ?> "><?php _e('Footer Scripts', 'genesis'); ?> </label></th> <td> <p><textarea name="<?php $this->field_name('footer_scripts'); ?> " class="large-text" id="<?php $this->field_id('footer_scripts'); ?> " cols="78" rows="8"><?php echo esc_textarea($this->get_field_value('footer_scripts')); ?> </textarea></p> <p><span class="description"><?php printf(__('This code will output immediately before the closing %s tag in the document source.', 'genesis'), genesis_code('</body>')); ?> </span></p> </td> </tr> </tbody> </table> <?php }
/** Generate the output for the metabox **/ function gfb_customizer_box() { ?> <div class="gfb-outer"> <div class="gfb-inner gfb-brand"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Brand Name', 'genesis-footer-builder'); ?> </h4> <p><span class="gfb-desc"><?php _e('Enter brand name that will show up in footer credits. Site title is used by default.', 'genesis-footer-builder'); ?> </span></p> </td> </tr> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_brand'); ?> "><?php _e('Brand Name: ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><input type="text" name="<?php $this->field_name('gfb_brand'); ?> " id="<?php $this->field_id('gfb_brand'); ?> " value="<?php echo esc_attr($this->get_field_value('gfb_brand')); ?> " /></p> </td> </tr> </table> </div> <div class="gfb-inner gfb-duration"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Copyright Duration ', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php _e('Please select a custom year for copyright notice. Current year is used by default. You can also specify the from - to years by checking the from - to box below. Years valid from 19** to 20**.', 'genesis-footer-builder'); ?> </p> </td> </tr> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_current_date'); ?> "><?php _e('Use current year?', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><input type="checkbox" name="<?php $this->field_name('gfb_current_date'); ?> " id="<?php $this->field_id('gfb_current_date'); ?> " value="1"<?php checked($this->get_field_value('gfb_current_date')); ?> /></p> </td> </tr> </table> <div id="gfb-custom-date"> <div id="gfb-date-format-unset"> <table class="gfb-layout"> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_date'); ?> "><?php _e('Enter the year: ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><input type="number" name="<?php $this->field_name('gfb_date'); ?> " id="<?php $this->field_id('gfb_date'); ?> " maxlength="4" size="4" value="<?php echo esc_attr($this->get_field_value('gfb_date')); ?> " /></p> </td> </tr> </table> </div> <div id="gfb-date-format-set"> <table class="gfb-layout"> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_date'); ?> "><?php _e('Enter the year(s): ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><input type="number" name="<?php $this->field_name('gfb_date_start'); ?> " id="<?php $this->field_id('gfb_date_start'); ?> " value="<?php echo esc_attr($this->get_field_value('gfb_date_start')); ?> " /> — <input type="number" name="<?php $this->field_name('gfb_date_end'); ?> " id="<?php $this->field_id('gfb_date_end'); ?> " value="<?php echo esc_attr($this->get_field_value('gfb_date_end')); ?> " /></p> </td> </tr> </table> </div> <table class="gfb-layout"> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_date_format'); ?> "><?php printf(__('Use %sfrom - to%s format? ', 'genesis-footer-builder'), '<em>', '</em>'); ?> </label></p> </td> <td> <p><input type="checkbox" name="<?php $this->field_name('gfb_date_format'); ?> " id="<?php $this->field_id('gfb_date_format'); ?> " value="1"<?php checked($this->get_field_value('gfb_date_format')); ?> /></p> </td> </tr> </table> </div> </div> <div class="gfb-inner gfb-privacy"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Privacy Policy Page', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php _e('Select a page below to be used as the Privacy Policy page in the footer information.', 'genesis-footer-builder'); ?> </p> </td> </tr> <tr> <?php $invalid_pg = get_pages(array('post_status' => 'trash, draft, pending')); ?> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_privacy'); ?> "><?php _e('Select a page: ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><?php wp_dropdown_pages(array('selected' => $this->get_field_value('gfb_privacy'), 'name' => $this->get_field_name('gfb_privacy'), 'exclude' => $invalid_pg, 'show_option_none' => sprintf(__('%1$s Select %1$s', 'genesis-footer-builder'), '—'))); ?> </p> </td> </tr> </table> </div> <div class="gfb-inner gfb-disclaimer"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Disclaimer Page', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php _e('Select a page below to be used as the Disclaimer page in the footer information.', 'genesis-footer-builder'); ?> </p> </td> </tr> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_disclaimer'); ?> "><?php _e('Select a page: ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><?php wp_dropdown_pages(array('selected' => $this->get_field_value('gfb_disclaimer'), 'name' => $this->get_field_name('gfb_disclaimer'), 'exclude' => $invalid_pg, 'show_option_none' => __('— Select —', 'genesis-footer-builder'))); ?> </p> </td> </tr> </table> </div> <div class="gfb-inner gfb-fmenu"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Footer Menu', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php printf(__('With this option enabled, Genesis Footer Builder allows you to set-up a footer menu and output it in the footer. This can come handy if you want to insert some useful links like Home, About Us, Contact Us, Sitemap etc. Enable this option and save the settings. Then you can go to %sMenus page%s, create a new menu or select an existing menu and assign %s location.', 'genesis-footer-builder'), '<a href="' . esc_url(admin_url('nav-menus.php')) . '">', '</a>', genesis_code('Genesis Footer Builder Menu')); ?> </p> <p class="gfb-desc"><?php _e('*Note: Only the first level menu-items will be displayed.', 'genesis-footer-builder'); ?> </p> </td> </tr> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_footer_menu'); ?> "><?php _e('Register and insert Footer Menu? ', 'genesis-footer-builder'); ?> </label></p> </td> <td> <p><input type="checkbox" name="<?php $this->field_name('gfb_footer_menu'); ?> " id="<?php $this->field_id('gfb_footer_menu'); ?> " value="1"<?php checked($this->get_field_value('gfb_footer_menu')); ?> /></p> </td> </tr> </table> </div> <div class="gfb-inner gfb-fmenu"> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Genesis Affiliate Link', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php _e('Use this option to set your own Genesis affiliate link in the footer credits text.', 'genesis-footer-builder'); ?> </p> </td> </tr> <tr> <td class="field-label"> <p><label for="<?php $this->field_id('gfb_affiliate_link'); ?> "><?php _e('Enter the Genesis affiliate link:', 'genesis-footer-builder'); ?> </label></p> </td> <td> <input type="text" name="<?php $this->field_name('gfb_affiliate_link'); ?> " id="<?php $this->field_id('gfb_affiliate_link'); ?> " value="<?php echo esc_attr($this->get_field_value('gfb_affiliate_link')); ?> " /> </td> </tr> </table> </div> <div class="gfb-inner gfb-custom-copy"> <?php $default_copyright = gfb_customized_footer($this->get_field_value('gfb_output')); ?> <table class="gfb-layout"> <tr> <td colspan="3"> <h4><?php _e('Custom Footer Copyrights', 'genesis-footer-builder'); ?> </h4> <p class="gfb-desc"><?php printf(__('You can build your own custom credits text below. This field allows you to use HTML tags, entities, Genesis footer shortcodes or any other shortcodes. Additionally, the plugin provides the following shortcodes to customize the output:%1$sDisplays the value of %7$sBrand Name%8$s option as set above.%2$sDisplays the value of %7$sCopyright Duration%8$s option as set above.%3$sDisplays the selected page as set in %7$sPrivacy Policy page%8$s option above. Text for the link can be customized using the %9$stext%10$s attribute.%4$sDisplays the selected page as set in <em>Disclaimer page</em> option above. Text for the link can be customized using the %9$stext%10$s attribute.%5$sDisplays the Genesis affiliate link as set in the %7$sGenesis Affiliate Link%8$s option above.%6$s', 'genesis-footer-builder'), '</p><dl class="gfb-def-list"><dt>' . genesis_code('[gfb-brand]') . ':</dt><dd>', '</dd><br /><dt>' . genesis_code('[gfb-date]') . ':</dt><dd>', '</dd><br /><dt>' . genesis_code('[gfb-privacy-policy text="Privacy Policy"]') . ':</dt><dd>', '</dd><br /><dt>' . genesis_code('[gfb-disclaimer text="Disclaimer"]') . ':</dt><dd>', '</dd><br /><dt>' . genesis_code('[gfb-affiliate-link]') . ':</dt><dd>', '</dd><br /></dl>', '<em>', '</em>', '<strong>', '</strong>'); ?> </td> </tr> <tr> <td colspan="3"> <p><textarea name="<?php $this->field_name('gfb_output'); ?> " id="<?php $this->field_id('gfb_output'); ?> " rows="3" style="width: 100%;"><?php echo esc_textarea($this->get_field_value('gfb_output')); ?> </textarea></p> </td> </tr> <?php $default_output = gfb_defaults(); $default_output = $default_output['gfb_output']; $footer_output = gfb_customized_footer($this->get_field_value('gfb_output')); if (!gfb_get_option('gfb_output')) { ?> <tr> <td colspan="3"> <div class="gfb-highlight gfb-example"><?php printf(__('%sUsage Example:%s', 'genesis-footer-builder'), '<strong>', '</strong><div class="gfb-example">' . htmlentities($default_output) . '</div>'); ?> </div> </td> </tr> <?php } else { ?> <tr> <td colspan="3"> <div class="gfb-highlight"><?php printf(__('%sPreview:%s', 'genesis-footer-builder'), '<strong>', '</strong><br /> ' . do_shortcode($footer_output)); ?> </div> </td> </tr> <?php } ?> </table> </div> </div> <?php }