gglstmp_add_sitemap

The Google Sitemap by BestWebSoft gglstmp add sitemap function.

Description

gglstmp_add_sitemap( $blog_id ); 

Parameters (1)

0. $blog_id
The blog id.

Usage

  1. if ( !function_exists( 'gglstmp_add_sitemap' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/google-sitemap-plugin.php'; 
  3.  
  4. // The blog id. 
  5. $blog_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gglstmp_add_sitemap($blog_id); 
  9.  

Defined (1)

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

/google-sitemap-plugin.php  
  1. function gglstmp_add_sitemap( $blog_id ) { 
  2. global $wpdb; 
  3.  
  4. /** don`t have to check blog status for new blog */ 
  5. if ( 'wpmu_new_blog' != current_filter() ) { 
  6. $blog_details = get_blog_details( $blog_id ); 
  7. if ( 
  8. ! is_object( $blog_details ) || 
  9. $blog_details->archived == 1 || 
  10. $blog_details->deleted == 1 || 
  11. $blog_details->spam == 1 
  12. return; 
  13.  
  14. $old_blog = $wpdb->blogid; 
  15. switch_to_blog( $blog_id ); 
  16. switch_to_blog( $old_blog );