Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#6192 closed defect (bug) (fixed)

potential add_meta_box() bug

Reported by: Denis-de-Bernardy Owned by: ryan
Priority: normal Milestone: 2.6
Component: General Version: 2.5
Severity: normal Keywords:
Cc: Focuses:

Description

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.

Change History (5)

#1 @ryan
19 years ago

  • Owner changed from anonymous to ryan

#2 @Denis-de-Bernardy
19 years ago

any odds this can make it in 2.5.1?

D.

#3 @ryan
19 years ago

  • Resolution → fixed
  • Status new → closed

(In [7718]) Key meta box array by id. Props Denis-de-Bernardy. fixes #6192 for 2.5

#4 @ryan
19 years ago

(In [7719]) Key meta box array by id. Props Denis-de-Bernardy. fixes #6192 for trunk

Note: See TracTickets for help on using tickets.