wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_defer_term_counting › WordPress Function

Since2.5.0
Deprecatedn/a
wp_defer_term_counting ( $defer = null )
Parameters:
  • (bool) $defer Optional. Enable if true, disable if false.
    Required: No
    Default: null
Returns:
  • (bool) Whether term counting is enabled or disabled.
Defined at:
Codex:

Enables or disables term counting.



Source

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;
}