From e0d7582c460227cbc83c9126b357f04a9f5af08f Mon Sep 17 00:00:00 2001 From: rboren Date: Sun, 6 Feb 2005 03:40:08 +0000 Subject: [PATCH] Correctly add args to strings that contain only a query string and not a full URI. git-svn-id: http://svn.automattic.com/wordpress/trunk@2227 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 2 +- wp-includes/feed-functions.php | 2 +- wp-includes/functions-post.php | 6 +++--- wp-includes/functions.php | 2 +- wp-includes/template-functions-author.php | 2 +- wp-includes/template-functions-category.php | 12 +++++------ wp-includes/template-functions-general.php | 12 +++++------ wp-includes/template-functions-links.php | 24 ++++++++++----------- wp-includes/template-functions-post.php | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 6cb02f666..261540a1a 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -598,7 +598,7 @@ function wp_set_comment_status($comment_id, $comment_status) { } if ($wpdb->query($query)) { - do_action('wp_set_comment_status', $comment_id); + do_action('wp_set_comment_status', $comment_id, $comment_status); return true; } else { return false; diff --git a/wp-includes/feed-functions.php b/wp-includes/feed-functions.php index 03396e294..8f144c25f 100644 --- a/wp-includes/feed-functions.php +++ b/wp-includes/feed-functions.php @@ -131,7 +131,7 @@ function the_category_rss($type = 'rss') { $the_list .= "\n\t$category->cat_name"; } } - echo apply_filters('the_category_rss', $the_list); + echo apply_filters('the_category_rss', $the_list, $type); } function rss_enclosure() { diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index e1d42527d..dcac36bb2 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -389,7 +389,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', $author, $email, $url, $comment, $user_ip, $user_agent); if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { foreach ($chars[1] as $char) { @@ -461,7 +461,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', $time_lastcomment, $time_newcomment); die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); } } @@ -482,7 +482,7 @@ function wp_new_comment( $commentdata, $spam = false ) { "); $comment_id = $wpdb->insert_id; - do_action('comment_post', $comment_id); + do_action('comment_post', $comment_id, $approved); if ( 'spam' !== $approved ) { // If it's spam save it silently for later crunching if ( '0' == $approved ) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ab2da32ed..d3988c5e7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1669,7 +1669,7 @@ function add_query_arg() { $query = $parts[1]; } } - else { + else if (! ststr($uri, '/')) { $base = $uri . '?'; $query = ''; } diff --git a/wp-includes/template-functions-author.php b/wp-includes/template-functions-author.php index b6354db01..ccf61de87 100644 --- a/wp-includes/template-functions-author.php +++ b/wp-includes/template-functions-author.php @@ -136,7 +136,7 @@ function get_author_link($echo = false, $author_id, $author_nicename) { $link = get_settings('home') . trailingslashit($link); } - $link = apply_filters('author_link', $link); + $link = apply_filters('author_link', $link, $author_id, $author_nicename); if ($echo) echo $link; return $link; } diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index c1b61558e..6d5f91406 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -39,7 +39,7 @@ function get_category_link($echo = false, $category_id, $category_nicename) { $catlink = str_replace('%category%', $category_nicename, $catlink); $catlink = get_settings('home') . trailingslashit($catlink); } - $catlink = apply_filters('category_link', $catlink); + $catlink = apply_filters('category_link', $catlink, $category_id, $category_nicename); if ($echo) echo $catlink; return $catlink; } @@ -99,7 +99,7 @@ function the_category($separator = '', $parents='') { ++$i; } } - echo apply_filters('the_category', $thelist); + echo apply_filters('the_category', $thelist, $separator, $parents); } function get_the_category_by_ID($cat_ID) { @@ -173,7 +173,7 @@ function category_description($category = 0) { global $cat, $wpdb, $cache_categories; if (!$category) $category = $cat; $category_description = $cache_categories[$category]->category_description; - $category_description = apply_filters('category_description', $category_description); + $category_description = apply_filters('category_description', $category_description, $category); return $category_description; } @@ -212,7 +212,7 @@ function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_ if (intval($optionnone) == 1) echo "\t\n"; if ($categories) { foreach ($categories as $category) { - $cat_name = apply_filters('list_cats', $category->cat_name); + $cat_name = apply_filters('list_cats', $category->cat_name, $category); echo "\t