$options, 'message' => $message); add_meta_box('authorsure-help', __('Help',AUTHORSURE), array(__CLASS__, 'help_panel'), self::get_screen_id(), 'side', 'core'); add_meta_box('authorsure-terminology', __('Google+ Terminology',AUTHORSURE), array(__CLASS__, 'google_panel'), self::get_screen_id(), 'side', 'core'); add_meta_box('authorsure-intro', __('Intro',AUTHORSURE), array(__CLASS__, 'intro_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-rel-author', __('Post Settings (rel="author")',AUTHORSURE), array(__CLASS__, 'post_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-archive', __('Archive Settings (rel="author")',AUTHORSURE), array(__CLASS__, 'archive_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-rel-home', __('Home Page Settings (rel="author" and rel="publisher")',AUTHORSURE), array(__CLASS__, 'home_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-rel-me', __('Author Page Settings (rel="me")',AUTHORSURE), array(__CLASS__, 'author_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-advanced', __('Author Page Advanced Settings (rel="me")',AUTHORSURE), array(__CLASS__, 'advanced_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); add_meta_box('authorsure-role', __('Minimum Roles',AUTHORSURE), array(__CLASS__, 'role_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); if (authorsure_plugin::get_jetpack_photon_enabled()) { add_meta_box('authorsure-photon', __('Missing Avatar?',AUTHORSURE), array(__CLASS__, 'photon_panel'), self::get_screen_id(), 'normal', 'core',$callback_params); } add_action ('admin_enqueue_scripts',array(__CLASS__, 'enqueue_styles')); add_action ('admin_enqueue_scripts',array(__CLASS__, 'enqueue_scripts')); $current_screen = get_current_screen(); if (method_exists($current_screen,'add_help_tab')) { $current_screen->add_help_tab( array( 'id' => 'authorsure_instructions_tab', 'title' => __('AuthorSure Instructions'), 'content' => '
On the Options page you can specify:
AuthorSure gives you a lot of control over where and how you want Google Authorship to be applied on your site.
The only thing you have to do is decide here is which of the 4 Author Indicator methods works best given your choice of WordPress theme, and whether you are running a single or multiple author blog.
{$message} INTRO_PANEL; } static function post_panel($post, $metabox) { $options = $metabox['args']['options']; $footnote_show_updated_date = $options['footnote_show_updated_date'] ? ' checked="checked"' : ''; $menu = $options['author_rel']=="menu"?'checked="checked"':''; $byline = $options['author_rel']=="byline"?'checked="checked"':''; $footnote = $options['author_rel']=="footnote"?'checked="checked"':''; $box = $options['author_rel']=="box"?'checked="checked"':''; $hide_box_on_pages = $options['hide_box_on_pages'] ? ' checked="checked"' : ''; $hide_box_on_front_page = $options['hide_box_on_front_page'] ? ' checked="checked"' : ''; $box_nofollow_links = $options['box_nofollow_links'] ? ' checked="checked"' : ''; $box_show_profiles = $options['box_show_profiles'] ? ' checked="checked"' : ''; $authors = wp_dropdown_users(array('who' => 'authors', 'selected' => $options['menu_primary_author'], 'name' => 'authorsure_menu_primary_author', 'show_option_none' => __('(not selected)'), 'sort_column'=> 'display_name', 'echo' => 0)); $about_page = wp_dropdown_pages(array('post_type' => 'page', 'selected' => $options['menu_about_page'], 'name' => 'authorsure_menu_about_page', 'show_option_none' => __('(not selected)'), 'sort_column'=> 'menu_order, post_title', 'echo' => 0)); $custom_post_types = get_post_types(array('public' => true, '_builtin' => false)); $custom_shows =''; $show_format = 'Check the box above to show the author box on all your %1$s by default. If you want to hide the author box on specific pages then can set the Authorsure author box settings by editing the individual page.
'; $show_custom = $options['show_box_on_custom']; foreach ($custom_post_types as $post_type) { $plural = strtolower($post_type). 's'; $id = 'authorsure_show_box_on_'.$plural; $name = 'authorsure_show_box_on_custom['.$plural.']'; $checked = (is_array($show_custom) && array_key_exists($plural, $show_custom) && $show_custom[$plural]) ? 'checked="checked" ' : ''; $input = sprintf('', $name, $id, $checked); $custom_shows .= sprintf ($show_format, ucwords($plural), $input); } print <<< AUTHORSURE_POST_PANELYou can leave the default settings here if your WordPress theme puts a link with rel=author to the author page in the post 'byline'.
These settings control how your author pages link back to Google. You may need to tweak the settings here depending on how your WordPress theme displays author pages.
Check the box above if you want to show the author name as a title to the Author page. If your WordPress theme does this already then clear the checkbox.
The word or words that precede the author name in the title of the Author Page. (e.g About)
Check the box above if you want to show the avatar beside the bio on the Author page.
Choose whether you want a short, extended or no bio at the top of the author pages
Check the box above in you want any external links that your authors enter in their bios to be rel=nofollow on their author pages.
Enter your prefered text that precedes the list of contact methods. For example: "Find out more about me at:"
Choose the size of the social media icons.
Check the box above if you want to show the social media icons on a single line.
Enter the text you want to appear as the text on the link to the profile page. For example, "Google+", "GooglePlus", etc.
The heading that precede the list of posts (or post excerpts) by the author. (e.g. Here are my most recent posts). Leave blank if you do not want a heading
AUTHORSURE_PAGE_PANEL; } static function advanced_panel($post, $metabox) { $options = $metabox['args']['options']; $hook = authorsure_options::get_author_page_hook(); $hook_index = authorsure_options::get_author_page_hook_index(); $hook_instances = ''; for ($i=1; $i<11; $i++ ) { $checked = $hook_index==$i ? ' selected="selected"': ''; $hook_instances .= ''; } $filter_bio = $options['author_page_filter_bio'] ? ' checked="checked"' : ''; print <<< AUTHORSURE_ADVANCED_PANELOnly change the settings below if Authorsure is adding the author profile in the incorrect location, such as in the header, footer or in a sidebar, or the profile is missing completely form the author page. This is because your WordPress theme is doing something more on the author page than just dispaying the list of posts by that author. You can adjust the settings below on a trial and error basis to see if they improve the situation.
If your theme has its own 'hooks' then you can configure AuthorSure to use one of those hooks.
The name of the hook where AuthorSure runs in order to add the profile information and the link back to Google+. (e.g loop_start is the default hook)
Select on which instance of the hook to you want AuthorSure to run. The default is the first instance. In other words AuthorSure will run just before the first loop which fetches all the posts by that author. See the links in the sidebar for more information on changing these settings.
This is the option of last resort where your WordPress theme has an author template and is already inserting author information at the top of the page. Your goal is to inject the profile links to Google+ etc, in the correct place so you will typically have unchecked "Show Title" and checked "Author Bio=none" and "Show Icons only" in the Author Page setting above.
Only check the box above if you have tried the various hook settings and you cannot make the profile links appear in the correct place. If your theme is using the WordPress function get_the_author_meta to fetch the bio then clicking this option will display your Google Plus and other profile links immediately below the bio that is inserted by the theme.
If this approach fails then a couple of lines of custom PHP code or a tweak to the theme author template will be required: though we have not come across a WordPress theme yet where we have had to resort to custom PHP code.
AUTHORSURE_ADVANCED_PANEL; } static function home_panel($post, $metabox) { $options = $metabox['args']['options']; $publisher = authorsure_options::get_publisher(); $homepage = site_url(); $authors = wp_dropdown_users(array('who' => 'authors', 'selected' => $options['home_author'], 'name' => 'authorsure_home_author', 'show_option_none' => __('(not selected)'), 'sort_column'=> 'display_name', 'echo' => 0)) ; print <<Select the author of the home page, first making sure that author has set up a Google+ link in their profile. This will put a rel="author" link to the specified Google+ profile on your home page, {$homepage} with the end result being that their face will appear in the SERPS in the entry for your home page.
Enter your Google Plus page ID here if your have set up a "Google+ Page" for your organization or product, and AuthorSure will put a rel="publisher" link to the specified Google+ page on your home page, {$homepage}. Note that the Google+ page is not the same as the Google+ profile. See the sidebar on the the right for more on this.
AUTHORSURE_PUBLISHER_PANEL; } static function archive_panel ($post, $metabox) { $options = $metabox['args']['options']; $publisher = $options['archive_link']=="publisher" ? 'checked="checked"' : ''; $top = $options['archive_link']=='top' ? 'checked="checked"' : ''; $bottom = $options['archive_link']=='bottom' ? 'checked="checked"' : ''; $archive_intro_enabled = $options['archive_intro_enabled'] ? ' checked="checked"' : ''; $authors = wp_dropdown_users(array('who' => 'authors', 'selected' => $options['archive_author_id'], 'name' => 'authorsure_archive_author_id', 'sort_column'=> 'display_name', 'echo' => 0)); print <<< ARCHIVE_PANELThese settings determine how you manage authorship of your category, tag and any other taxonomy archive pages.
The word or words that precede the author name on the archive pages. (e.g. "Last updated by", "Author:", etc.)
Choose the default author to be used on the category and tag archive pages. Note that you can override this setting on individual archive pages.
For example, John may be the primary author for the site, but Jane is the chosen author for the psychology category and Rachael for the the Chemistry category.
Check the box above if you want the plugin to give you the opportunity to include a paragraph at the top of the archive page that precedes the list of posts in this archive. Your WordPress theme may already give you this facility but if it does not then please use this option as it can help you improve your archive pages from both human readership and SEO standpoints. After you home page, your category and tag pages can be the next most visited pages on your site so it pays dividends to put some work into them.
ARCHIVE_PANEL; } static function role_panel($post, $metabox) { $options = $metabox['args']['options']; $roles = ''; $authorship_role = $options['minimum_role_for_authorship']; $options1 = str_replace('value="'.$authorship_role.'"','selected="selected" value="'.$authorship_role.'"', $roles); $bio_role = $options['minimum_role_for_bio_links']; $options2 = str_replace('value="'.$bio_role.'"','selected="selected" value="'.$bio_role.'"', $roles); $box_role = $options['minimum_role_for_box_links']; $options3 = str_replace('value="'.$box_role.'"','selected="selected" value="'.$box_role.'"', $roles); print <<< AUTHORSURE_ROLE_PANELBy default, AuthorSure features are enabled for the lowest level which is contributor. However, where you have large numbers of users contributing to your site you may want to place some restrictions on the lower levels of users.
Select the minimum level of user for which Google Authorship is enabled through AuthorSure.
Select the minimum level of user for which links will be allowed in the Bio on their Author page. Users below this level will have links remove from their bio.
Select the minimum level of user for which links will be allowed in the Bio on the Author Boxes that appear at the foot of each of their posts. Users below this level will have links removed from their author box.
AUTHORSURE_ROLE_PANEL; } static function photon_panel($post, $metabox) { $options = $metabox['args']['options']; $donotcache_avatar = $options['donotcache_avatar'] ? ' checked="checked"' : ''; print <<< AUTHORSURE_PHOTON_PANELOnly check this box if your avatar images are showing as broken in your author boxes.
This is likely due to JetPack Photon caching not picking up changes.
Clicking the checkbox will stop Photon from caching the avatar images.
AUTHORSURE_PHOTON_PANEL; } static function help_panel() { $home = AUTHORSURE_HOME; $images = AUTHORSURE_IMAGES_URL; $domain = parse_url(site_url(),PHP_URL_HOST); print <<< HELP_PANEL