black_studio_tinymce_before_text

Output widget HTML code.

Description

apply_filters( 'black_studio_tinymce_before_text', (string) $div_class_textwidget, (mixed[]) $instance ); 

Parameters (2)

0. $div_class_textwidget — Optional. (string) => '
'
The div class textwidget.
1. $instance (mixed[])
The instance.

Usage

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

Defined (1)

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

/includes/class-widget.php  
  1. $before_text = apply_filters( 'black_studio_tinymce_before_text', '<div class="textwidget">', $instance );