diff --git wp-includes/theme.php wp-includes/theme.php
index 4e5f63b..29f9d7a 100644
|
|
|
function wp_update_custom_css_post( $css, $args = array() ) { |
| 1825 | 1825 | * It is a better option to use that class and add any RTL styles to the main stylesheet. |
| 1826 | 1826 | * |
| 1827 | 1827 | * @since 3.0.0 |
| | 1828 | * @since 5.0.0 Added the optional `$version` parameter. |
| 1828 | 1829 | * |
| 1829 | 1830 | * @global array $editor_styles |
| 1830 | 1831 | * |
| 1831 | 1832 | * @param array|string $stylesheet Optional. Stylesheet name or array thereof, relative to theme root. |
| 1832 | 1833 | * Defaults to 'editor-style.css' |
| | 1834 | * @param string $version Optional. The version number attached to this stylesheet. |
| 1833 | 1835 | */ |
| 1834 | | function add_editor_style( $stylesheet = 'editor-style.css' ) { |
| | 1836 | function add_editor_style( $stylesheet = 'editor-style.css', $version = '' ) { |
| 1835 | 1837 | add_theme_support( 'editor-style' ); |
| 1836 | 1838 | |
| 1837 | | if ( ! is_admin() ) |
| | 1839 | if ( ! is_admin() ) { |
| 1838 | 1840 | return; |
| | 1841 | } |
| 1839 | 1842 | |
| 1840 | 1843 | global $editor_styles; |
| | 1844 | global $wp_version; |
| | 1845 | |
| | 1846 | if ( '' == $version ) { |
| | 1847 | $version = $wp_version; |
| | 1848 | } |
| | 1849 | |
| 1841 | 1850 | $editor_styles = (array) $editor_styles; |
| 1842 | 1851 | $stylesheet = (array) $stylesheet; |
| | 1852 | $version = (array) $version; |
| | 1853 | |
| 1843 | 1854 | if ( is_rtl() ) { |
| 1844 | 1855 | $rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]); |
| 1845 | 1856 | $stylesheet[] = $rtl_stylesheet; |
| 1846 | 1857 | } |
| 1847 | 1858 | |
| 1848 | | $editor_styles = array_merge( $editor_styles, $stylesheet ); |
| | 1859 | $editor_styles = array_merge( $editor_styles, $stylesheet, $version ); |
| 1849 | 1860 | } |
| 1850 | 1861 | |
| 1851 | 1862 | /** |