Tagged Questions
1
vote
1answer
119 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
181 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
618 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
...