layers_column_widget_column_design_bar_components

The Layers layers column widget design bar components hook.

Description

apply_filters( 'layers_column_widget_column_design_bar_components', (callback) $item_instance_width, (unknown) $instance, (unknown) $item_instance ); 

Parameters (3)

0. $item_instance_width — Optional. (callback) => array( 'background', 'featuredimage', 'imagealign', 'fonts', 'buttons' => array( 'icon-css' => 'icon-call-to-action', 'label' => __( 'Buttons', 'layerswp' ), 'elements' => array( 'layers-pro-upsell' =>array( 'type' => 'html', 'html' => '
Upgrade to Layers Pro
Want more control over your button styling and sizes? Purchase Layers Pro and gain more control over your button styling!
' ) ), 'elements_combine' => 'replace', ), 'width' => array( 'icon-css' => 'icon-columns', 'label' => 'Column Width', 'elements' => array( 'layout' => array( 'type' => 'select', 'label' => __( '' , 'layerswp' ), 'name' => $this->get_layers_field_name( 'width' ), 'id' => $this->get_layers_field_id( 'width' ), 'value' => ( isset( $item_instance['width'] ) ) ? $item_instance['width'] : NULL, 'options' => array( '1' => __( '1 of 12 columns' , 'layerswp' ), '2' => __( '2 of 12 columns' , 'layerswp' ), '3' => __( '3 of 12 columns' , 'layerswp' ), '4' => __( '4 of 12 columns' , 'layerswp' ), '5' => __( '5 of 12 columns' , 'layerswp' ), '6' => __( '6 of 12 columns' , 'layerswp' ), '7' => __( '7 of 12 columns' , 'layerswp' ), '8' => __( '8 of 12 columns' , 'layerswp' ), '9' => __( '9 of 12 columns' , 'layerswp' ), '10' => __( '10 of 12 columns' , 'layerswp' ), '11' => __( '11 of 12 columns' , 'layerswp' ), '12' => __( '12 of 12 columns' , 'layerswp' ) ) ) ) ), 'advanced' => array( 'elements' => array( 'padding' => array( 'type' => 'trbl-fields', 'label' => __( 'Padding (px)', 'layerswp' ), 'name' => $this->get_layers_field_name( 'design', 'advanced', 'padding' ), 'id' => $this->get_layers_field_id( 'design', 'advanced', 'padding' ), 'value' => ( isset( $item_instance['design']['advanced']['padding'] ) ) ? $item_instance['design']['advanced']['padding'] : NULL, 'fields' => array( 'top', 'right', 'bottom', 'left', ), ), 'margin' => array( 'type' => 'trbl-fields', 'label' => __( 'Margin (px)', 'layerswp' ), 'name' => $this->get_layers_field_name( 'design', 'advanced', 'margin' ), 'id' => $this->get_layers_field_id( 'design', 'advanced', 'margin' ), 'value' => ( isset( $item_instance['design']['advanced']['margin'] ) ) ? $item_instance['design']['advanced']['margin'] : NULL, 'fields' => array( 'top', 'bottom', ), ), 'customclass', ), 'elements_combine' => 'replace', ), )
The array.
1. $instance (unknown)
The instance.
2. $item_instance (unknown)
The item instance.

Usage

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

Defined (1)

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

/core/widgets/modules/content.php  
  1. apply_filters( 'layers_column_widget_column_design_bar_components', array( // Components