disable_captions
Filter HookDescription
Adds inline scripts required for the TinyMCE in the block editor. These TinyMCE init settings are used to extend and override the default settings from `_WP_Editors::default_settings()` for the Classic block.Hook Information
File Location |
wp-includes/script-loader.php
View on GitHub
|
Hook Type | Filter |
Line Number | 550 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into disable_captions
add_filter('disable_captions', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-includes/script-loader.php:550
- How this hook is used in WordPress core
<?php
545 $tinymce_plugins = array_unique( $tinymce_plugins );
546
547 $disable_captions = false;
548 // Runs after `tiny_mce_plugins` but before `mce_buttons`.
549 /** This filter is documented in wp-admin/includes/media.php */
550 if ( apply_filters( 'disable_captions', '' ) ) {
551 $disable_captions = true;
552 }
553
554 $toolbar1 = array(
555 'formatselect',
PHP Documentation
<?php
/**
* Adds inline scripts required for the TinyMCE in the block editor.
*
* These TinyMCE init settings are used to extend and override the default settings
* from `_WP_Editors::default_settings()` for the Classic block.
*
* @since 5.0.0
*
* @global WP_Scripts $wp_scripts
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-includes/script-loader.php
Related Hooks
Related hooks will be displayed here in future updates.