]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/functions.wp-styles.php
WordPress 4.3-scripts
[autoinstalls/wordpress.git] / wp-includes / functions.wp-styles.php
index 76ca28fac0114aeb6bb6e1a28b1585ab4ba27867..2036f4b95160013cf8d17d33f89fb33137bbec65 100644 (file)
@@ -98,6 +98,7 @@ function wp_add_inline_style( $handle, $data ) {
  * @link http://www.w3.org/TR/CSS2/media.html#media-types List of CSS media types.
  *
  * @since 2.6.0
+ * @since 4.3.0 A return value was added.
  *
  * @param string      $handle Name of the stylesheet.
  * @param string|bool $src    Path to the stylesheet from the WordPress root directory. Example: '/css/mystyle.css'.
@@ -107,11 +108,12 @@ function wp_add_inline_style( $handle, $data ) {
  * @param string      $media  Optional. The media for which this stylesheet has been defined.
  *                            Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
  *                            'screen', 'tty', or 'tv'.
+ * @return bool Whether the style has been registered. True on success, false on failure.
  */
 function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
 
-       wp_styles()->add( $handle, $src, $deps, $ver, $media );
+       return wp_styles()->add( $handle, $src, $deps, $ver, $media );
 }
 
 /**
@@ -150,7 +152,6 @@ function wp_deregister_style( $handle ) {
  *                            'screen', 'tty', or 'tv'.
  */
 function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
-       global $wp_styles;
        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
 
        $wp_styles = wp_styles();
@@ -180,8 +181,6 @@ function wp_dequeue_style( $handle ) {
 /**
  * Check whether a CSS stylesheet has been added to the queue.
  *
- * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
- *
  * @since 2.8.0
  *
  * @param string $handle Name of the stylesheet.