gglstmp_check_post_status

The Google Sitemap by BestWebSoft gglstmp check post status function.

Description

gglstmp_check_post_status( $new_status, $old_status, $post ); 

Parameters (3)

0. $new_status
The new status.
1. $old_status
The old status.
2. $post
The post.

Usage

  1. if ( !function_exists( 'gglstmp_check_post_status' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/google-sitemap-plugin.php'; 
  3.  
  4. // The new status. 
  5. $new_status = null; 
  6.  
  7. // The old status. 
  8. $old_status = null; 
  9.  
  10. // The post. 
  11. $post = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = gglstmp_check_post_status($new_status, $old_status, $post); 
  15.  

Defined (1)

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

/google-sitemap-plugin.php  
  1. function gglstmp_check_post_status( $new_status, $old_status, $post ) { 
  2. if ( ! wp_is_post_revision( $post->ID ) ) { 
  3. global $gglstmp_update_sitemap; 
  4. if ( 'publish' == $new_status || 'trash' == $new_status || 'future' == $new_status ) { 
  5. $gglstmp_update_sitemap = true; 
  6. } elseif ( ( 'publish' == $old_status || 'future' == $old_status ) && 
  7. ( 'auto-draft' == $new_status || 'draft' == $new_status || 'private' == $new_status || 'pending' == $new_status ) ) { 
  8. $gglstmp_update_sitemap = true;