Definition:
function wp_print_styles( $handles = false ) {}
Display styles that are in the queue or part of $handles.
Parameters
- array|bool $handles: Styles to be printed. An empty array prints the queue, an array with one string prints that style, and an array of strings prints those styles.
Return values
returns:True on success, false on failure.
Defined actions
- wp_print_styles
do_action( 'wp_print_styles' );
Source code
function wp_print_styles( $handles = false ) {
do_action( 'wp_print_styles' );
if ( '' === $handles ) // for wp_head
$handles = false;
global $wp_styles;
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
if ( ! did_action( 'init' ) )
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
'<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>init</code>' ), '3.3' );
if ( !$handles )
return array(); // No need to instantiate if nothing is there.
else
$wp_styles = new WP_Styles();
}
return $wp_styles->do_items( $handles );
}
4003

February 12, 2011 


No comments yet... Be the first to leave a reply!