Switch language

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




wp_throttle_comment_flood [ WordPress Function ]

wp_throttle_comment_flood ( $block, $time_lastcomment, $time_newcomment )
Parameters:
  • (bool) $block Whether plugin has already blocked comment.
  • (int) $time_lastcomment Timestamp for last comment.
  • (int) $time_newcomment Timestamp for new comment.
Returns:
  • (bool) Whether comment should be blocked.
Defined at:



Whether comment should be blocked because of comment flood.

Source


<?php
function wp_throttle_comment_flood($block$time_lastcomment$time_newcomment) {
    if ( 
$block // a plugin has already blocked... we'll let that decision stand
        
return $block;
    if ( (
$time_newcomment $time_lastcomment) < 15 )
        return 
true;
    return 
false;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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