Make WordPress Core

Changeset 55914


Ignore:
Timestamp:
06/14/2023 10:33:37 AM (15 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/class-wp-oembed.php.

Follow-up to [13996].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed.php

    r55897 r55914  
    238238            return $this->$name( ...$arguments );
    239239        }
     240
    240241        return false;
    241242    }
     
    552553                continue;
    553554            }
     555
    554556            return ( $result && ! is_wp_error( $result ) ) ? $result : false;
    555557        }
     558
    556559        return false;
    557560    }
     
    573576
    574577        $response = wp_safe_remote_get( $provider_url_with_args, $args );
    575         if ( 501 == wp_remote_retrieve_response_code( $response ) ) {
     578
     579        if ( 501 === wp_remote_retrieve_response_code( $response ) ) {
    576580            return new WP_Error( 'not-implemented' );
    577581        }
     582
    578583        $body = wp_remote_retrieve_body( $response );
    579584        if ( ! $body ) {
    580585            return false;
    581586        }
     587
    582588        $parse_method = "_parse_$format";
     589
    583590        return $this->$parse_method( $body );
    584591    }
     
    594601    private function _parse_json( $response_body ) {
    595602        $data = json_decode( trim( $response_body ) );
     603
    596604        return ( $data && is_object( $data ) ) ? $data : false;
    597605    }
Note: See TracChangeset for help on using the changeset viewer.