Changeset 13453 for trunk/wp-includes/theme.php
- Timestamp:
- 02/27/2010 07:36:35 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r13444 r13453 1466 1466 return; 1467 1467 1468 global $editor_style; 1469 $editor_style = (array) $editor_style; 1470 $stylesheet = (array) $stylesheet; 1471 foreach ( $stylesheet as $file ) { 1472 if ( file_exists( get_stylesheet_directory() . "/$file" ) 1473 && ( $uri = get_stylesheet_directory_uri() . "/$file" ) 1474 && ! in_array( $uri, $editor_style ) ) 1475 $editor_style[] = $uri; 1476 elseif ( TEMPLATEPATH !== STYLESHEETPATH 1477 && file_exists( get_template_directory() . "/$file" ) 1478 && ( $uri = get_template_directory_uri() . "/$file" ) 1479 && ! in_array( $uri, $editor_style ) ) 1480 $editor_style[] = $uri; 1481 } 1482 add_filter( 'mce_css', '_editor_style_cb' ); 1483 } 1484 1485 /** 1486 * Callback for custom editor stylesheet support. 1487 * 1488 * @since 3.0.0 1489 * @see add_editor_style() 1490 * @access protected 1491 */ 1492 function _editor_style_cb( $url ) { 1493 global $editor_style; 1494 if ( ! empty( $url ) ) 1495 $url .= ','; 1496 return $url . implode( ',', $editor_style ); 1468 global $editor_styles; 1469 $editor_styles = (array) $editor_styles; 1470 $stylesheet = (array) $stylesheet; 1471 $editor_styles = array_merge( $editor_styles, $stylesheet ); 1497 1472 } 1498 1473 … … 1521 1496 * @return boolean 1522 1497 */ 1523 1524 1498 function current_theme_supports( $feature ) { 1525 1499 global $_wp_theme_features;
Note: See TracChangeset
for help on using the changeset viewer.