Switch language

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




wp_defer_comment_counting [ WordPress Function ]

wp_defer_comment_counting ( $defer = null )
Parameters:
  • (bool) $defer
Returns:
  • (unknown)
Defined at:



Whether to defer comment counting.

When setting $defer to true, all post comment counts will not be updated until $defer is set to false. When $defer is set to false, then all previously deferred updated post comment counts will then be automatically updated without having to call wp_update_comment_count() after.

Source


<?php
function wp_defer_comment_counting($defer=null) {
    static 
$_defer false;

    if ( 
is_bool($defer) ) {
        
$_defer $defer;
        
// flush any deferred counts
        
if ( !$defer )
            
wp_update_comment_countnulltrue );
    }

    return 
$_defer;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics