Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#12450 closed enhancement (duplicate)

Improve meta_box api

Reported by: prettyboymp's profile 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)

#1 @prettyboymp
15 years ago

  • Cc mpretty@… added

#2 @mikeschinkel
14 years ago

  • Cc mikeschinkel@… added

+1

I needed all that this past weekend. :)

#3 @scribu
14 years ago

  • Cc scribu@… added
  • Component changed from General to Administration

#4 @scribu
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

#5 @nacin
14 years ago

  • Milestone Awaiting Triage deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Let's go with #15066 as a duplicate.

Note: See TracTickets for help on using tickets.