Make WordPress Core

Changeset 59584


Ignore:
Timestamp:
01/07/2025 03:46:25 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp_check_for_changed_slugs().

Follow-up to [4556], [4637], [34685].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59575 r59584  
    72087208function wp_check_for_changed_slugs( $post_id, $post, $post_before ) {
    72097209    // Don't bother if it hasn't changed.
    7210     if ( $post->post_name == $post_before->post_name ) {
     7210    if ( $post->post_name === $post_before->post_name ) {
    72117211        return;
    72127212    }
    72137213
    72147214    // We're only concerned with published, non-hierarchical objects.
    7215     if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
     7215    if ( ! ( 'publish' === $post->post_status || ( 'attachment' === $post->post_type && 'inherit' === $post->post_status ) )
     7216        || is_post_type_hierarchical( $post->post_type )
     7217    ) {
    72167218        return;
    72177219    }
Note: See TracChangeset for help on using the changeset viewer.