mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 11:44:33 +00:00
Editor: Make registered editor stylesheets (editor-style.css) available to the front-end.
Props webmandesign, azaozz. Fixes #34882. git-svn-id: https://develop.svn.wordpress.org/trunk@45621 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1924,15 +1924,13 @@ function wp_update_custom_css_post( $css, $args = array() ) {
|
||||
* Defaults to 'editor-style.css'
|
||||
*/
|
||||
function add_editor_style( $stylesheet = 'editor-style.css' ) {
|
||||
global $editor_styles;
|
||||
|
||||
add_theme_support( 'editor-style' );
|
||||
|
||||
if ( ! is_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $editor_styles;
|
||||
$editor_styles = (array) $editor_styles;
|
||||
$stylesheet = (array) $stylesheet;
|
||||
|
||||
if ( is_rtl() ) {
|
||||
$rtl_stylesheet = str_replace( '.css', '-rtl.css', $stylesheet[0] );
|
||||
$stylesheet[] = $rtl_stylesheet;
|
||||
|
||||
Reference in New Issue
Block a user