X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f5fcdc7994bb67cce809bc4777944ae8b7fad4a4..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-includes/functions.wp-styles.php diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php index 76ca28fa..2036f4b9 100644 --- a/wp-includes/functions.wp-styles.php +++ b/wp-includes/functions.wp-styles.php @@ -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.