你可以在你的主题函数里试试这个。php:
它是达贡设计的一个功能
function dddn_process($id) {
global $wpdb;
$tp = $wpdb->prefix;
$result = $wpdb->get_row("
SELECT post_status, post_title, user_login, user_nicename, display_name
FROM {$tp}posts, {$tp}users
WHERE {$tp}posts.post_author = {$tp}users.ID
AND {$tp}posts.ID = \'$id\'
");
if ($result->post_status == "publish") {
$message = "";
$message .= "A new post was submitted on \'" . get_bloginfo(\'name\') . "\'\\n\\n";
$message .= "Title: " . $result->post_title . "\\n\\n";
$message .= "Author: " . $result->display_name . "\\n\\n";
$message .= "Link: " . get_permalink($id);
$subject = "Post Submitted on \'" . get_bloginfo(\'name\') . "\'";
$recipient = get_bloginfo(\'admin_email\');
mail($recipient, $subject, $message);
}
}
add_action(\'publish_post\', \'dddn_process\');