[wp-trac] [WordPress Trac] #20259: WP_Post
WordPress Trac
wp-trac at lists.automattic.com
Mon Mar 19 03:54:49 UTC 2012
#20259: WP_Post
-------------------------+-----------------------------
Reporter: braydonf | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
-------------------------+-----------------------------
A class to group all related template tags/functions for a post so that
the global $post variable isn't required to be used from template tags.
All existing template tags would continue to work, as-is, and this would
provide a new API for writing templates.
Each post_type could have it's own class that would be extended based on a
standard WP_Post class.
Here are some ideas for similar functionality and use:
||Template Tag||WP_Post function||
||get_permalink()||$post->permalink()||
||the_title()||$post->title()||
||the_content()||$post->body()||
||the_excerpt()||$post->excerpt()||
||the_date()||$post->date()||
||get_post_meta()||$post->meta()||
||get_children()||$post->attachments()||
||the_post_thumbnail()||$post->image()||
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20259>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list