Make WordPress Core


Ignore:
Timestamp:
07/11/2020 09:46:29 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Menus: Simplify the test for wp_update_nav_menu_item() with special characters in category name.

The menu-item-title value is saved as a post_title property, so the resulting property can be checked directly, without a callback.

Follow-up to [48416].

See #48011.

File:
1 edited

Legend:

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

    r48416 r48439  
    493493        }
    494494
    495         if ( wp_unslash( $args['menu-item-title'] ) == wp_specialchars_decode( $original_title ) ) {
     495        if ( wp_unslash( $args['menu-item-title'] ) === wp_specialchars_decode( $original_title ) ) {
    496496            $args['menu-item-title'] = '';
    497497        }
Note: See TracChangeset for help on using the changeset viewer.