mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 04:20:01 +01:00
Coding Standards: Use strict comparison in WP_Query::is_page()
and ::is_single()
.
Follow-up to [29039]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e9b075e543
commit
fc8fa6a615
@ -4533,9 +4533,10 @@ class WP_Query {
|
||||
if ( ! strpos( $pagepath, '/' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$pagepath_obj = get_page_by_path( $pagepath );
|
||||
|
||||
if ( $pagepath_obj && ( $pagepath_obj->ID == $page_obj->ID ) ) {
|
||||
if ( $pagepath_obj && ( $pagepath_obj->ID === $page_obj->ID ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -4643,9 +4644,10 @@ class WP_Query {
|
||||
if ( ! strpos( $postpath, '/' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$postpath_obj = get_page_by_path( $postpath, OBJECT, $post_obj->post_type );
|
||||
|
||||
if ( $postpath_obj && ( $postpath_obj->ID == $post_obj->ID ) ) {
|
||||
if ( $postpath_obj && ( $postpath_obj->ID === $post_obj->ID ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user