関数 add_editor_style()
2014/12/17
関数 add_editor_style()
定義ファイル : /blog/wp-includes/theme.php 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function add_editor_style( $stylesheet = 'editor-style.css' ) { 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; } $editor_styles = array_merge( $editor_styles, $stylesheet ); } |