Opened 15 years ago
Closed 14 years ago
#12450 closed enhancement (duplicate)
Improve meta_box api
Reported by: | prettyboymp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
I think we should work on improving the API for handling meta_boxes, specifically when it comes to the ones dealing with post_meta.
Specific improvements I'd like to see are:
Automatic handling of checking against the revision, DOING_CRON, DOING_AJAX, and DOING_AUTOSAVE before firing the save method.
A registration method similar to registering post_types so that plugins that add post_types can see registered meta_handlers like registered post_types can be seen.
Built in handling for the post_type_supports() methods based on arguments when registering the meta_handler.
Change History (5)
#4
@
14 years ago
Meta boxes could have a class similar to WP_Widget.
One of the most useful features of this class could be to allow boxes to be configurable (think dashboard RSS box).
Automatic handling of checking against the revision, DOING_CRON, DOING_AJAX, and DOING_AUTOSAVE before firing the save method.
Note that post boxes are just a subset. So the correct class hierarchy would be:
WP_Box > WP_Box_Post > WP_Box_Post_Publish
+1
I needed all that this past weekend. :)