id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses
18179 WP_Meta_Box koopersmith "Ryan, Nacin, and I would like to see a Meta Box class in 3.3. Let's make it happen.
Attached is a first pass (in plugin form, for ease). It provides a basic API and supports multiple instances. Instances are stored in a static meta box registry, which should require minimal interaction.
Keep in mind that meta boxes are not just registered on CPT pages — they are also used on the dashboard, in menus, and in custom UIs. The parent class should be suitable for each of these cases.
I think we should move caps to the main Meta Box class (and allow subclasses/instances to specify/override the cap through $args), and also provide $args to enable/disable any checks we perform before saving (e.g. autosave, etc).
It would also be interesting to integrate this with the proposed metadata API improvements.
See #15066 for prior discussion." feature request new normal Future Release Administration normal has-patch 3.4-early