is_wide_widget_in_customizer

Filters whether the given widget is considered "wide".

Description

apply_filters( 'is_wide_widget_in_customizer', (bool) $is_wide, (string) $widget_id ); 

Parameters (2)

0. $is_wide (bool)
Whether the widget is wide, Default false.
1. $widget_id (string)
The widget id.

Usage

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

Defined (1)

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

/wp-includes/class-wp-customize-widgets.php  
  1. return apply_filters( 'is_wide_widget_in_customizer', $is_wide, $widget_id );