WordPress.org

Make WordPress Core

Changeset 16721


Ignore:
Timestamp:
12/04/10 10:09:00 (6 years ago)
Author:
nacin
Message:

Introduce remove_editor_styles(). fixes #14903.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r16720 r16721  
    16751675 * It is optional and defaults to 'editor-style.css'. 
    16761676 * 
     1677 * Supports RTL stylesheets automatically by searching for the -rtl prefix, e.g. 
     1678 * editor-style-rtl.css. If an array of stylesheets is passed to add_editor_style(), 
     1679 * RTL is only added for the first stylesheet. 
     1680 * 
    16771681 * @since 3.0.0 
    16781682 * 
     
    16961700 
    16971701    $editor_styles = array_merge( $editor_styles, $stylesheet ); 
     1702} 
     1703 
     1704/** 
     1705 * Removes all visual editor stylesheets. 
     1706 * 
     1707 * @since 3.1.0 
     1708 * 
     1709 * @return bool True on success, false if there were no stylesheets to remove. 
     1710 */ 
     1711function remove_editor_styles() { 
     1712    if ( ! current_theme_supports( 'editor-style' ) ) 
     1713        return false; 
     1714    _remove_theme_support( 'editor-style' ); 
     1715    if ( is_admin() ) 
     1716        $GLOBALS['editor_styles'] = array(); 
     1717    return true; 
    16981718} 
    16991719 
Note: See TracChangeset for help on using the changeset viewer.