array( 'page_title' => __( 'Theme SEO', 'bizznis' ), 'menu_title' => __( 'Theme SEO', 'bizznis' ), 'capability' => 'edit_theme_options', ) ) ); $page_ops = apply_filters( 'bizznis_seo_settings_page_ops', array( 'screen_icon' => 'options-bizznis', 'save_button_text' => __( 'Save Settings', 'bizznis' ), 'reset_button_text' => __( 'Reset Settings', 'bizznis' ), 'saved_notice_text' => __( 'Settings saved.', 'bizznis' ), 'reset_notice_text' => __( 'Settings reset.', 'bizznis' ), 'error_notice_text' => __( 'Error saving settings.', 'bizznis' ), ) ); $settings_field = BIZZNIS_SEO_SETTINGS_FIELD; $default_settings = apply_filters( 'bizznis_seo_settings_defaults', array( 'semantic_headings' => 1, 'publisher_uri' => '', 'append_site_title' => 0, 'doctitle_sep' => '-', 'doctitle_seplocation' => 'right', 'append_description_home' => 1, 'home_h1_on' => 'title', 'home_doctitle' => '', 'home_description' => '', 'home_noindex' => 0, 'home_nofollow' => 0, 'home_noarchive' => 0, 'home_author' => 0, 'canonical_archives' => 1, 'head_adjacent_posts_rel_link' => 0, 'head_wlwmanifest_link' => 0, 'head_shortlink' => 0, 'noindex_cat_archive' => 1, 'noindex_tag_archive' => 1, 'noindex_author_archive' => 1, 'noindex_date_archive' => 1, 'noindex_search_archive' => 1, 'noarchive_cat_archive' => 0, 'noarchive_tag_archive' => 0, 'noarchive_author_archive' => 0, 'noarchive_date_archive' => 0, 'noarchive_search_archive' => 0, 'noarchive' => 0, 'noodp' => 1, 'noydir' => 1, ) ); $this->create( $page_id, $menu_ops, $page_ops, $settings_field, $default_settings ); # Sanitize before saving add_action( 'bizznis_settings_sanitizer_init', array( $this, 'sanitizer_filters' ) ); } /** * Register each of the settings with a sanitization filter type. * * @since 1.0.0 */ public function sanitizer_filters() { bizznis_add_option_filter( 'one_zero', $this->settings_field, array( 'append_description_home', 'append_site_title', 'semantic_headings', 'home_noindex', 'home_nofollow', 'home_noarchive', 'head_index_rel_link', 'head_parent_post_rel_link', 'head_start_post_rel_link', 'head_adjacent_posts_rel_link', 'head_wlwmanifest_link', 'head_shortlink', 'noindex_cat_archive', 'noindex_tag_archive', 'noindex_author_archive', 'noindex_date_archive', 'noindex_search_archive', 'noarchive', 'noarchive_cat_archive', 'noarchive_tag_archive', 'noarchive_author_archive', 'noarchive_date_archive', 'noarchive_search_archive', 'noodp', 'noydir', 'canonical_archives', ) ); bizznis_add_option_filter( 'no_html', $this->settings_field, array( 'home_doctitle', 'home_description', 'doctitle_sep', ) ); } /** * Contextual help content. * * @since 1.0.0 */ public function help() { $screen = get_current_screen(); $seo_settings_help = '
' . __( 'Bizznis SEO (search engine optimization) is polite, and will disable itself when most popular SEO plugins (e.g., All-in-One SEO, WordPress SEO, etc.) are active.' , 'bizznis' ) . '
' . '' . __( 'If you don\'t see an SEO Settings sub menu, then you probably have another SEO plugin active.' , 'bizznis' ) . '
' . '' . __( 'If you see the menu, then opening that menu item will let you set the SEO settings for your site.' , 'bizznis' ) . '
' . '' . __( 'Each page, post, and term will have its own SEO settings as well. The default settings are recommended for most users. If you wish to adjust your SEO settings, the boxes include internal descriptions.' , 'bizznis' ) . '
' . '' . __( 'Below you\'ll find a few succinct notes on the options for each box:' , 'bizznis' ) . '
'; $doctitle_help = '' . __( 'Append Site Description will insert the site description from your Theme Settings after the title on your home page.' , 'bizznis' ) . '
' . '' . __( 'Append Site Name will put the site name from the Theme Settings after the title on inner page.' , 'bizznis' ) . '
' . '' . __( 'Doctitle Append Location determines which side of the title to add the previously mentioned items.' , 'bizznis' ) . '
' . '' . __( 'The Doctitle Separator is the character that will go between the title and appended text.' , 'bizznis' ) . '
'; $dochead_help = '' . __( 'The Relationship Link Tags are tags added by WordPress that currently have no SEO value but slow your site load down. They\'re disabled by default, but if you have a specific need — for a plugin or other non typical use — then you can enable as needed here.' , 'bizznis' ) . '
' . '' . __( 'You can also add support for Windows Live Writer if you use software that supports this and include a shortlink tag if this is required by any third party service.' , 'bizznis' ) . '
'; $homepage_help = '' . __( 'These are the homepage specific SEO settings. Note: these settings will not apply if a static page is set as the front page. If you\'re using a static WordPress page as your hompage, you\'ll need to set the SEO settings on that particular page.' , 'bizznis' ) . '
' . '' . __( 'You can also specify if the Site Title, Description, or your own custom text should be wrapped in an <h1> tag (the primary heading in HTML).' , 'bizznis' ) . '
' . '' . __( 'To add custom text you\'ll have to either edit a php file, or use a text widget on a widget enabled homepage.' , 'bizznis' ) . '
' . '' . __( 'The home doctitle sets what will appear within the
' . __( 'The home META description fill in the meta tags for the home page. The META description is the short text blurb that appear in search engine results.' , 'bizznis' ) . '
' . '' . __( 'The Homepage Robots Meta Tags tell search engines how to handle the homepage. Noindex means not to index the page at all, and it will not appear in search results. Nofollow means do not follow any links from this page and noarchive tells them not to make an archive copy of the page.' , 'bizznis' ) . '
'; $robots_help = '' . __( 'Noarchive and noindex are explained in the home settings. Here you can select what other parts of the site to apply these options to.' , 'bizznis' ) . '
' . '' . __( 'At least one archive should be indexed, but indexing multiple archives will typically result in a duplicate content penalization (multiple pages with identical content look manipulative to search engines).' , 'bizznis' ) . '
' . '' . __( 'For most sites either the home page or blog page (using the blog template) will serve as this index which is why the default is not to index categories, tags, authors, dates, or searches.' , 'bizznis' ) . '
'; $seoarchives_help = '' . __( 'Canonical links will point search engines to the front page of paginated content (search engines have to choose the "preferred link" when there is duplicate content on pages).' , 'bizznis' ) . '
' . '' . __( 'This tells them "this is paged content and the first page starts here" and helps to avoid spreading keywords across multiple pages.' , 'bizznis' ) . '
'; $screen->add_help_tab( array( 'id' => $this->pagehook . '-seo-settings', 'title' => __( 'SEO Settings' , 'bizznis' ), 'content' => $seo_settings_help, ) ); $screen->add_help_tab( array( 'id' => $this->pagehook . '-doctitle', 'title' => __( 'Document Title Settings' , 'bizznis' ), 'content' => $doctitle_help, ) ); $screen->add_help_tab( array( 'id' => $this->pagehook . '-dochead', 'title' => __( 'Document Head Settings' , 'bizznis' ), 'content' => $dochead_help, ) ); $screen->add_help_tab( array( 'id' => $this->pagehook . '-homepage', 'title' => __( 'Homepage Settings' , 'bizznis' ), 'content' => $homepage_help, ) ); $screen->add_help_tab( array( 'id' => $this->pagehook . '-robots', 'title' => __( 'Robots Meta Settings' , 'bizznis' ), 'content' => $robots_help, ) ); $screen->add_help_tab( array( 'id' => $this->pagehook . '-seo-archives', 'title' => __( 'SEO Archives' , 'bizznis' ), 'content' => $seoarchives_help, ) ); # Add help sidebar $screen->set_help_sidebar( '' . __( 'For more information:', 'bizznis' ) . '
' . '' . __( 'Get Support', 'bizznis' ) . '
' ); } /** * Callback for SEO Settings Form. * * @since 1.0.0 */ public function form() { ?>SEO.', 'bizznis' ), bizznis_code( '
|
get_field_value( 'doctitle_seplocation' ), 'left' ); ?> />
|
|
|
|
' ) ); ?>
SEO value whatsoever; they just make your site slower to load.', 'bizznis' ); ?>
| ' ) ); ?> |
Note: The shortlink tag might have some use for 3rd party service discoverability, but it has no SEO value whatsoever.', 'bizznis' ); ?> |
|---|
|
get_field_value( 'home_h1_on' ), 'title' ); ?> />
get_field_value( 'home_h1_on' ), 'description' ); ?> /> get_field_value( 'home_h1_on' ), 'neither' ); ?> /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|