0
votes
1answer
56 views

Is it possible to cancel a post status transition?

Question I want to cancel pending_to_published actions: Posts that match certain criteria should that go from pending to published should stay pending. (Alternatively, I need a to make add an ...
1
vote
1answer
314 views

Count posts by type including drafts and pending posts

I had this function that counts posts number by type (taken from wordpress codex) function count_user_posts_by_type($userid, $post_type) { global $wpdb; $where = ...
0
votes
1answer
796 views

How to change post status in hook?

I have similar problem as described in How to trap "Publish" button to check for meta box validation? Answer there is to hook into save_post and change post type. How can I do it? I try to ...
2
votes
1answer
978 views

What action is called when drafts are saved?

I would like to add a metadata field to the current post based on a checkbox in a custom meta box to be able to toggle my custom plugin on a post by post basis. For this I coded the following things ...