mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Allow multiple args to be passed to apply_filters and do_action. Move some code into merge_filters. Use call_user_func_array so that args can be passed by reference. Provide a default for the second arg to do_action so that we do not have to put empty strings in the do_action calls. Bug 768. Hat tip: morganiq
git-svn-id: https://develop.svn.wordpress.org/trunk@2184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -384,7 +384,7 @@ function user_can_edit_user($user_id, $other_user) {
|
||||
function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) {
|
||||
global $wpdb;
|
||||
|
||||
do_action('wp_blacklist_check', '');
|
||||
do_action('wp_blacklist_check');
|
||||
|
||||
if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) {
|
||||
foreach ($chars[1] as $char) {
|
||||
@@ -449,7 +449,7 @@ function wp_new_comment( $commentdata, $spam = false ) {
|
||||
$time_lastcomment = mysql2date('U', $lasttime);
|
||||
$time_newcomment = mysql2date('U', $now_gmt);
|
||||
if ( ($time_newcomment - $time_lastcomment) < 15 ) {
|
||||
do_action('comment_flood_trigger', '');
|
||||
do_action('comment_flood_trigger');
|
||||
die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user