the_editor_content
Filter HookDescription
Outputs the Text widget settings form.Hook Information
File Location |
wp-includes/widgets/class-wp-widget-text.php
View on GitHub
|
Hook Type | Filter |
Line Number | 474 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$instance
|
Current settings. |
Usage Examples
Basic Usage
<?php
// Hook into the_editor_content
add_filter('the_editor_content', 'my_custom_filter', 10, 1);
function my_custom_filter($instance) {
// Your custom filtering logic here
return $instance;
}
Source Code Context
wp-includes/widgets/class-wp-widget-text.php:474
- How this hook is used in WordPress core
<?php
469 } else {
470 $default_editor = 'html';
471 }
472
473 /** This filter is documented in wp-includes/class-wp-editor.php */
474 $text = apply_filters( 'the_editor_content', $instance['text'], $default_editor );
475
476 // Reset filter addition.
477 if ( user_can_richedit() ) {
478 remove_filter( 'the_editor_content', 'format_for_editor' );
479 }
PHP Documentation
<?php
/**
* Outputs the Text widget settings form.
*
* @since 2.8.0
* @since 4.8.0 Form only contains hidden inputs which are synced with JS template.
* @since 4.8.1 Restored original form to be displayed when in legacy mode.
*
* @see WP_Widget_Text::render_control_template_scripts()
* @see _WP_Editors::editor()
*
* @param array $instance Current settings.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/widgets/class-wp-widget-text.php
Related Hooks
Related hooks will be displayed here in future updates.