diff --git a/wp-admin/post.php b/wp-admin/post.php index 1c7dee22fa..c3c56aa298 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -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: diff --git a/wp-comments-post.php b/wp-comments-post.php index 14b2f44f28..27b484f271 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -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' diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 2e6bd3a408..3d1e1be22a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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); diff --git a/wp-trackback.php b/wp-trackback.php index 76367eb6d1..e41de3ad1b 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -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); } } ?> \ No newline at end of file