bws_search_for_menu_widget

The Bootstrap Widget Styling bws search for menu widget function.

Description

bws_search_for_menu_widget( $instance, $widget, $args ); 

Parameters (3)

0. $instance
The instance.
1. $widget
The widget.
2. $args
The args.

Usage

  1. if ( !function_exists( 'bws_search_for_menu_widget' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bootstrap-widget-styling/includes/bws-widget-filters.php'; 
  3.  
  4. // The instance. 
  5. $instance = null; 
  6.  
  7. // The widget. 
  8. $widget = null; 
  9.  
  10. // The args. 
  11. $args = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bws_search_for_menu_widget($instance, $widget, $args); 
  15.  

Defined (1)

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

/includes/bws-widget-filters.php  
  1. function bws_search_for_menu_widget( $instance , $widget , $args ) { 
  2. if ( ( isset( $widget->widget_options[ 'classname' ] ) ) && ( 'widget_nav_menu' == $widget->widget_options[ 'classname' ] ) ) { 
  3. add_filter( 'wp_nav_menu_items' , 'bws_filter_widget_menu' , 2 , 10 ) ; 
  4. return $instance ;