diff --git a/wp-content/themes/twentythirteen/functions.php b/wp-content/themes/twentythirteen/functions.php index 00990ff87c..af9049583c 100644 --- a/wp-content/themes/twentythirteen/functions.php +++ b/wp-content/themes/twentythirteen/functions.php @@ -156,8 +156,6 @@ function twentythirteen_fonts_url() { * @return void */ function twentythirteen_scripts_styles() { - global $wp_styles; - // Adds JavaScript to pages with the comment form to support sites with // threaded comments (when in use). if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) @@ -181,7 +179,7 @@ function twentythirteen_scripts_styles() { // Loads the Internet Explorer specific stylesheet. wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' ); - $wp_styles->add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' ); + wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' ); } add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' ); diff --git a/wp-includes/functions.wp-styles.php b/wp-includes/functions.wp-styles.php index ab3f2e02f3..617fd8241d 100644 --- a/wp-includes/functions.wp-styles.php +++ b/wp-includes/functions.wp-styles.php @@ -190,3 +190,29 @@ function wp_style_is( $handle, $list = 'enqueued' ) { return (bool) $wp_styles->query( $handle, $list ); } + +/** + * Add metadata to CSS style files. + * + * Works only if the stylesheet has already been added. + * Possible values for $key and $value: + * + * conditional string comments for IE 6, lte IE 7 etc. + * rtl bool|string to declare an RTL stylesheet + * suffix string optional suffix, used in combination with RTL + * alt bool for rel="alternate stylesheet" + * title string for preferred/alternate stylesheets + * + * @since 3.6.0 + * @see WP_Dependencies::add_data() + * + * @param string $handle Script name. + * @param string $key Name of data point for which we're storing a value. + * Values are 'conditional', 'rtl', and 'suffix', and 'alt', 'title'. + * @param mixed $data + * @return bool True on success, false on failure. + */ +function wp_style_add_data( $handle, $key, $value ) { + global $wp_styles; + return $wp_styles->add_data( $handle, $key, $value ); +}