wp-includes functions.wp-styles.php

While checking the is_a errors, I noticed an apparent typo in this file.

function wp_style_is( $handle, $list = 'queue' ) {
	global $wp_styles;
	if ( !is_a($wp_styles, 'WP_Scripts') )
		$wp_styles = new WP_Styles();

After pointing it out in the use instanceof instead of is_a() Trac Ticket, Denis-de-Bernardy opened another Trac Ticket, Incorrect check in wp_style_is(), and this has been corrected as of WordPress 2.8.1

The file still has 5 occurrences of is_a()

function wp_print_styles( $handles = false ) {
.....
//	if ( !is_a($wp_styles, 'WP_Styles') ) {
	$class_name = 'WP_Styles';
	if ( ( get_class($wp_styles) != $class_name )
	 && !is_subclass_of($wp_styles, $class_name) ) {
.....
function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
function wp_deregister_style( $handle ) {
function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = false ) {
function wp_style_is( $handle, $list = 'queue' ) {
.....
//	if ( !is_a($wp_styles, 'WP_Styles') )
	$class_name = 'WP_Styles';
	if ( ( get_class($wp_styles) != $class_name )
	 && !is_subclass_of($wp_styles, $class_name) )
Technorati Tags: ,

Post a Comment

Your email is never shared. Required fields are marked *

*
*