Coding Standards: Use strict comparison in wp_check_for_changed_dates().

Follow-up to [42401].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59593


git-svn-id: http://core.svn.wordpress.org/trunk@58979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-01-08 17:48:21 +00:00
parent c90837121a
commit 19d5011bff
2 changed files with 5 additions and 3 deletions

View File

@ -7255,12 +7255,14 @@ function wp_check_for_changed_dates( $post_id, $post, $post_before ) {
$new_date = gmdate( 'Y-m-d', strtotime( $post->post_date ) );
// Don't bother if it hasn't changed.
if ( $new_date == $previous_date ) {
if ( $new_date === $previous_date ) {
return;
}
// We're only concerned with published, non-hierarchical objects.
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === $post->post_type && 'inherit' === $post->post_status ) )
|| is_post_type_hierarchical( $post->post_type )
) {
return;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59592';
$wp_version = '6.8-alpha-59593';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.