bws_add_search_form_filter_if_option_allows

The Bootstrap Widget Styling bws add search form filter if option allows function.

Description

bws_add_search_form_filter_if_option_allows(); 

Usage

  1. if ( !function_exists( 'bws_add_search_form_filter_if_option_allows' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bootstrap-widget-styling/includes/bws-widget-filters.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bws_add_search_form_filter_if_option_allows(); 
  7.  

Defined (1)

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

/includes/bws-widget-filters.php  
  1. function bws_add_search_form_filter_if_option_allows() { 
  2. $options = get_option( 'bws_plugin_options' ) ; 
  3. if ( ( isset( $options[ 'disable_search_widget' ] ) ) && ( '1' === $options[ 'disable_search_widget' ] ) ) { 
  4. return ; 
  5. } else { 
  6. add_filter( 'get_search_form' , array( 'BWS_Search_Widget' , 'filter' ) , '1' ) ;