[wp-trac] [WordPress Trac] #12267: Upgrade loop objects to provide identical presentational interfaces.
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 8 15:38:04 UTC 2011
#12267: Upgrade loop objects to provide identical presentational interfaces.
-------------------------+-----------------------------
Reporter: andy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: 3.2-early |
-------------------------+-----------------------------
Comment (by filosofo):
Replying to [comment:39 scribu]:
> {{{
> function __call( $method, $args ) {
> array_unshift( $args, $this );
> return do_action_ref_array( "post_{$method}", $args );
> }
> }}}
Also, I think this in addition to making things devilishly hard to debug,
misses one of the big benefits of this proposal, which is having the same
set of standard properties and methods across different types of objects.
For example, I want to be able to be able to return all sorts of objects
after a search. Then I should be able to iterate over all of them with
links and summaries, etc., agnostic about the particular kind of object
returned. That way categories, posts, pages, custom post types, etc., can
all be part of the Loop and use the same link, headline, and paragraph
markup.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12267#comment:42>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list