the_editor_content

The WordPress Core the editor content hook.

Description

add_filter( 'the_editor_content', (string) $format_for_editor, (int) $int, (int) $int ); 

Parameters (3)

0. $format_for_editor (string) => 'format_for_editor'
The format for editor.
1. $int (int) => 10
The int.
2. $int (int) => 2
The int.

Usage

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

Defined (3)

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

/wp-includes/class-wp-editor.php  
  1. add_filter( 'the_editor_content', 'format_for_editor', 10, 2 ); 
  1. $content = apply_filters( 'the_editor_content', $content, $default_editor ); 
  1. remove_filter( 'the_editor_content', 'format_for_editor' );