Make WordPress Core

Ticket #25672: 25672.diff

File 25672.diff, 24.4 KB (added by markoheijnen, 11 years ago)
  • wp-admin/includes/template.php

     
    147147
    148148        extract( wp_parse_args($args, $defaults), EXTR_SKIP );
    149149
    150         if ( empty($walker) || !is_a($walker, 'Walker') )
     150        if ( empty($walker) || ! ( $walker instanceof Walker ) )
    151151                $walker = new Walker_Category_Checklist;
    152152
    153153        $descendants_and_self = (int) $descendants_and_self;
  • wp-admin/includes/screen.php

     
    389389         */
    390390        public static function get( $hook_name = '' ) {
    391391
    392                 if ( is_a( $hook_name, 'WP_Screen' ) )
     392                if ( $hook_name instanceof WP_Screen )
    393393                        return $hook_name;
    394394
    395395                $post_type = $taxonomy = null;
  • wp-admin/includes/class-wp-users-list-table.php

     
    227227        function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
    228228                global $wp_roles;
    229229
    230                 if ( !( is_object( $user_object ) && is_a( $user_object, 'WP_User' ) ) )
     230                if ( ! ( is_object( $user_object ) && ( $user_object instanceof WP_User ) ) )
    231231                        $user_object = get_userdata( (int) $user_object );
     232
    232233                $user_object->filter = 'display';
    233234                $email = $user_object->user_email;
    234235
  • wp-admin/includes/theme.php

     
    117117        if ( !isset($themes_update) )
    118118                $themes_update = get_site_transient('update_themes');
    119119
    120         if ( ! is_a( $theme, 'WP_Theme' ) )
     120        if ( ! ( $theme instanceof WP_Theme ) )
    121121                return;
    122122
    123123        $stylesheet = $theme->get_stylesheet();
  • wp-includes/general-template.php

     
    21512151 */
    21522152function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
    21532153        global $wp_styles;
    2154         if ( !is_a($wp_styles, 'WP_Styles') )
     2154        if ( ! ( $wp_styles instanceof WP_Styles ) )
    21552155                $wp_styles = new WP_Styles();
    21562156
    21572157        // For backward compatibility
  • wp-includes/capabilities.php

     
    486486                        );
    487487                }
    488488
    489                 if ( is_a( $id, 'WP_User' ) ) {
     489                if ( $id instanceof WP_User ) {
    490490                        $this->init( $id->data, $blog_id );
    491491                        return;
    492492                } elseif ( is_object( $id ) ) {
  • wp-includes/Text/Diff/Renderer.php

     
    8383            /* If these are unchanged (copied) lines, and we want to keep
    8484             * leading or trailing context lines, extract them from the copy
    8585             * block. */
    86             if (is_a($edit, 'Text_Diff_Op_copy')) {
     86            if ( $edit instanceof Text_Diff_Op_copy ) {
    8787                /* Do we have any diff blocks yet? */
    8888                if (is_array($block)) {
    8989                    /* How many lines to keep as context from the copy
  • wp-includes/Text/Diff.php

     
    7474    {
    7575        $count = 0;
    7676        foreach ($this->_edits as $edit) {
    77             if (is_a($edit, 'Text_Diff_Op_add') ||
    78                 is_a($edit, 'Text_Diff_Op_change')) {
     77            if ( ( $edit instanceof Text_Diff_Op_add ) ||
     78                ( $edit instanceof Text_Diff_Op_change ) ) {
    7979                $count += $edit->nfinal();
    8080            }
    8181        }
     
    9393    {
    9494        $count = 0;
    9595        foreach ($this->_edits as $edit) {
    96             if (is_a($edit, 'Text_Diff_Op_delete') ||
    97                 is_a($edit, 'Text_Diff_Op_change')) {
     96            if ( ( $edit instanceof Text_Diff_Op_delete ) ||
     97                ( $edit instanceof Text_Diff_Op_change ) ) {
    9898                $count += $edit->norig();
    9999            }
    100100        }
     
    137137    function isEmpty()
    138138    {
    139139        foreach ($this->_edits as $edit) {
    140             if (!is_a($edit, 'Text_Diff_Op_copy')) {
     140            if ( ! ( $edit instanceof Text_Diff_Op_copy ) ) {
    141141                return false;
    142142            }
    143143        }
     
    155155    {
    156156        $lcs = 0;
    157157        foreach ($this->_edits as $edit) {
    158             if (is_a($edit, 'Text_Diff_Op_copy')) {
     158            if ( $edit instanceof Text_Diff_Op_copy ) {
    159159                $lcs += count($edit->orig);
    160160            }
    161161        }
  • wp-includes/deprecated.php

     
    26702670        if ( is_object($user) ) {
    26712671                if ( !isset($user->ID) )
    26722672                        $user->ID = 0;
    2673                 if ( !is_a( $user, 'WP_User' ) ) {
     2673                if ( ! ( $user instanceof WP_User ) ) {
    26742674                        $vars = get_object_vars($user);
    26752675                        foreach ( array_keys($vars) as $field ) {
    26762676                                if ( is_string($user->$field) || is_numeric($user->$field) )
  • wp-includes/pluggable.php

     
    221221        global $phpmailer;
    222222
    223223        // (Re)create it, if it's gone missing
    224         if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
     224        if ( !is_object( $phpmailer ) || ! ( $phpmailer instanceof PHPMailer ) ) {
    225225                require_once ABSPATH . WPINC . '/class-phpmailer.php';
    226226                require_once ABSPATH . WPINC . '/class-smtp.php';
    227227                $phpmailer = new PHPMailer( true );
  • wp-includes/widgets.php

     
    11351135        global $wp_widget_factory;
    11361136
    11371137        $widget_obj = $wp_widget_factory->widgets[$widget];
    1138         if ( !is_a($widget_obj, 'WP_Widget') )
     1138        if ( ! ( $widget_obj instanceof WP_Widget ) )
    11391139                return;
    11401140
    11411141        $before_widget = sprintf('<div class="widget %s">', $widget_obj->widget_options['classname'] );
  • wp-includes/script-loader.php

     
    698698        if ( ! did_action('wp_print_scripts') )
    699699                do_action('wp_print_scripts');
    700700
    701         if ( !is_a($wp_scripts, 'WP_Scripts') )
     701        if ( ! ( $wp_scripts instanceof WP_Scripts ) )
    702702                $wp_scripts = new WP_Scripts();
    703703
    704704        script_concat_settings();
     
    720720function print_footer_scripts() {
    721721        global $wp_scripts, $concatenate_scripts;
    722722
    723         if ( !is_a($wp_scripts, 'WP_Scripts') )
     723        if ( ! ( $wp_scripts instanceof WP_Scripts ) )
    724724                return array(); // No need to run if not instantiated.
    725725
    726726        script_concat_settings();
     
    779779
    780780        global $wp_scripts;
    781781
    782         if ( !is_a($wp_scripts, 'WP_Scripts') )
     782        if ( ! ( $wp_scripts instanceof WP_Scripts ) )
    783783                return array(); // no need to run if nothing is queued
    784784
    785785        return print_head_scripts();
     
    824824function print_admin_styles() {
    825825        global $wp_styles, $concatenate_scripts, $compress_css;
    826826
    827         if ( !is_a($wp_styles, 'WP_Styles') )
     827        if ( ! ( $wp_styles instanceof WP_Styles ) )
    828828                $wp_styles = new WP_Styles();
    829829
    830830        script_concat_settings();
     
    850850function print_late_styles() {
    851851        global $wp_styles, $concatenate_scripts;
    852852
    853         if ( !is_a($wp_styles, 'WP_Styles') )
     853        if ( ! ( $wp_styles instanceof WP_Styles ) )
    854854                return;
    855855
    856856        $wp_styles->do_concat = $concatenate_scripts;
  • wp-includes/class-wp-error.php

     
    202202 * @return bool True, if WP_Error. False, if not WP_Error.
    203203 */
    204204function is_wp_error($thing) {
    205         if ( is_object($thing) && is_a($thing, 'WP_Error') )
     205        if ( is_object($thing) && ( $thing instanceof WP_Error ) )
    206206                return true;
    207207        return false;
    208208}
  • wp-includes/ms-functions.php

     
    17201720 * @return bool
    17211721 */
    17221722function is_user_spammy( $user = null ) {
    1723     if ( ! is_a( $user, 'WP_User' ) ) {
     1723    if ( ! ( $user instanceof WP_User ) ) {
    17241724                if ( $user )
    17251725                        $user = get_user_by( 'login', $user );
    17261726                else
  • wp-includes/category-template.php

     
    728728function walk_category_tree() {
    729729        $args = func_get_args();
    730730        // the user's options are the third parameter
    731         if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
     731        if ( empty( $args[2]['walker'] ) || ! $args[2]['walker'] instanceof Walker )
    732732                $walker = new Walker_Category;
    733733        else
    734734                $walker = $args[2]['walker'];
     
    746746function walk_category_dropdown_tree() {
    747747        $args = func_get_args();
    748748        // the user's options are the third parameter
    749         if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
     749        if ( empty( $args[2]['walker'] ) || ! $args[2]['walker'] instanceof Walker )
    750750                $walker = new Walker_CategoryDropdown;
    751751        else
    752752                $walker = $args[2]['walker'];
  • wp-includes/class-feed.php

     
    3737        }
    3838
    3939        function save($data) {
    40                 if ( is_a($data, 'SimplePie') )
     40                if ( $data instanceof SimplePie )
    4141                        $data = $data->data;
    4242
    4343                set_transient($this->name, $data, $this->lifetime);
  • wp-includes/class-wp-customize-manager.php

     
    527527         * @param array $args Setting arguments.
    528528         */
    529529        public function add_setting( $id, $args = array() ) {
    530                 if ( is_a( $id, 'WP_Customize_Setting' ) )
     530                if ( $id instanceof WP_Customize_Setting )
    531531                        $setting = $id;
    532532                else
    533533                        $setting = new WP_Customize_Setting( $this, $id, $args );
     
    568568         * @param array $args Section arguments.
    569569         */
    570570        public function add_section( $id, $args = array() ) {
    571                 if ( is_a( $id, 'WP_Customize_Section' ) )
     571                if ( $id instanceof WP_Customize_Section )
    572572                        $section = $id;
    573573                else
    574574                        $section = new WP_Customize_Section( $this, $id, $args );
     
    609609         * @param array $args Setting arguments.
    610610         */
    611611        public function add_control( $id, $args = array() ) {
    612                 if ( is_a( $id, 'WP_Customize_Control' ) )
     612                if ( $id instanceof WP_Customize_Control )
    613613                        $control = $id;
    614614                else
    615615                        $control = new WP_Customize_Control( $this, $id, $args );
  • wp-includes/functions.wp-scripts.php

     
    3030                $handles = false;
    3131
    3232        global $wp_scripts;
    33         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     33        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    3434                if ( ! did_action( 'init' ) )
    3535                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    3636                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    6767 */
    6868function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
    6969        global $wp_scripts;
    70         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     70        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    7171                if ( ! did_action( 'init' ) )
    7272                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    7373                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    107107 */
    108108function wp_localize_script( $handle, $object_name, $l10n ) {
    109109        global $wp_scripts;
    110         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     110        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    111111                if ( ! did_action( 'init' ) )
    112112                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    113113                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    133133 */
    134134function wp_deregister_script( $handle ) {
    135135        global $wp_scripts;
    136         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     136        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    137137                if ( ! did_action( 'init' ) )
    138138                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    139139                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    189189 */
    190190function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
    191191        global $wp_scripts;
    192         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     192        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    193193                if ( ! did_action( 'init' ) )
    194194                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    195195                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    217217 */
    218218function wp_dequeue_script( $handle ) {
    219219        global $wp_scripts;
    220         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     220        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    221221                if ( ! did_action( 'init' ) )
    222222                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    223223                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    242242 */
    243243function wp_script_is( $handle, $list = 'enqueued' ) {
    244244        global $wp_scripts;
    245         if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
     245        if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
    246246                if ( ! did_action( 'init' ) )
    247247                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    248248                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
  • wp-includes/compat.php

     
    6565        function json_encode( $string ) {
    6666                global $wp_json;
    6767
    68                 if ( !is_a($wp_json, 'Services_JSON') ) {
     68                if ( ! ( $wp_json instanceof Services_JSON ) ) {
    6969                        require_once( ABSPATH . WPINC . '/class-json.php' );
    7070                        $wp_json = new Services_JSON();
    7171                }
     
    7878        function json_decode( $string, $assoc_array = false ) {
    7979                global $wp_json;
    8080
    81                 if ( !is_a($wp_json, 'Services_JSON') ) {
     81                if ( ! ( $wp_json instanceof Services_JSON ) ) {
    8282                        require_once( ABSPATH . WPINC . '/class-json.php' );
    8383                        $wp_json = new Services_JSON();
    8484                }
  • wp-includes/post.php

     
    389389        if ( empty( $post ) && isset( $GLOBALS['post'] ) )
    390390                $post = $GLOBALS['post'];
    391391
    392         if ( is_a( $post, 'WP_Post' ) ) {
     392        if ( $post instanceof WP_Post ) {
    393393                $_post = $post;
    394394        } elseif ( is_object( $post ) ) {
    395395                if ( empty( $post->filter ) ) {
  • wp-includes/class-wp-theme.php

     
    263263                // Set the parent, if we're a child theme.
    264264                if ( $this->template != $this->stylesheet ) {
    265265                        // If we are a parent, then there is a problem. Only two generations allowed! Cancel things out.
    266                         if ( is_a( $_child, 'WP_Theme' ) && $_child->template == $this->stylesheet ) {
     266                        if ( ( $_child instanceof WP_Theme ) && $_child->template == $this->stylesheet ) {
    267267                                $_child->parent = null;
    268268                                $_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), $_child->template ) );
    269269                                $_child->cache_add( 'theme', array( 'headers' => $_child->headers, 'errors' => $_child->errors, 'stylesheet' => $_child->stylesheet, 'template' => $_child->template ) );
  • wp-includes/class-IXR.php

     
    8282        }
    8383
    8484        // Deal with IXR object types base64 and date
    85         if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
     85        if ( is_object( $this->data ) && ( $this->data instanceof IXR_Date ) ) {
    8686            return 'date';
    8787        }
    88         if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
     88        if ( is_object( $this->data ) && ( $this->data instanceof IXR_Base64 ) ) {
    8989            return 'base64';
    9090        }
    9191
     
    391391        $result = $this->call($this->message->methodName, $this->message->params);
    392392
    393393        // Is the result an error?
    394         if (is_a($result, 'IXR_Error')) {
     394        if ( $result instanceof IXR_Error ) {
    395395            $this->error($result);
    396396        }
    397397
     
    538538            } else {
    539539                $result = $this->call($method, $params);
    540540            }
    541             if (is_a($result, 'IXR_Error')) {
     541            if ( $result instanceof IXR_Error ) {
    542542                $return[] = array(
    543543                    'faultCode' => $result->code,
    544544                    'faultString' => $result->message
     
    976976                    break;
    977977                case 'date':
    978978                case 'dateTime.iso8601':
    979                     if (!is_a($arg, 'IXR_Date')) {
     979                    if ( ! ( $arg instanceof IXR_Date ) ) {
    980980                        $ok = false;
    981981                    }
    982982                    break;
  • wp-includes/user.php

     
    7070 */
    7171add_filter('authenticate', 'wp_authenticate_username_password', 20, 3);
    7272function wp_authenticate_username_password($user, $username, $password) {
    73         if ( is_a($user, 'WP_User') ) { return $user; }
     73        if ( $user instanceof WP_User )
     74                return $user;
    7475
    7576        if ( empty($username) || empty($password) ) {
    7677                if ( is_wp_error( $user ) )
     
    107108 * Authenticate the user using the WordPress auth cookie.
    108109 */
    109110function wp_authenticate_cookie($user, $username, $password) {
    110         if ( is_a($user, 'WP_User') ) { return $user; }
     111        if ( $user instanceof WP_User )
     112                return $user;
    111113
    112114        if ( empty($username) && empty($password) ) {
    113115                $user_id = wp_validate_auth_cookie();
     
    137139 * @since 3.7.0
    138140 */
    139141function wp_authenticate_spam_check( $user ) {
    140         if ( $user && is_a( $user, 'WP_User' ) && is_multisite() ) {
     142        if ( $user && ( $user instanceof WP_User ) && is_multisite() ) {
    141143                $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy(), $user );
    142144
    143145                if ( $spammed )
     
    13021304function wp_insert_user( $userdata ) {
    13031305        global $wpdb;
    13041306
    1305         if ( is_a( $userdata, 'stdClass' ) )
     1307        if ( $userdata instanceof stdClass )
    13061308                $userdata = get_object_vars( $userdata );
    1307         elseif ( is_a( $userdata, 'WP_User' ) )
     1309        elseif ( $userdata instanceof WP_User )
    13081310                $userdata = $userdata->to_array();
    13091311
    13101312        extract( $userdata, EXTR_SKIP );
     
    14601462 * @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated.
    14611463 */
    14621464function wp_update_user($userdata) {
    1463         if ( is_a( $userdata, 'stdClass' ) )
     1465        if ( $userdata instanceof stdClass )
    14641466                $userdata = get_object_vars( $userdata );
    1465         elseif ( is_a( $userdata, 'WP_User' ) )
     1467        elseif ( $userdata instanceof WP_User )
    14661468                $userdata = $userdata->to_array();
    14671469
    14681470        $ID = (int) $userdata['ID'];
  • wp-includes/functions.wp-styles.php

     
    3131                do_action( 'wp_print_styles' );
    3232
    3333        global $wp_styles;
    34         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     34        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    3535                if ( ! did_action( 'init' ) )
    3636                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    3737                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    6464 */
    6565function wp_add_inline_style( $handle, $data ) {
    6666        global $wp_styles;
    67         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     67        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    6868                if ( ! did_action( 'init' ) )
    6969                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    7070                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    9999 */
    100100function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
    101101        global $wp_styles;
    102         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     102        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    103103                if ( ! did_action( 'init' ) )
    104104                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    105105                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    121121 */
    122122function wp_deregister_style( $handle ) {
    123123        global $wp_styles;
    124         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     124        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    125125                if ( ! did_action( 'init' ) )
    126126                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    127127                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    154154 */
    155155function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
    156156        global $wp_styles;
    157         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     157        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    158158                if ( ! did_action( 'init' ) )
    159159                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    160160                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    180180 */
    181181function wp_dequeue_style( $handle ) {
    182182        global $wp_styles;
    183         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     183        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    184184                if ( ! did_action( 'init' ) )
    185185                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    186186                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
     
    204204 */
    205205function wp_style_is( $handle, $list = 'enqueued' ) {
    206206        global $wp_styles;
    207         if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
     207        if ( ! ( $wp_styles instanceof WP_Styles ) ) {
    208208                if ( ! did_action( 'init' ) )
    209209                        _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
    210210                                '<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );