Filter hook 'mce_css'

in WP Core File wp-includes/class-wp-editor.php at line 600

View Source

mce_css

Filter Hook
Description
Filters the comma-delimited list of stylesheets to load in TinyMCE.

Hook Information

File Location wp-includes/class-wp-editor.php View on GitHub
Hook Type Filter
Line Number 600

Hook Parameters

Type Name Description
string $stylesheets Comma-delimited list of stylesheets.

Usage Examples

Basic Usage
<?php
// Hook into mce_css
add_filter('mce_css', 'my_custom_filter', 10, 1);

function my_custom_filter($stylesheets) {
    // Your custom filtering logic here
    return $stylesheets;
}

Source Code Context

wp-includes/class-wp-editor.php:600 - How this hook is used in WordPress core
<?php
 595  				 *
 596  				 * @since 2.1.0
 597  				 *
 598  				 * @param string $stylesheets Comma-delimited list of stylesheets.
 599  				 */
 600  				$mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
 601  
 602  				if ( ! empty( $mce_css ) ) {
 603  					$settings['content_css'] = $mce_css;
 604  				} else {
 605  					unset( $settings['content_css'] );

PHP Documentation

<?php
/**
				 * Filters the comma-delimited list of stylesheets to load in TinyMCE.
				 *
				 * @since 2.1.0
				 *
				 * @param string $stylesheets Comma-delimited list of stylesheets.
				 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/class-wp-editor.php
Related Hooks

Related hooks will be displayed here in future updates.