Additional plugin API hooks, extending moderation scheme to more fully cover trackbacks and pingbacks, cleanup of XML-RPC file.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a79d5712a
commit
0c1e3856b6
|
@ -378,6 +378,7 @@ switch($action) {
|
|||
pingBlogs($blog_ID);
|
||||
} // end if moving from draft/private to published
|
||||
if ($post_status == 'publish') {
|
||||
do_action('publish_post', $post_ID);
|
||||
// Trackback time.
|
||||
$to_ping = trim($wpdb->get_var("SELECT to_ping FROM $tableposts WHERE ID = $post_ID"));
|
||||
$pinged = trim($wpdb->get_var("SELECT pinged FROM $tableposts WHERE ID = $post_ID"));
|
||||
|
@ -407,6 +408,7 @@ switch($action) {
|
|||
$location = 'post.php';
|
||||
}
|
||||
header ('Location: ' . $location);
|
||||
do_action('edit_post', $post_ID);
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
|
@ -448,7 +450,7 @@ switch($action) {
|
|||
$sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
|
||||
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
||||
header ('Location: ' . $sendback);
|
||||
|
||||
do_action('delete_post', $post_ID);
|
||||
break;
|
||||
|
||||
case 'editcomment':
|
||||
|
@ -676,7 +678,7 @@ switch($action) {
|
|||
$referredby = $HTTP_POST_VARS['referredby'];
|
||||
if (!empty($referredby)) header('Location: ' . $referredby);
|
||||
else header ("Location: edit.php?p=$comment_post_ID&c=1#comments");
|
||||
|
||||
do_action('edit_comment', $post_ID);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -100,6 +100,8 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds
|
|||
wp_notify_postauthor($comment_ID, 'comment');
|
||||
}
|
||||
|
||||
do_action('comment_post', $comment_ID);
|
||||
|
||||
if ($email == '')
|
||||
$email = ' '; // this to make sure a cookie is set for 'no email'
|
||||
|
||||
|
|
|
@ -1567,6 +1567,7 @@ function get_posts($args) {
|
|||
}
|
||||
|
||||
function check_comment($author, $email, $url, $comment, $user_ip) {
|
||||
if (1 == get_settings('comment_moderation')) return false;
|
||||
$words = explode("\n", get_settings('moderation_keys') );
|
||||
foreach ($words as $word) {
|
||||
$word = trim($word);
|
||||
|
|
|
@ -86,6 +86,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
|
|||
if (get_settings('comments_notify'))
|
||||
wp_notify_postauthor($comment_ID, 'trackback');
|
||||
trackback_response(0);
|
||||
do_action('trackback_post', $comment_ID);
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue