/**
  * @param WPSEO_Option_Tabs $option_tabs Option Tabs to get tabs from.
  * @param Yoast_Form        $yform       Yoast Form which is being used in the views.
  * @param array             $options     Options which are being used in the views.
  */
 public function run(WPSEO_Option_Tabs $option_tabs, Yoast_Form $yform, $options = array())
 {
     echo '<h2 class="nav-tab-wrapper" id="wpseo-tabs">';
     foreach ($option_tabs->get_tabs() as $tab) {
         printf('<a class="nav-tab" id="%1$s-tab" href="#top#%1$s">%2$s</a>', $tab->get_name(), $tab->get_label());
     }
     echo '</h2>';
     $filter_name = sprintf('yoast_option_tab_help_center_%s', $option_tabs->get_base());
     $base_help_center_items = apply_filters($filter_name, array());
     foreach ($option_tabs->get_tabs() as $tab) {
         $identifier = $tab->get_name();
         printf('<div id="%s" class="wpseotab">', $identifier);
         $filter_name = sprintf('yoast_option_tab_help_center_%s_%s', $option_tabs->get_base(), $tab->get_name());
         $help_center_items = apply_filters($filter_name, $base_help_center_items);
         if (!empty($help_center_items)) {
             $this->create_help_center($option_tabs->get_base(), $tab->get_name(), $help_center_items);
         } else {
             $video = $tab->get_video_url();
             if (!empty($video)) {
                 $tab_video_url = $video;
                 include WPSEO_PATH . 'admin/views/partial-settings-tab-video.php';
             }
         }
         $tab_view = $this->get_tab_view($option_tabs, $tab);
         if (is_file($tab_view)) {
             require_once $tab_view;
         }
         echo '</div>';
     }
 }
 /**
  * @param WPSEO_Option_Tabs $option_tabs Option Tabs to get tabs from.
  * @param Yoast_Form        $yform       Yoast Form which is being used in the views.
  * @param array             $options     Options which are being used in the views.
  */
 public function run(WPSEO_Option_Tabs $option_tabs, Yoast_Form $yform, $options = array())
 {
     echo '<h2 class="nav-tab-wrapper" id="wpseo-tabs">';
     foreach ($option_tabs->get_tabs() as $tab) {
         printf('<a class="nav-tab" id="%1$s-tab" href="#top#%1$s">%2$s</a>', $tab->get_name(), $tab->get_label());
     }
     echo '</h2>';
     foreach ($option_tabs->get_tabs() as $tab) {
         // Prepare the help center for each tab.
         $help_center = new WPSEO_Help_Center($option_tabs->get_base(), $tab);
         $identifier = $tab->get_name();
         printf('<div id="%s" class="wpseotab">', $identifier);
         // Output the help center.
         $help_center->output_help_center();
         // Output the settings view for all tabs.
         $tab_view = $this->get_tab_view($option_tabs, $tab);
         if (is_file($tab_view)) {
             require_once $tab_view;
         }
         echo '</div>';
     }
 }
예제 #3
0
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
add_filter('yoast_option_tab_help_center_metas', 'yoast_option_tab_help_center_metas');
add_filter('yoast_option_tab_help_center_metas_general', 'yoast_option_tab_help_center_metas_general');
add_filter('yoast_option_tab_help_center_metas_home', 'yoast_option_tab_help_center_metas_home');
add_filter('yoast_option_tab_help_center_metas_post-types', 'yoast_option_tab_help_center_metas_post_types');
add_filter('yoast_option_tab_help_center_metas_taxonomies', 'yoast_option_tab_help_center_metas_taxonomies');
add_filter('yoast_option_tab_help_center_metas_archives', 'yoast_option_tab_help_center_metas_archives');
add_filter('yoast_option_tab_help_center_metas_other', 'yoast_option_tab_help_center_metas_other');
$options = WPSEO_Options::get_options(array('wpseo_titles', 'wpseo_permalinks', 'wpseo_internallinks'));
$yform = Yoast_Form::get_instance();
$yform->admin_header(true, 'wpseo_titles');
$tabs = new WPSEO_Option_Tabs('metas');
$tabs->add_tab(new WPSEO_Option_Tab('general', __('General', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas')));
$tabs->add_tab(new WPSEO_Option_Tab('home', __('Homepage', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas-homepage')));
$tabs->add_tab(new WPSEO_Option_Tab('post-types', __('Post Types', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas-post-types')));
$tabs->add_tab(new WPSEO_Option_Tab('taxonomies', __('Taxonomies', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas-taxonomies')));
$tabs->add_tab(new WPSEO_Option_Tab('archives', __('Archives', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas-archives')));
$tabs->add_tab(new WPSEO_Option_Tab('other', __('Other', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-metas-other')));
$tabs->display($yform, $options);
$yform->admin_footer();
/**
 * Add help tabs
 *
 * @param array $tabs Current help center tabs.
 *
 * @return array
 */
예제 #4
0
/**
 * @todo - [JRF => whomever] check for other sitemap plugins which may conflict ?
 * @todo - [JRF => whomever] check for existance of .xls rewrite rule in .htaccess from
 * google-sitemaps-plugin/generator and remove as it will cause errors for our sitemaps
 * (or inform the user and disallow enabling of sitemaps )
 * @todo - [JRF => whomever] check if anything along these lines is already being done
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$yform = Yoast_Form::get_instance();
$yform->admin_header(true, 'wpseo_xml');
$options = get_option('wpseo_xml');
echo '<br/>';
$yform->light_switch('enablexmlsitemap', __('XML sitemap functionality', 'wordpress-seo'));
$tabs = new WPSEO_Option_Tabs('sitemaps');
$tabs->add_tab(new WPSEO_Option_Tab('general', __('General', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-sitemaps')));
$tabs->add_tab(new WPSEO_Option_Tab('user-sitemap', __('User sitemap', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-sitemaps-user-sitemap')));
$tabs->add_tab(new WPSEO_Option_Tab('post-types', __('Post Types', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-sitemaps-post-types')));
$tabs->add_tab(new WPSEO_Option_Tab('exclude-post', __('Excluded Posts', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-sitemaps-exclude-post')));
$tabs->add_tab(new WPSEO_Option_Tab('taxonomies', __('Taxonomies', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-sitemaps-taxonomies')));
echo '<div id="sitemapinfo">';
$tabs->display($yform, $options);
echo '</div>';
/**
 * Fires at the end of XML Sitemaps configuration form.
 */
do_action('wpseo_xmlsitemaps_config');
$yform->admin_footer();
예제 #5
0
    if (isset($_SERVER['HTTP_REFERER'])) {
        wp_safe_redirect($_SERVER['HTTP_REFERER'], 307);
        exit;
    }
}
$yform = Yoast_Form::get_instance();
$yform->admin_header(true, 'wpseo');
do_action('wpseo_all_admin_notices');
if (is_array($options['blocking_files']) && count($options['blocking_files']) > 0) {
    $xml_sitemap_options = WPSEO_Options::get_option('wpseo_xml');
    if ($xml_sitemap_options['enablexmlsitemap']) {
        echo '<div class="notice notice-error inline yoast-notice-blocking-files"><p id="blocking_files">';
        printf(_n('The following file is blocking your XML sitemaps from working properly. Either delete it (this can be done with the "Fix it" button) or disable %1$s XML sitemaps.', 'The following files are blocking your XML sitemaps from working properly. Either delete them (this can be done with the "Fix it" button) or disable %1$s XML sitemaps.', count($options['blocking_files']), 'wordpress-seo'), 'Yoast SEO');
        foreach ($options['blocking_files'] as $file) {
            echo '<br/>', '<code>', esc_html($file), '</code>';
        }
        unset($file);
        echo '<br><button type="button" data-nonce="', esc_js(wp_create_nonce('wpseo-blocking-files')), '" class="button">', __('Fix it', 'wordpress-seo'), '</button>';
        echo '</p></div>';
    }
}
$tabs = new WPSEO_Option_Tabs('dashboard');
$tabs->add_tab(new WPSEO_Option_Tab('dashboard', __('Dashboard', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-notification-center')));
$tabs->add_tab(new WPSEO_Option_Tab('general', __('General', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-general')));
$knowledge_graph_label = 'company' === $options['company_or_person'] ? __('Company Info', 'wordpress-seo') : __('Your Info', 'wordpress-seo');
$tabs->add_tab(new WPSEO_Option_Tab('knowledge-graph', __($knowledge_graph_label, 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-knowledge-graph')));
$tabs->add_tab(new WPSEO_Option_Tab('webmaster-tools', __('Webmaster Tools', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-general-search-console')));
$tabs->add_tab(new WPSEO_Option_Tab('security', __('Security', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-security')));
$tabs->display($yform, $options);
do_action('wpseo_dashboard');
$yform->admin_footer();
예제 #6
0
<?php

/**
 * @package WPSEO\Admin
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$active_tab = filter_input(INPUT_GET, 'tab');
$tabs = new WPSEO_Option_Tabs('advanced', 'breadcrumbs');
$tabs->add_tab(new WPSEO_Option_Tab('breadcrumbs', __('Breadcrumbs', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-breadcrumbs', 'opt_group' => 'wpseo_internallinks')));
$tabs->add_tab(new WPSEO_Option_Tab('permalinks', __('Permalinks', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-permalinks', 'opt_group' => 'wpseo_permalinks')));
$tabs->add_tab(new WPSEO_Option_Tab('rss', __('RSS', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-rss', 'opt_group' => 'wpseo_rss')));
$active_tab = $tabs->get_active_tab();
Yoast_Form::get_instance()->admin_header(true, $active_tab->get_opt_group());
echo '<h2 class="nav-tab-wrapper">';
foreach ($tabs->get_tabs() as $tab) {
    $active = $tabs->is_active_tab($tab) ? ' nav-tab-active' : '';
    echo '<a class="nav-tab' . $active . '" id="' . $tab->get_name() . '-tab" href="' . admin_url('admin.php?page=wpseo_advanced&tab=' . $tab->get_name()) . '">' . $tab->get_label() . '</a>';
}
echo '</h2>';
echo '<br/>';
require_once WPSEO_PATH . 'admin/views/tabs/advanced/' . $active_tab->get_name() . '.php';
Yoast_Form::get_instance()->admin_footer();
예제 #7
0
파일: social.php 프로젝트: Garth619/Femi9
<?php

/**
 * @package WPSEO\Admin
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$yform = Yoast_Form::get_instance();
$yform->admin_header(true, 'wpseo_social');
$tabs = new WPSEO_Option_Tabs('social');
$tabs->add_tab(new WPSEO_Option_Tab('accounts', __('Accounts', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-social-accounts')));
$tabs->add_tab(new WPSEO_Option_Tab('facebook', __('Facebook', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-social-facebook')));
$tabs->add_tab(new WPSEO_Option_Tab('twitterbox', __('Twitter', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-social-twitter')));
$tabs->add_tab(new WPSEO_Option_Tab('pinterest', __('Pinterest', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-social-pinterest')));
$tabs->add_tab(new WPSEO_Option_Tab('google', __('Google+', 'wordpress-seo'), array('video_url' => 'https://yoa.st/screencast-social-google')));
$tabs->display($yform);
$yform->admin_footer();