Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp-admin/includes/class-w…
Browse files Browse the repository at this point in the history
…alker-nav-menu-edit.php`.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50767 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Apr 17, 2021
1 parent 337fcf6 commit 5e8b165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-admin/includes/class-walker-nav-menu-edit.php
Expand Up @@ -92,7 +92,7 @@ public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
$classes = array(
'menu-item menu-item-depth-' . $depth,
'menu-item-' . esc_attr( $item->object ),
'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive' ),
'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id === $_GET['edit-menu-item'] ) ? 'active' : 'inactive' ),
);

$title = $item->title;
Expand All @@ -110,7 +110,7 @@ public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
$title = ( ! isset( $item->label ) || '' === $item->label ) ? $title : $item->label;

$submenu_text = '';
if ( 0 == $depth ) {
if ( 0 === $depth ) {
$submenu_text = 'style="display: none;"';
}

Expand Down Expand Up @@ -157,7 +157,7 @@ public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) {
?>
</span>
<?php
if ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) {
if ( isset( $_GET['edit-menu-item'] ) && $item_id === $_GET['edit-menu-item'] ) {
$edit_url = admin_url( 'nav-menus.php' );
} else {
$edit_url = add_query_arg(
Expand Down

0 comments on commit 5e8b165

Please sign in to comment.