Changeset 55352
- Timestamp:
- 02/16/2023 12:02:21 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r55349 r55352 201 201 /* 202 202 * Fix invalid `menu_item_parent`. See: https://core.trac.wordpress.org/ticket/56926. 203 * Compare as strings. Plugins may change the ID to string. 204 * To avoid modifying the object, use `strval()` rather than casting to (string). 203 * Compare as strings. Plugins may change the ID to a string. 205 204 */ 206 if ( strval( $menu_item->ID ) === strval( $menu_item->menu_item_parent )) {205 if ( (string) $menu_item->ID === (string) $menu_item->menu_item_parent ) { 207 206 $menu_item->menu_item_parent = 0; 208 207 }
Note: See TracChangeset
for help on using the changeset viewer.