[wp-hackers] Custom Post - implementation specifics

Stephen Rider wp-hackers at striderweb.com
Thu Dec 3 23:08:23 UTC 2009

On Dec 3, 2009, at 4:52 PM, Stephen Rider wrote:

> On Dec 3, 2009, at 4:43 PM, Eric Marden wrote:
>> What do you mean by the full post API? What can't you do with wp_insert_post, wp_update_post, wp_delete_post, get_post, get_posts, add_post_meta, update_post_meta, delete_post_meta, and friends?
> Creating a core create_edit_page() function of some sort.  Quoting myself:
> "I need an edit page for Post Type X.  It needs (for example) the Main Text Box, Tags, and Excerpt.  Bang!  Done."
> On Dec 3, 2009, at 1:41 PM, Stephen Rider wrote:

in separate email:
>> What we need are more functions like the_editor() that make adding different parts of the screen(s) to the page, without copying a lot of markup.

Eric -- this suggests a good approach.  Instead of one mega-"add edit page" function, perhaps simply make it so every stock edit page element has a small function that creates it.  Thus the code that creates the standard Edit Post page might simply look like:


or maybe better:


Question for those more familiar:  What functions of this type already exist?  I don't mean the generic add_meta(), I mean dedicated functions for editor elements....


Stephen Rider

More information about the wp-hackers mailing list