[wp-trac] [WordPress Trac] #19572: switch_to_post() stack implementation (similar to switch_to_blog())
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 15 22:01:49 UTC 2011
#19572: switch_to_post() stack implementation (similar to switch_to_blog())
-------------------------+------------------------------
Reporter: alexkingorg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by nacin):
I think this is interesting. It may be better (in terms of long-term
architecture) to come up with something less procedural and more object-
oriented (though also much more complicated), such as WP_Post coming back
from the DB and get_post()/WP_Query, thus the ability to do
$post->content(), $post->title(), etc. The various template tags would
then need to be reworked to rely on the current $post global. It would be
similar to how is_* methods work against WP_Query.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19572#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list