|Reported by:||koopersmith||Owned by:|
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.
Change History (92)
- Keywords 3.4-early added
- Milestone changed from 3.3 to Future Release
- Type changed from task (blessed) to feature request
17 months ago
- Keywords needs-patch removed
- Milestone Future Release deleted
- Resolution set to maybelater
- Status changed from new to closed