jetpack_sitemap_on_activate

Run when Sitemaps module is activated.

Description

jetpack_sitemap_on_activate(); 

Usage

  1. if ( !function_exists( 'jetpack_sitemap_on_activate' ) ) { 
  2. require_once '/modules/sitemaps.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_sitemap_on_activate(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/sitemaps.php  
  1. function jetpack_sitemap_on_activate() { 
  2. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-constants.php'; 
  3. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-buffer.php'; 
  4. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-stylist.php'; 
  5. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-librarian.php'; 
  6. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-finder.php'; 
  7. require_once dirname( __FILE__ ) . '/sitemaps/sitemap-builder.php'; 
  8.  
  9. wp_clear_scheduled_hook( 'jp_sitemap_cron_hook' ); 
  10. wp_clear_scheduled_hook( 'jetpack_sitemap_generate_on_activate' ); 
  11.  
  12. $sitemap_builder = new Jetpack_Sitemap_Builder(); 
  13. add_action( 'jetpack_sitemap_generate_on_activate', array( $sitemap_builder, 'update_sitemap' ) ); 
  14.  
  15. wp_schedule_single_event( time(), 'jetpack_sitemap_generate_on_activate' );