wp_should_upgrade_global_tables

Filters if upgrade routines should be run on global tables.

Description

apply_filters( 'wp_should_upgrade_global_tables', (bool) $should_upgrade ); 

Parameters (1)

0. $should_upgrade (bool)
Whether to run the upgrade routines on global tables.

Usage

To run the hook, copy the example below.
  1. $should_upgrade = apply_filters( 'wp_should_upgrade_global_tables', $should_upgrade ); 
  2.  
  3. if ( !empty( $should_upgrade ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_should_upgrade_global_tables callback 
  2. function filter_wp_should_upgrade_global_tables( $should_upgrade ) { 
  3. // make filter magic happen here... 
  4. return $should_upgrade
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_should_upgrade_global_tables', 'filter_wp_should_upgrade_global_tables', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_should_upgrade_global_tables', 'filter_wp_should_upgrade_global_tables', 10, 1 ); 

Defined (1)

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

/wp-admin/includes/upgrade.php  
  1. return apply_filters( 'wp_should_upgrade_global_tables', $should_upgrade );