-
+ 109B2195BC7D36CA92A98D5B47AA193D144D3C7151BA60A3B0554440BAAC37E94365BACEAF9F1002D07FCDB2118423061DBE595A960F76B8B5D3EB96DDC5D7CBmp-wp/wp-includes/functions.wp-styles.php(0 . 0)(1 . 79)
94637 <?php
94638 /**
94639 * BackPress styles procedural API.
94640 *
94641 * @package BackPress
94642 * @since r79
94643 */
94644
94645 /**
94646 * Display styles that are in the queue or part of $handles.
94647 *
94648 * @since r79
94649 * @uses do_action() Calls 'wp_print_styles' hook.
94650 * @global object $wp_styles The WP_Styles object for printing styles.
94651 *
94652 * @param array $handles (optional) Styles to be printed. (void) prints queue, (string) prints that style, (array of strings) prints those styles.
94653 * @return bool True on success, false on failure.
94654 */
94655 function wp_print_styles( $handles = false ) {
94656 do_action( 'wp_print_styles' );
94657 if ( '' === $handles ) // for wp_head
94658 $handles = false;
94659
94660 global $wp_styles;
94661 if ( !is_a($wp_styles, 'WP_Styles') ) {
94662 if ( !$handles )
94663 return array(); // No need to instantiate if nothing's there.
94664 else
94665 $wp_styles = new WP_Styles();
94666 }
94667
94668 return $wp_styles->do_items( $handles );
94669 }
94670
94671 /**
94672 * Register CSS style file.
94673 *
94674 * @since r79
94675 * @see WP_Styles::add() For parameter and additional information.
94676 */
94677 function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
94678 global $wp_styles;
94679 if ( !is_a($wp_styles, 'WP_Styles') )
94680 $wp_styles = new WP_Styles();
94681
94682 $wp_styles->add( $handle, $src, $deps, $ver, $media );
94683 }
94684
94685 /**
94686 * Remove a registered CSS file.
94687 *
94688 * @since r79
94689 * @see WP_Styles::remove() For parameter and additional information.
94690 */
94691 function wp_deregister_style( $handle ) {
94692 global $wp_styles;
94693 if ( !is_a($wp_styles, 'WP_Styles') )
94694 $wp_styles = new WP_Styles();
94695
94696 $wp_styles->remove( $handle );
94697 }
94698
94699 /**
94700 * Enqueue a CSS style file.
94701 *
94702 * @since r79
94703 * @see WP_Styles::add(), WP_Styles::enqueue()
94704 */
94705 function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = false ) {
94706 global $wp_styles;
94707 if ( !is_a($wp_styles, 'WP_Styles') )
94708 $wp_styles = new WP_Styles();
94709
94710 if ( $src ) {
94711 $_handle = explode('?', $handle);
94712 $wp_styles->add( $_handle[0], $src, $deps, $ver, $media );
94713 }
94714 $wp_styles->enqueue( $handle );
94715 }