Ticket #29137: editor_stylesheets-filter-2.diff
| File editor_stylesheets-filter-2.diff, 1.1 KB (added by , 12 years ago) |
|---|
-
theme.php
1412 1412 * @return array If registered, a list of editor stylesheet URLs. 1413 1413 */ 1414 1414 function get_editor_stylesheets() { 1415 /** 1416 * Filter editor stylesheets output. 1417 * 1418 * If the filtered output isn't empty, it will be used instead of generating the stylesheets. 1419 * 1420 * @since 4.0.0 1421 * 1422 * @param array $array Empty variable to be replaced with stylesheets array. 1423 */ 1424 $override = apply_filters( 'get_editor_stylesheets_override', array() ); 1425 if ( ! empty( $override ) ) { 1426 return $override; 1427 } 1428 1415 1429 $stylesheets = array(); 1416 1430 // load editor_style.css if the current theme supports it 1417 1431 if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) { … … 1447 1461 } 1448 1462 } 1449 1463 } 1450 return $stylesheets; 1464 1465 /** 1466 * Filter editor stylesheets output. 1467 * 1468 * @since 4.0.0 1469 * 1470 * @param array $stylesheets Stylesheets array output. 1471 */ 1472 return apply_filters( 'get_editor_stylesheets', $stylesheets ); 1451 1473 } 1452 1474 1453 1475 /**