Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Modules_Menu::nav_menu_walker( $walker )
Override the Admin Menu Walker
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Parameters Parameters
- $walker
-
(Required)
Return Return
(string)
Source Source
File: includes/modules/menus.php
public static function nav_menu_walker( $walker ) { global $wp_version; $bail_early = [ // WP 5.4 adds support for custom fields, no need to do this hack at all. version_compare( $wp_version, '5.4', '>=' ), // not sure about this one, was part of the original solution. doing_filter( 'plugins_loaded' ), // No need if its already loaded by another plugin. $walker === 'Walker_Nav_Menu_Edit_Custom_Fields', ]; if ( in_array( true, $bail_early ) ) { return $walker; } // Load custom nav menu walker class for custom field compatibility. if ( ! class_exists( 'Walker_Nav_Menu_Edit_Custom_Fields' ) ) { if ( version_compare( $wp_version, '3.6', '>=' ) ) { require_once POPMAKE_DIR . '/includes/modules/menus/class-nav-menu-edit-custom-fields.php'; } else { require_once POPMAKE_DIR . '/includes/modules/menus/class-nav-menu-edit-custom-fields-deprecated.php'; } } return 'Walker_Nav_Menu_Edit_Custom_Fields'; }
Expand full source code Collapse full source code View on Trac