mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
Merge pull request #1382 from ultimatemember/fix/issue1381
Menu broken with 2.8.0 update (CU-86cu48dm7)
This commit is contained in:
@@ -72,9 +72,9 @@ if ( ! is_admin() ) {
|
||||
$visible = true;
|
||||
|
||||
// Hide any item that is the child of a hidden item.
|
||||
if ( isset( $item->menu_item_parent ) && in_array( $item->menu_item_parent, $hide_children_of, true ) ) {
|
||||
if ( isset( $item->menu_item_parent ) && in_array( absint( $item->menu_item_parent ), $hide_children_of, true ) ) {
|
||||
$visible = false;
|
||||
$hide_children_of[] = $item->ID; // for nested menus
|
||||
$hide_children_of[] = absint( $item->ID ); // for nested menus
|
||||
}
|
||||
|
||||
if ( isset( $mode ) && $visible ) {
|
||||
@@ -118,7 +118,7 @@ if ( ! is_admin() ) {
|
||||
|
||||
// unset non-visible item
|
||||
if ( ! $visible ) {
|
||||
$hide_children_of[] = $item->ID; // store ID of item
|
||||
$hide_children_of[] = absint( $item->ID ); // store ID of item
|
||||
} else {
|
||||
$filtered_items[] = $item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user