[wp-hackers] Limit number of post_type published by user
wphackers at jakemgold.myfastmail.com
Mon Jul 19 15:22:47 UTC 2010
You could theoretically hook the "new post" admin page header (and
save post to be safe), check whether the current user already has a post
of that post type, and redirect / wp_die or otherwise "handle" an event
where they do.
The action hooks to look for are "load-post-new.php" and "save_post".
Just a pointer in the general direction.
On 7/19/2010 11:08 AM, Joaquin Rodriguez Montero wrote:
> Hi guys,
> I'm driving mad finding out how could I achieve this. Say I have a custom
> post_type "Listings" and I want each registered author to be allowed to
> publish just 1 entry of this type, is that possible?
> A work around (just thought about it before sending this email) will be to
> create a new entry "Listing" automatically for every new author and allow
> him to edit that one (as it'll be assigned to him that shouldn't be a
> problem) and won't allow him to publish a new one.. but it's tricky..
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers