sc0ttkclark/wordpress-fields-api

Implementation: Post editor

sc0ttkclark opened this issue · 7 comments

  • Section - Should call add_meta_box
  • Field - Should call register_meta
  • Display fields for section inside of meta box
  • Save handling in editor
  • Pick up field saves from wp_insert_post( $post_data ) just like terms allows, and process through Fields API (maybe this can apply to the item above)
  • Register core fields

Future ability to add fields to display in:

  • edit_form_after_title
  • post_submitbox_misc_actions

@tomharrigan feel free to update the task list on this one

Will it be possible to use other locations in the Edit Post page besides a metabox? e.g. edit_form_after_title, post_submitbox_misc_actions?

That's the plan, but initially just covering meta boxes for the first pass.

helen commented

Was about to comment to the same effect - I really want us to break out of thinking of metaboxes as THE UI paradigm for a form section, plus those other hooks for fields are super useful and get used frequently.

Updated issue description

@ericandrewlewis++
@helenhousandi++

Totally on the same page with you here :)

@Idealien has joined the effort, he was working on an example Book CPT and registering fields for it.

https://github.com/Idealien/wordpress-fields-api-examples/blob/master/examples/class-cpt-book.php

It still needs some work and we’ll want to work out meta box handling etc in our main post editor implementation — this should mainly handle registering the post type / fields for example purposes, maybe some example callbacks / hooks