mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-23 15:19:15 +00: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. Built from https://develop.svn.wordpress.org/trunk@59788 git-svn-id: http://core.svn.wordpress.org/trunk@59130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
342c3037df
commit
d76c427a42
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59787';
|
||||
$wp_version = '6.8-alpha-59788';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user