[wp-trac] [WordPress Trac] #10545: _publish_post_hook (adding to postmeta existing hooks)

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 25 04:57:14 UTC 2010


#10545: _publish_post_hook (adding to postmeta existing hooks)
--------------------------+-------------------------------------------------
 Reporter:  butuzov       |       Owner:                                               
     Type:  defect (bug)  |      Status:  new                                          
 Priority:  normal        |   Milestone:  3.0                                          
Component:  Optimization  |     Version:  2.8.1                                        
 Severity:  normal        |    Keywords:  has-patch, publish_post_hook, pings, postmeta
--------------------------+-------------------------------------------------

Comment(by nacin):

 We shouldn't be removing postmeta on a status change.

 Regarding the patch, no need to check get_post_meta before choosing
 between update_post_meta and add_post_meta. update will add if the
 key/value doesn't exist.

 I imagine there's a reason for a direct query there.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10545#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list