wp_should_upgrade_global_tables
Filters if upgrade routines should be run on global tables.
Description
Parameters (1)
- 0. $should_upgrade (bool)
- Whether to run the upgrade routines on global tables.
Usage
- To run the hook, copy the example below.
- $should_upgrade = apply_filters( 'wp_should_upgrade_global_tables', $should_upgrade );
- if ( !empty( $should_upgrade ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_should_upgrade_global_tables callback
- function filter_wp_should_upgrade_global_tables( $should_upgrade ) {
- // make filter magic happen here...
- return $should_upgrade;
- };
- // add the filter
- add_filter( 'wp_should_upgrade_global_tables', 'filter_wp_should_upgrade_global_tables', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- 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
- return apply_filters( 'wp_should_upgrade_global_tables', $should_upgrade );