ID ); $removed_args = array( 'action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce', ); $original_title = ''; if ( 'taxonomy' == $item->type ) { $original_title = get_term_field( 'name', $item->object_id, $item->object, 'raw' ); if ( is_wp_error( $original_title ) ) $original_title = false; } elseif ( 'post_type' == $item->type ) { $original_object = get_post( $item->object_id ); $original_title = get_the_title( $original_object->ID ); } $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'), ); $title = $item->title; if ( ! empty( $item->_invalid ) ) { $classes[] = 'menu-item-invalid'; /* translators: %s: title of menu item which is invalid */ $title = sprintf( esc_html__( '%s (Invalid)', 'apollo13-framework-extensions' ), $item->title ); } elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) { $classes[] = 'pending'; /* translators: %s: title of menu item in draft status */ $title = sprintf( esc_html__( '%s (Pending)', 'apollo13-framework-extensions' ), $item->title ); } $title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label; $sub_menu_style = ''; if ( 0 == $depth ) $sub_menu_style = 'display: none;'; //mega menu check if( $depth === 0 ){ if($item->a13_mega_menu){ $mega_menu_enabled = true; $classes[] = 'mega-menu-enabled'; } else{ $mega_menu_enabled = false; } } if( $depth === 1 && $mega_menu_enabled){ $classes[] = 'mega-menu-enabled'; } ?>