Commit 54106f6c54 for wordpress.org

commit 54106f6c545fc8b881f6b39b7963002bece6c28c
Author: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Date:   Sat Oct 24 00:29:51 2026 +0000

    Themes: Clarify 'editor-style' vs 'editor-styles' documentation.

    WordPress themes can support both `editor-styles` (plural) for the block editor and `editor-style` (singular) for the TinyMCE/classic editors.

    This improves the documentation of the `add_editor_style()` and `remove_editor_styles()` functions to use `add_theme_support( 'editor-styles' )` and `remove_theme_support( 'editor-styles' )` to add stylesheets to the block editor.

    The tests for theme support are expanded to ensure that the subtle distinction is retained.

    Props azaozz, chaion07, desrosj, hellofromtonya, khoipro, oglekler, sabernhardt, sergeybiryukov, soean, sukhendu2002.
    Fixes #60826.



    Built from https://develop.svn.wordpress.org/trunk@64693


    git-svn-id: http://core.svn.wordpress.org/trunk@63843 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/theme.php b/wp-includes/theme.php
index d81616c6c5..e27f3e1500 100644
--- a/wp-includes/theme.php
+++ b/wp-includes/theme.php
@@ -2183,6 +2183,14 @@ function wp_update_custom_css_post( $css, $args = array() ) {
  * Since version 3.4 the TinyMCE body has .rtl CSS class.
  * It is a better option to use that class and add any RTL styles to the main stylesheet.
  *
+ * Internally this registers the 'editor-style' (singular) theme support to enable
+ * editor stylesheets for the classic/TinyMCE editor.
+ *
+ * The plural form, 'editor-styles', is a separate theme support that allows the block
+ * editor to load the stylesheets registered by this function. To add styles to the
+ * block editor, use add_theme_support( 'editor-styles' ) in addition to this function.
+ * Block themes support 'editor-styles' by default.
+ *
  * @since 3.0.0
  *
  * @global array $editor_styles
@@ -2209,6 +2217,13 @@ function add_editor_style( $stylesheet = 'editor-style.css' ) {
 /**
  * Removes all visual editor stylesheets.
  *
+ * Internally this removes the 'editor-style' (singular) theme support added by
+ * add_editor_style(). In the admin, it also clears the registered stylesheets,
+ * so they are no longer loaded in either the classic/TinyMCE or the block editor.
+ *
+ * The plural form, 'editor-styles', is a separate theme support and is not affected
+ * by this function. To remove it, use remove_theme_support( 'editor-styles' ).
+ *
  * @since 3.1.0
  *
  * @global array $editor_styles
@@ -3074,7 +3089,11 @@ function get_theme_support( $feature, ...$args ) {
  * @return bool Whether feature was removed.
  */
 function remove_theme_support( $feature ) {
-	// Do not remove internal registrations that are not used directly by themes.
+	/*
+	 * Do not remove internal registrations that are not used directly by themes.
+	 * 'editor-style' (singular) is added by add_editor_style(); use remove_editor_styles().
+	 * It is unrelated to the 'editor-styles' (plural) feature, which can be removed here.
+	 */
 	if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ), true ) ) {
 		return false;
 	}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index c35cd1c234..b508f45fd7 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-beta1-64692';
+$wp_version = '7.2-beta1-64693';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.