WordPress开发者和主题制作者的搜索引擎



wp_defer_term_counting ›

Since2.5.0
已弃用n/a
wp_defer_term_counting ( $defer = null )
参数:
  • (bool) $defer Optional. Enable if true, disable if false.
    Required: No
    默认: null
返回:
  • (bool) Whether term counting is enabled or disabled.
定义在:
文档:

Enable or disable term counting.



源码

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