@@ 2235-2246 (lines=12) @@ | ||
2232 | * @param bool $defer |
|
2233 | * @return bool |
|
2234 | */ |
|
2235 | function wp_defer_comment_counting($defer=null) { |
|
2236 | static $_defer = false; |
|
2237 | ||
2238 | if ( is_bool($defer) ) { |
|
2239 | $_defer = $defer; |
|
2240 | // flush any deferred counts |
|
2241 | if ( !$defer ) |
|
2242 | wp_update_comment_count( null, true ); |
|
2243 | } |
|
2244 | ||
2245 | return $_defer; |
|
2246 | } |
|
2247 | ||
2248 | /** |
|
2249 | * Updates the comment count for post(s). |
@@ 2816-2827 (lines=12) @@ | ||
2813 | * @param bool $defer Optional. Enable if true, disable if false. |
|
2814 | * @return bool Whether term counting is enabled or disabled. |
|
2815 | */ |
|
2816 | function wp_defer_term_counting($defer=null) { |
|
2817 | static $_defer = false; |
|
2818 | ||
2819 | if ( is_bool($defer) ) { |
|
2820 | $_defer = $defer; |
|
2821 | // flush any deferred counts |
|
2822 | if ( !$defer ) |
|
2823 | wp_update_term_count( null, null, true ); |
|
2824 | } |
|
2825 | ||
2826 | return $_defer; |
|
2827 | } |
|
2828 | ||
2829 | /** |
|
2830 | * Updates the amount of terms in taxonomy. |