#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.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
any odds this can make it in 2.5.1?
D.