Metadata UI / API status update

We’ve been hard at work the past many weeks on getting something ready for contributors to start adding their PR’s against. @mikeschinkel took the helm for the initial base, after many discussions came up with a brilliant first code PR to the project. In our Friday meeting, we presented the PR and merged it into the official master for the project.

You can start browsing through it now over at: https://github.com/wordpress-metadata/metadata-ui-api

Some notable items from this initial first draft:

  • Global functions to access class/method based architecture (register_*)
  • register_post_form( ‘meta_box_name’, ‘post_type’, $args ) — Add new forms to a post type (like meta boxes)
  • register_post_field( ‘meta_key’, ‘post_type’, $args ) — Add new fields to a post type
  • Initial support to expand the API for use with Comment types, Option Groups, and Users
  • Support for custom object types that aren’t WP object types, like for plugins that have their own custom tables
  • Very efficient registration limits ‘fixups’ until fields are called, so registering hundreds of fields won’t detrimentally affect timing (confirmed by initial benchmarking)
  • Storage handling broken up into meta, options, taxonomy terms, can be extended by plugins to add additional storage options (like in Pods, we have custom tables/columns available for custom fields)
  • WP_Html_Element class methods handle html element building and auto-sanitization for attributes

Our next steps are to continue testing the API and start having contributors join in (read: yes, YOU!). We’d like to start getting PR’s that add new field types and start working on unit testing next.

Also, a call-out to our UI / JS team, we’re ready for you now 🙂

#fields-api, #options-meta