jetpack_nova_menu_item_loop_class

Filter a menu Item Markup element's class attribute.

Description

apply_filters( 'jetpack_nova_menu_item_loop_class', (string) $class_esc_attr_class, (string) $class, (false|object) $this_menu_item_loop_current_term ); 

Parameters (3)

0. $class_esc_attr_class — Optional. (string) => ' class="' . esc_attr( $class ) . '"'
Menu Item Markup element's class attribute.
1. $class (string)
Menu Item Class name.
2. $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. $class_esc_attr_class = apply_filters( 'jetpack_nova_menu_item_loop_class', $class_esc_attr_class, $class, $this_menu_item_loop_current_term ); 
  2.  
  3. if ( !empty( $class_esc_attr_class ) ) { 
  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_class callback 
  2. function filter_jetpack_nova_menu_item_loop_class( $class_esc_attr_class, $class, $this_menu_item_loop_current_term ) { 
  3. // make filter magic happen here... 
  4. return $class_esc_attr_class
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_nova_menu_item_loop_class', 'filter_jetpack_nova_menu_item_loop_class', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_nova_menu_item_loop_class', 'filter_jetpack_nova_menu_item_loop_class', 10, 3 ); 

Defined (1)

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

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