[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 27 19:04:07 UTC 2012
#21309: Introduce WP_Post class
----------------------------+------------------
Reporter: scribu | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------
Comment (by scribu):
How about adding some more magic for custom fields, like we did in
WP_User:
{{{
$some_value = $post->some_key;
}}}
would be equivalent to:
{{{
$some_value = sanitize_post_field( 'some_key', get_post_meta( $post->ID,
'some_key', true ), $post->ID, 'display' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21309#comment:22>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list