Esempio n. 1
0
			<a class="nav-tab" id="exclude-post-tab" href="#top#exclude-post"><?php 
_e('Excluded Posts', 'ymbeseo');
?>
</a>
			<a class="nav-tab" id="taxonomies-tab"
			   href="#top#taxonomies"><?php 
_e('Taxonomies', 'ymbeseo');
?>
</a>
		</h2>

		<div id="general" class="wpseotab">
			<?php 
if ($options['enablexmlsitemap'] === true) {
    echo '<p>';
    printf(esc_html__('You can find your XML Sitemap here: %sXML Sitemap%s', 'ymbeseo'), '<a target="_blank" class="button-secondary" href="' . esc_url(YMBESEO_xml_sitemaps_base_url('sitemap_index.xml')) . '">', '</a>');
    echo '<br/>';
    echo '<br/>';
    _e('You do <strong>not</strong> need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'ymbeseo');
    echo '</p>';
} else {
    echo '<p>', __('Save your settings to activate XML Sitemaps.', 'ymbeseo'), '</p>';
}
?>

			<p>
				<strong><?php 
_e('Entries per page', 'ymbeseo');
?>
</strong><br/>
				<?php 
Esempio n. 2
0
/**
 * Notify search engines of the updated sitemap.
 *
 * @param string|null $sitemapurl
 */
function YMBESEO_ping_search_engines($sitemapurl = null)
{
    // Don't ping if blog is not public.
    if ('0' == get_option('blog_public')) {
        return;
    }
    if ($sitemapurl == null) {
        $sitemapurl = urlencode(YMBESEO_xml_sitemaps_base_url('sitemap_index.xml'));
    }
    // Ping Google and Bing.
    wp_remote_get('http://www.google.com/webmasters/tools/ping?sitemap=' . $sitemapurl, array('blocking' => false));
    wp_remote_get('http://www.bing.com/ping?sitemap=' . $sitemapurl, array('blocking' => false));
}
Esempio n. 3
0
 /**
  * Adds 'prev' and 'next' links to archives.
  *
  * @link  http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
  * @since 1.0.3
  */
 public function adjacent_rel_links()
 {
     // Don't do this for Genesis, as the way Genesis handles homepage functionality is different and causes issues sometimes.
     /**
      * Filter 'YMBESEO_genesis_force_adjacent_rel_home' - Allows devs to allow echoing rel="next" / rel="prev" by Yoast SEO on Genesis installs
      *
      * @api bool $unsigned Whether or not to rel=next / rel=prev
      */
     if (is_home() && function_exists('genesis') && apply_filters('YMBESEO_genesis_force_adjacent_rel_home', false) === false) {
         return;
     }
     global $wp_query;
     if (!is_singular()) {
         $url = $this->canonical(false, true, true);
         if (is_string($url) && $url !== '') {
             $paged = get_query_var('paged');
             if (0 == $paged) {
                 $paged = 1;
             }
             if ($paged == 2) {
                 $this->adjacent_rel_link('prev', $url, $paged - 1, true);
             }
             // Make sure to use index.php when needed, done after paged == 2 check so the prev links to homepage will not have index.php erroneously.
             if (is_front_page()) {
                 $url = YMBESEO_xml_sitemaps_base_url('');
             }
             if ($paged > 2) {
                 $this->adjacent_rel_link('prev', $url, $paged - 1, true);
             }
             if ($paged < $wp_query->max_num_pages) {
                 $this->adjacent_rel_link('next', $url, $paged + 1, true);
             }
         }
     } else {
         $numpages = 0;
         if (isset($wp_query->post->post_content)) {
             $numpages = substr_count($wp_query->post->post_content, '<!--nextpage-->') + 1;
         }
         if ($numpages > 1) {
             $page = get_query_var('page');
             if (!$page) {
                 $page = 1;
             }
             $url = get_permalink($wp_query->post->ID);
             // If the current page is the frontpage, pagination should use /base/.
             if ($this->is_home_static_page()) {
                 $usebase = true;
             } else {
                 $usebase = false;
             }
             if ($page > 1) {
                 $this->adjacent_rel_link('prev', $url, $page - 1, $usebase, 'single_paged');
             }
             if ($page < $numpages) {
                 $this->adjacent_rel_link('next', $url, $page + 1, $usebase, 'single_paged');
             }
         }
     }
 }
Esempio n. 4
0
 /**
  * Make a request for the sitemap index so as to cache it before the arrival of the search engines.
  */
 function hit_sitemap_index()
 {
     $url = YMBESEO_xml_sitemaps_base_url('sitemap_index.xml');
     wp_remote_get($url);
 }