bws_do_options_allow_adding_filter_for_widget_type

The Bootstrap Widget Styling bws do options allow adding filter for widget type function.

Description

bws_do_options_allow_adding_filter_for_widget_type( $type_of_widget ); 

Parameters (1)

0. $type_of_widget
The type of widget.

Usage

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

Defined (1)

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

/includes/bws-widget-filters.php  
  1. function bws_do_options_allow_adding_filter_for_widget_type( $type_of_widget ) { 
  2. $options = get_option( 'bws_plugin_options' ) ; 
  3. $widget_key = 'disable_' . $type_of_widget . '_widget' ; 
  4. if ( ( isset( $options[ $widget_key ] ) ) && ( '1' === $options[ $widget_key ] ) ) { 
  5. return false ; 
  6. return true ;