gglstmp_delete_sitemap

The Google Sitemap by BestWebSoft gglstmp delete sitemap function.

Description

gglstmp_delete_sitemap( $blog_id ); 

Parameters (1)

0. $blog_id
The blog id.

Usage

  1. if ( !function_exists( 'gglstmp_delete_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_delete_sitemap($blog_id); 
  9.  

Defined (1)

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

/google-sitemap-plugin.php  
  1. function gglstmp_delete_sitemap( $blog_id ) { 
  2.  
  3. $site_url = preg_replace( "/[^a-zA-Z*-**-*0-9\s]/", '_', str_replace( 'http://', '', str_replace( 'https://', '', get_site_url( $blog_id ) ) ) ); 
  4. $file = ABSPATH . "sitemap_{$site_url}.xml"; 
  5.  
  6. if ( file_exists( $file ) ) 
  7. unlink( $file );