[wp-trac] Re: [WordPress Trac] #9039: Need a method to cancel post save and/or status change

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 4 13:46:34 GMT 2009


#9039: Need a method to cancel post save and/or status change
-------------------------+--------------------------------------------------
 Reporter:  sirzooro     |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.7.1    
Component:  General      |      Version:  2.7      
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by filosofo):

 Replying to [ticket:9039 sirzooro]:
 > I want to write plugin to check some of them (namely minimum post length
 and maximum number of outgoing links). Unfortunately the only way to do
 this in current WP version is via core files hacking, because existing
 actions fires after post is saved or its status is changed.

 You should be able to use the {{{wp_insert_post_data}}} filter: if you
 interrupt at that point, no posts database changes should be made.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/9039#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list