wp_nav_menu_max_depth

The WordPress Core wp nav menu max depth function.

Description

(string) wp_nav_menu_max_depth( (string) $classes ); 

Returns (string)

Parameters (1)

0. $classes (string)
The classes.

Usage

  1. if ( !function_exists( 'wp_nav_menu_max_depth' ) ) { 
  2. require_once ABSPATH . '/wp-admin/nav-menus.php'; 
  3.  
  4. // The classes. 
  5. $classes = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_nav_menu_max_depth($classes); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/nav-menus.php  
  1. function wp_nav_menu_max_depth( $classes ) { 
  2. global $_wp_nav_menu_max_depth; 
  3. return "$classes menu-max-depth-$_wp_nav_menu_max_depth";