[wp-trac] [WordPress Trac] #6192: potential add_meta_box() bug

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 12 18:59:43 GMT 2008


#6192: potential add_meta_box() bug
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous
     Type:  defect             |      Status:  new      
 Priority:  normal             |   Milestone:  2.5      
Component:  General            |     Version:  2.5      
 Severity:  normal             |    Keywords:           
-------------------------------+--------------------------------------------
 in add_meta_box(),


 {{{
 $wp_meta_boxes[$page][$context][] = array(’id’ => $id, ‘title’ => $title,
 ‘callback’ => $callback);

 }}}

 should probably be:


 {{{
 $wp_meta_boxes[$page][$context][$id] = array(’id’ => $id, ‘title’ =>
 $title, ‘callback’ => $callback);

 }}}

 to avoid duplicate IDs. I've at least one use-case where I'd like to use
 the same box with two different plugins -- and the current implementation
 will force me to scan/edit $wp_meta_boxes directly.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6192>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list