Trigger the wp_print_syles action from wp_print_styles() only when handles are not passed. Prevents front-end styles from leaking into the admin. Props nacin. see #19510 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@19649 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-01-02 22:32:00 +00:00
parent 7e379cd9e5
commit 1c75e9a27b
1 changed files with 3 additions and 1 deletions

View File

@ -18,10 +18,12 @@
* @return bool True on success, false on failure.
*/
function wp_print_styles( $handles = false ) {
do_action( 'wp_print_styles' );
if ( '' === $handles ) // for wp_head
$handles = false;
if ( ! $handles )
do_action( 'wp_print_styles' );
global $wp_styles;
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
if ( ! did_action( 'init' ) )