walker_nav_menu_start_el

Filters a menu item's starting output.

Description

apply_filters( 'walker_nav_menu_start_el', (unknown) $item_output, (unknown) $item, (unknown) $depth, (unknown) $args ); 

Parameters (4)

0. $item_output (unknown)
The item output.
1. $item (unknown)
The item.
2. $depth (unknown)
The depth.
3. $args (unknown)
The args.

Usage

To run the hook, copy the example below.
  1. $item_output = apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); 
  2.  
  3. if ( !empty( $item_output ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the walker_nav_menu_start_el callback 
  2. function filter_walker_nav_menu_start_el( $item_output, $item, $depth, $args ) { 
  3. // make filter magic happen here... 
  4. return $item_output
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'walker_nav_menu_start_el', 'filter_walker_nav_menu_start_el', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'walker_nav_menu_start_el', 'filter_walker_nav_menu_start_el', 10, 4 ); 

Defined (1)

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

/core/menu/weblizar_nav_walker.php  
  1. $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );