[wp-trac] [WordPress Trac] #17590: wp_list_pages() not setting "current_page_item" classes on custom post types
WordPress Trac
noreply at wordpress.org
Tue Feb 4 14:07:37 UTC 2014
#17590: wp_list_pages() not setting "current_page_item" classes on custom post
types
-------------------------------+------------------
Reporter: tobiasn | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Posts, Post Types | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses:
-------------------------------+------------------
Comment (by nacin):
[attachment:17590.diff] is a slightly more defensive approach.
get_post_type() simply returns the post type query variable, which could
very well have been changed to an array on pre_get_posts even after
is_singular was set in parse_query(). Instead, we can use the queried
object, which isn't foolproof either but is at least it's consistent for
what we're doing here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17590#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list