[wp-trac] [WordPress Trac] #9073: wp_insert_post_data should allow to modify categories and tags too
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 17 12:06:23 UTC 2009
#9073: wp_insert_post_data should allow to modify categories and tags too
-------------------------+--------------------------------------------------
Reporter: sirzooro | Owner: anonymous
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.9
Component: General | Version: 2.7
Severity: normal | Resolution:
Keywords: needs-patch |
-------------------------+--------------------------------------------------
Comment(by sirzooro):
I want to check how many tags post have, when post is saved. If there will
be too many (e.g. 15, when limit is set to 10), I would like to extra ones
(in this case remove last 5). I cannot do this with wp_insert_post_data
filter - it allows to count tags, but does not allow to modify them. The
same applies for categories and custom taxonomies too.
I know that it is possible to modify $_POST array directly (e.g. in init
hook, or even earlier), but this approach is a bit tricky. So I would like
to see easier method.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9073#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list