[wp-trac] [WordPress Trac] #16802: is_page() doesn't accept a full path
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 10 15:20:16 UTC 2011
#16802: is_page() doesn't accept a full path
-------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.1
Severity: minor | Resolution:
Keywords: 2nd-opinion |
-------------------------+------------------------------
Comment (by kawauso):
{{{
function is_page_path( $path ) {
$page = get_page_by_path( $path );
return $page ? is_page( $page->ID ) : null;
}
}}}
Something like that?
-1 to having this in core, it seems like a niche and untidy way of doing
things.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16802#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list