Ejemplo n.º 1
0
/**
 * Add help tabs
 *
 * @param array $tabs Current help center tabs.
 *
 * @return array
 */
function yoast_option_tab_help_center_metas($tabs)
{
    $tabs[] = new WPSEO_Help_Center_Item('basic-help', __('Template explanation', 'wordpress-seo'), array('content' => '<p>' . sprintf(__('The title &amp; metas settings for %1$s are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo'), 'Yoast SEO') . '</p>' . '<p>' . __('Note that not all variables can be used in every template.', 'wordpress-seo') . '</p>'));
    $tabs[] = new WPSEO_Help_Center_Item('title-vars', __('Basic Variables', 'wordpress-seo'), array('content' => '<h2>' . __('Basic Variables', 'wordpress-seo') . '</h2>' . WPSEO_Replace_Vars::get_basic_help_texts()));
    $tabs[] = new WPSEO_Help_Center_Item('title-vars-advanced', __('Advanced Variables', 'wordpress-seo'), array('content' => '<h2>' . __('Advanced Variables', 'wordpress-seo') . '</h2>' . WPSEO_Replace_Vars::get_advanced_help_texts()));
    return $tabs;
}
Ejemplo n.º 2
0
 /**
  * Adds contextual help to the titles & metas page.
  */
 function title_metas_help_tab()
 {
     $screen = get_current_screen();
     $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'wordpress-seo') . '</strong></p>' . '<p><a target="_blank" href="https://yoast.com/articles/wordpress-seo/#titles">' . __('Title optimization', 'wordpress-seo') . '</a></p>' . '<p><a target="_blank" href="https://yoast.com/google-page-title/">' . __('Why Google won\'t display the right page title', 'wordpress-seo') . '</a></p>');
     $screen->add_help_tab(array('id' => 'basic-help', 'title' => __('Template explanation', 'wordpress-seo'), 'content' => '<p>' . __('The title &amp; metas settings for WordPress SEO are made up of variables that are replaced by specific values from the page when the page is displayed. The tabs on the left explain the available variables.', 'wordpress-seo') . '</p>'));
     $screen->add_help_tab(array('id' => 'title-vars', 'title' => __('Basic Variables', 'wordpress-seo'), 'content' => "\n\t\t<h2>" . __('Basic Variables', 'wordpress-seo') . "</h2>\n\t\t" . WPSEO_Replace_Vars::get_basic_help_texts()));
     $screen->add_help_tab(array('id' => 'title-vars-advanced', 'title' => __('Advanced Variables', 'wordpress-seo'), 'content' => "\n\t\t<h2>" . __('Advanced Variables', 'wordpress-seo') . "</h2>\n\t\t" . WPSEO_Replace_Vars::get_advanced_help_texts()));
 }