Skip to content

Commit

Permalink
Trigger the wp_print_syles action from wp_print_styles() only when ha…
Browse files Browse the repository at this point in the history
…ndles are not passed. Prevents front-end styles from leaking into the admin. Props nacin. see #19510 for 3.3

git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Jan 2, 2012
1 parent 434b460 commit 9f6201c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wp-includes/functions.wp-styles.php
Expand Up @@ -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' ) )
Expand Down

0 comments on commit 9f6201c

Please sign in to comment.