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: http://svn.automattic.com/wordpress/trunk@19649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
85dff92772
commit
eeb71b5499
|
@ -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' ) )
|
||||
|
|
Loading…
Reference in New Issue