/admin/pages/xml-sitemaps.php

  1. <?php 
  2. /** 
  3. * @package WPSEO\Admin 
  4. */ 
  5.  
  6. /** 
  7. * @todo - [JRF => whomever] check for other sitemap plugins which may conflict ? 
  8. * @todo - [JRF => whomever] check for existance of .xls rewrite rule in .htaccess from 
  9. * google-sitemaps-plugin/generator and remove as it will cause errors for our sitemaps 
  10. * (or inform the user and disallow enabling of sitemaps ) 
  11. * @todo - [JRF => whomever] check if anything along these lines is already being done 
  12. */ 
  13.  
  14.  
  15. if ( ! defined( 'WPSEO_VERSION' ) ) { 
  16. header( 'Status: 403 Forbidden' ); 
  17. header( 'HTTP/1.1 403 Forbidden' ); 
  18. exit(); 
  19.  
  20. $yform = Yoast_Form::get_instance(); 
  21. $yform->admin_header( true, 'wpseo_xml' ); 
  22.  
  23. $options = get_option( 'wpseo_xml' ); 
  24.  
  25. echo '<br/>'; 
  26. $yform->light_switch( 'enablexmlsitemap', __( 'XML sitemap functionality', 'wordpress-seo' ) ); 
  27.  
  28. $tabs = new WPSEO_Option_Tabs( 'sitemaps' ); 
  29. $tabs->add_tab( new WPSEO_Option_Tab( 'general', __( 'General', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps' ) ) ); 
  30.  
  31. $title_options = WPSEO_Options::get_option( 'wpseo_titles' ); 
  32.  
  33. if ( empty( $title_options['disable-author'] ) ) { 
  34. $tabs->add_tab( new WPSEO_Option_Tab( 'user-sitemap', __( 'User sitemap', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-user-sitemap' ) ) ); 
  35.  
  36. $tabs->add_tab( new WPSEO_Option_Tab( 'post-types', __( 'Post Types', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-post-types' ) ) ); 
  37. $tabs->add_tab( new WPSEO_Option_Tab( 'exclude-post', __( 'Excluded Posts', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-exclude-post' ) ) ); 
  38. $tabs->add_tab( new WPSEO_Option_Tab( 'taxonomies', __( 'Taxonomies', 'wordpress-seo' ), array( 'video_url' => 'https://yoa.st/screencast-sitemaps-taxonomies' ) ) ); 
  39.  
  40. echo '<div id="sitemapinfo">'; 
  41. $tabs->display( $yform, $options ); 
  42. echo '</div>'; 
  43.  
  44.  
  45. /** 
  46. * Fires at the end of XML Sitemaps configuration form. 
  47. */ 
  48. do_action( 'wpseo_xmlsitemaps_config' ); 
  49.  
  50. $yform->admin_footer(); 
.