WordPress.org

Make WordPress Core

Ticket #42645: 42645.2.patch

File 42645.2.patch, 1.4 KB (added by aytac, 19 months ago)

The fallback check was not properly set.

  • src/wp-includes/theme.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    19041904 *
    19051905 * @param array|string $stylesheet Optional. Stylesheet name or array thereof, relative to theme root.
    19061906 *                                 Defaults to 'editor-style.css'
     1907 * @param string       $version    Optional. Add version number to stylesheet URL for cache busting.
    19071908 */
    1908 function add_editor_style( $stylesheet = 'editor-style.css' ) {
     1909function add_editor_style( $stylesheet = 'editor-style.css', $version = '' ) {
    19091910        add_theme_support( 'editor-style' );
    19101911
    19111912        if ( ! is_admin() ) {
     
    19131914        }
    19141915
    19151916        global $editor_styles;
     1917        global $wp_version;
     1918
     1919        if ( '' === $version ) {
     1920                $version = $wp_version;
     1921    }
     1922
    19161923        $editor_styles = (array) $editor_styles;
    19171924        $stylesheet    = (array) $stylesheet;
     1925        $version       = (array) $version;
     1926
    19181927        if ( is_rtl() ) {
    19191928                $rtl_stylesheet = str_replace( '.css', '-rtl.css', $stylesheet[0] );
    19201929                $stylesheet[]   = $rtl_stylesheet;
    19211930        }
    19221931
    1923         $editor_styles = array_merge( $editor_styles, $stylesheet );
     1932        $editor_styles = array_merge( $editor_styles, $stylesheet, $version );
    19241933}
    19251934
    19261935/**