#18787 closed enhancement (wontfix)
Let remove_meta_box be selective in terms of priorities
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
Right now remove_meta_box
actually acts as a ban_meta_box
... essentially any meta box with the same id, page, and context will be banned from the page, even if (re)added via another add_meta_box
call afterwards. Given that there's no nice replace_meta_box
, a nice option would be to allow remove_meta_box
to be called with a particular priority in mind, in which case we could easily add_meta_box
with that same priority right afterwards and, in practice, replace the meta box.
Attachments (1)
Change History (4)
#2
in reply to:
↑ 1
@
14 years ago
- Resolution set to wontfix
- Status changed from new to closed
Replying to nacin:
essentially any meta box with the same id, page, and context will be banned from the page, even if (re)added via another add_meta_box call afterwards.
Isn't that only for priority = core?
Indeed. (Regurgitating the lesson from our quick chat on IRC:) The solution is for non-core code to never add a meta box with priority "core," and even if you want to replace a "core" meta_box, you can simply do so by specifying priority "default" which will get sorted appropriately via the special case code in add_meta_box
.
Resolving wontfix.
Isn't that only for priority = core?