wp_defer_term_counting( bool $defer = null )
Enable or disable term counting.
Parameters
- $defer
-
(Optional) Enable if true, disable if false.
Default value: null
Return
(bool) Whether term counting is enabled or disabled.
Source
File: wp-includes/taxonomy.php
function wp_defer_term_counting($defer=null) {
static $_defer = false;
if ( is_bool($defer) ) {
$_defer = $defer;
// flush any deferred counts
if ( !$defer )
wp_update_term_count( null, null, true );
}
return $_defer;
}
Changelog
Version | Description |
---|---|
WP-2.5.0 | Introduced. |