diff --git wp-includes/theme.php wp-includes/theme.php
index 4e5f63b..ec4f60e 100644
|
|
|
function wp_update_custom_css_post( $css, $args = array() ) { |
| 1830 | 1830 | * |
| 1831 | 1831 | * @param array|string $stylesheet Optional. Stylesheet name or array thereof, relative to theme root. |
| 1832 | 1832 | * Defaults to 'editor-style.css' |
| | 1833 | * @param string $version Optional. Add version number to stylesheet URL for cache busting. |
| 1833 | 1834 | */ |
| 1834 | | function add_editor_style( $stylesheet = 'editor-style.css' ) { |
| | 1835 | function add_editor_style( $stylesheet = 'editor-style.css', $version = '' ) { |
| 1835 | 1836 | add_theme_support( 'editor-style' ); |
| 1836 | 1837 | |
| 1837 | 1838 | if ( ! is_admin() ) |
| 1838 | 1839 | return; |
| 1839 | 1840 | |
| 1840 | 1841 | global $editor_styles; |
| | 1842 | global $wp_version |
| | 1843 | |
| 1841 | 1844 | $editor_styles = (array) $editor_styles; |
| 1842 | 1845 | $stylesheet = (array) $stylesheet; |
| | 1846 | $version = (array) $version; |
| | 1847 | |
| 1843 | 1848 | if ( is_rtl() ) { |
| 1844 | 1849 | $rtl_stylesheet = str_replace('.css', '-rtl.css', $stylesheet[0]); |
| 1845 | 1850 | $stylesheet[] = $rtl_stylesheet; |
| 1846 | 1851 | } |
| 1847 | 1852 | |
| 1848 | | $editor_styles = array_merge( $editor_styles, $stylesheet ); |
| | 1853 | if ( '' == $version ) |
| | 1854 | $version[0] = $wp_version; |
| | 1855 | |
| | 1856 | $editor_styles = array_merge( $editor_styles, $stylesheet, $version ); |
| 1849 | 1857 | } |
| 1850 | 1858 | |
| 1851 | 1859 | /** |