您可以使用\'wp_insert_post_data\'
钩子以检查用户是否不是管理员,以及帖子状态是否为allready“published”,将其更改为“pending”:
add_filter(\'wp_insert_post_data\',\'re_aprove\');
function re_aprove($data , $postarr){
global $current_user;
get_currentuserinfo();
//check if current user is not admin
if (!current_user_can(\'manage_options\')){
if ($data[\'post_status\'] = "publish"){
$data[\'post_status\'] = "pending";
}
}
return $data;
}