Skip to content

Commit 86f31c8

Browse files
Coding Standards: Use strict comparison in wp_check_for_changed_dates().
Follow-up to [42401]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59593 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 287b2f8 commit 86f31c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/wp-includes/post.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7255,12 +7255,14 @@ function wp_check_for_changed_dates( $post_id, $post, $post_before ) {
72557255
$new_date = gmdate( 'Y-m-d', strtotime( $post->post_date ) );
72567256

72577257
// Don't bother if it hasn't changed.
7258-
if ( $new_date == $previous_date ) {
7258+
if ( $new_date === $previous_date ) {
72597259
return;
72607260
}
72617261

72627262
// We're only concerned with published, non-hierarchical objects.
7263-
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
7263+
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === $post->post_type && 'inherit' === $post->post_status ) )
7264+
|| is_post_type_hierarchical( $post->post_type )
7265+
) {
72647266
return;
72657267
}
72667268

0 commit comments

Comments
 (0)