Bulk post approval and publishing doesn’t work
The problem I can immediately see is, you’ve set: ‘post_status’ => ‘published’ This should be: ‘post_status’ => ‘publish’ Also, since you are only updating the post status, it’s less error prone and more appropriate to use wp_publish_post function instead of wp_update_post function. With this change, your karma_approve_all_posts() function will look like this: function karma_approve_all_posts( $posts … Read more