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:
Sergey Biryukov 2025-02-08 15:30:08 +00:00
parent e9b075e543
commit fc8fa6a615

View File

@ -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;
}
}