Filter hook 'activate_tinymce_for_media_description'

in WP Core File wp-admin/includes/media.php at line 3281

View Source

activate_tinymce_for_media_description

Filter Hook
Description
Filters the TinyMCE argument for the media description field on the attachment details screen.

Hook Information

File Location wp-admin/includes/media.php View on GitHub
Hook Type Filter
Line Number 3281

Hook Parameters

Type Name Description
bool $tinymce Whether to activate TinyMCE in media description field. Default false.

Usage Examples

Basic Usage
<?php
// Hook into activate_tinymce_for_media_description
add_filter('activate_tinymce_for_media_description', 'my_custom_filter', 10, 1);

function my_custom_filter($tinymce) {
    // Your custom filtering logic here
    return $tinymce;
}

Source Code Context

wp-admin/includes/media.php:3281 - How this hook is used in WordPress core
<?php
3276  		 *
3277  		 * @since 6.6.0
3278  		 *
3279  		 * @param bool $tinymce Whether to activate TinyMCE in media description field. Default false.
3280  		 */
3281  		'tinymce'       => apply_filters( 'activate_tinymce_for_media_description', false ),
3282  		'quicktags'     => $quicktags_settings,
3283  	);
3284  
3285  	?>
3286  

PHP Documentation

<?php
/**
		 * Filters the TinyMCE argument for the media description field on the attachment details screen.
		 *
		 * @since 6.6.0
		 *
		 * @param bool $tinymce Whether to activate TinyMCE in media description field. Default false.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/media.php
Related Hooks

Related hooks will be displayed here in future updates.