From b9cd68854fe742e5e729f95d5e4c00f2a8eeb673 Mon Sep 17 00:00:00 2001 From: joedolson Date: Sun, 9 Jun 2024 14:32:14 +0000 Subject: [PATCH] Media: Accessibility: Add filter for TinyMCE in media descriptions. Add a filter to enable TinyMCE in the media description textarea on the attachment details screen. The media description field may be used to provide extended descriptions of images and videos, such as a transcript or detailed graphic explanations. In these uses, it will generally require structural elements like paragraphs. Having the ability to enable TinyMCE makes it easier for users to add this content without HTML knowledge. Props juliemoynat, sebastienserre, mukesh27, joedolson. Fixes #60158. Built from https://develop.svn.wordpress.org/trunk@58372 git-svn-id: http://core.svn.wordpress.org/trunk@57821 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 9 ++++++++- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 2a4995507f..74b1153df8 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -3267,7 +3267,14 @@ function edit_form_image_editor( $post ) { 'textarea_name' => 'content', 'textarea_rows' => 5, 'media_buttons' => false, - 'tinymce' => false, + /** + * Filter the TinyMCE argument for the media description field on the attachment details screen. + * + * @since 6.6.0 + * + * @param bool Activate TinyMCE in media description field. Default false. + */ + 'tinymce' => apply_filters( 'activate_tinymce_for_media_description', false ), 'quicktags' => $quicktags_settings, ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a7928bb0d8..21af687abe 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-beta1-58371'; +$wp_version = '6.6-beta1-58372'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.