Changeset 55914
- Timestamp:
- 06/14/2023 10:33:37 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-oembed.php
r55897 r55914 238 238 return $this->$name( ...$arguments ); 239 239 } 240 240 241 return false; 241 242 } … … 552 553 continue; 553 554 } 555 554 556 return ( $result && ! is_wp_error( $result ) ) ? $result : false; 555 557 } 558 556 559 return false; 557 560 } … … 573 576 574 577 $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 ) ) { 576 580 return new WP_Error( 'not-implemented' ); 577 581 } 582 578 583 $body = wp_remote_retrieve_body( $response ); 579 584 if ( ! $body ) { 580 585 return false; 581 586 } 587 582 588 $parse_method = "_parse_$format"; 589 583 590 return $this->$parse_method( $body ); 584 591 } … … 594 601 private function _parse_json( $response_body ) { 595 602 $data = json_decode( trim( $response_body ) ); 603 596 604 return ( $data && is_object( $data ) ) ? $data : false; 597 605 }
Note: See TracChangeset
for help on using the changeset viewer.