@@ 2063-2074 (lines=12) @@ | ||
2060 | * @param bool $defer |
|
2061 | * @return bool |
|
2062 | */ |
|
2063 | function wp_defer_comment_counting($defer=null) { |
|
2064 | static $_defer = false; |
|
2065 | ||
2066 | if ( is_bool($defer) ) { |
|
2067 | $_defer = $defer; |
|
2068 | // flush any deferred counts |
|
2069 | if ( !$defer ) |
|
2070 | wp_update_comment_count( null, true ); |
|
2071 | } |
|
2072 | ||
2073 | return $_defer; |
|
2074 | } |
|
2075 | ||
2076 | /** |
|
2077 | * Updates the comment count for post(s). |
@@ 3034-3045 (lines=12) @@ | ||
3031 | * @param bool $defer Optional. Enable if true, disable if false. |
|
3032 | * @return bool Whether term counting is enabled or disabled. |
|
3033 | */ |
|
3034 | function wp_defer_term_counting($defer=null) { |
|
3035 | static $_defer = false; |
|
3036 | ||
3037 | if ( is_bool($defer) ) { |
|
3038 | $_defer = $defer; |
|
3039 | // flush any deferred counts |
|
3040 | if ( !$defer ) |
|
3041 | wp_update_term_count( null, null, true ); |
|
3042 | } |
|
3043 | ||
3044 | return $_defer; |
|
3045 | } |
|
3046 | ||
3047 | /** |
|
3048 | * Updates the amount of terms in taxonomy. |