WordPress.org

Make WordPress Core

Ticket #42645: 42645.1.patch

File 42645.1.patch, 1.3 KB (added by aytac, 21 months ago)
  • 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
    19161919        $editor_styles = (array) $editor_styles;
    19171920        $stylesheet    = (array) $stylesheet;
     1921        $version       = (array) $version;
     1922
    19181923        if ( is_rtl() ) {
    19191924                $rtl_stylesheet = str_replace( '.css', '-rtl.css', $stylesheet[0] );
    19201925                $stylesheet[]   = $rtl_stylesheet;
    19211926        }
    19221927
    1923         $editor_styles = array_merge( $editor_styles, $stylesheet );
     1928        if ( '' == $version )
     1929                $version[0] = $wp_version;
     1930
     1931        $editor_styles = array_merge( $editor_styles, $stylesheet, $version );
    19241932}
    19251933
    19261934/**