Changeset 21672 for trunk/wp-includes/functions.wp-styles.php
- Timestamp:
- 08/30/2012 06:57:57 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.wp-styles.php
r19687 r21672 168 168 * Check whether style has been added to WordPress Styles. 169 169 * 170 * The values for list defaults to 'queue', which is the same as wp_enqueue_style(). 170 * By default, checks if the style has been enqueued. You can also 171 * pass 'registered' to $list, to see if the style is registered, 172 * and you can check processing statuses with 'to_do' and 'done'. 171 173 * 172 174 * @since WP unknown; BP unknown … … 174 176 * 175 177 * @param string $handle Name of the stylesheet. 176 * @param string $list Values are 'registered', 'done', 'queue' and 'to_do'. 177 * @return bool True on success, false on failure. 178 * @param string $list Optional. Defaults to 'enqueued'. Values are 179 * 'registered', 'enqueued' (or 'queue'), 'to_do', and 'done'. 180 * @return bool Whether style is in the list. 178 181 */ 179 function wp_style_is( $handle, $list = ' queue' ) {182 function wp_style_is( $handle, $list = 'enqueued' ) { 180 183 global $wp_styles; 181 184 if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { … … 186 189 } 187 190 188 $query = $wp_styles->query( $handle, $list ); 189 190 if ( is_object( $query ) ) 191 return true; 192 193 return $query; 191 return (bool) $wp_styles->query( $handle, $list ); 194 192 }
Note: See TracChangeset
for help on using the changeset viewer.