jetpack_nova_menu_item_loop_open_element

Filter a menu item's element opening tag.

Description

apply_filters( 'jetpack_nova_menu_item_loop_open_element', (string) $tag_escape_markup_field_tag_this_menu_item_loop_class_markup_field_class_n, (string) $field, (array) $markup, (false|object) $this_menu_item_loop_current_term ); 

Parameters (4)

0. $tag_escape_markup_field_tag_this_menu_item_loop_class_markup_field_class_n (string) => '<' . tag_escape( $markup["{$field}_tag"] ) . $this->menu_item_loop_class( $markup["{$field}_class"] ) . ">\n"
The tag escape markup field tag this menu item loop class markup field class n.
1. $field (string)
Menu Item Markup settings field.
2. $markup (array)
Array of markup elements for the menu item.
3. $this_menu_item_loop_current_term (false|object)
The this menu item loop current term.

Usage

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

Defined (1)

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

/modules/custom-post-types/nova.php  
  1. echo apply_filters(