[wp-trac] [WordPress Trac] #12966: get_post_types returning more than desired results
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 12 19:32:24 UTC 2010
#12966: get_post_types returning more than desired results
--------------------------+-------------------------------------------------
Reporter: michaelh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Template | Version: 3.0
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Comment(by rovo89):
An alternative to
{{{
if ( count(array_intersect_assoc(get_object_vars($obj), $args)) == $count
)
}}}
would be
{{{
if ( empty(array_diff_assoc($args, get_object_vars($obj))) )
}}}
which should provide the same functionality, but might be slightly faster.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12966#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list