Created
          July 14, 2016 19:07 
        
      - 
      
- 
        Save al5dy/d43783e435b27b29b2e75dfa3fe527f6 to your computer and use it in GitHub Desktop. 
    Yoast SEO - убираем теги <image:image> для Yandex
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function yoast_clear_sitemap( $output, $url ) { | |
| $timezone = new WPSEO_Sitemap_Timezone(); | |
| $date = null; | |
| if ( ! empty( $url['mod'] ) ) { | |
| $date = $timezone->format_date( $url['mod'] ); | |
| } | |
| $url['loc'] = htmlspecialchars( $url['loc'] ); | |
| $output = "\t<url>\n"; | |
| $output .= "\t\t<loc>" . $url['loc'] . "</loc>\n"; | |
| $output .= empty( $date ) ? '' : "\t\t<lastmod>" . htmlspecialchars( $date ) . "</lastmod>\n"; | |
| $output .= "\t\t<changefreq>" . $url['chf'] . "</changefreq>\n"; | |
| $output .= "\t\t<priority>" . str_replace( ',', '.', $url['pri'] ) . "</priority>\n"; | |
| unset($url['images']); | |
| $output .= "\t</url>\n"; | |
| return $output; | |
| } | |
| add_filter( 'wpseo_sitemap_url','yoast_clear_sitemap', 10 , 2 ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment