Changeset 32533
- Timestamp:
- 05/21/2015 09:30:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-oembed.php
r32116 r32533 196 196 * @param string $url The URL to the content. 197 197 * @param string|array $args Optional provider arguments. 198 * @return bool|string False on failure, otherwise the oEmbed provider URL.198 * @return false|string False on failure, otherwise the oEmbed provider URL. 199 199 */ 200 200 public function get_provider( $url, $args = '' ) { … … 307 307 * 308 308 * @param string $url The URL that should be inspected for discovery `<link>` tags. 309 * @return bool|string False on failure, otherwise the oEmbed provider URL.309 * @return false|string False on failure, otherwise the oEmbed provider URL. 310 310 */ 311 311 public function discover( $url ) { … … 385 385 * @param string $url The URL to the content that is desired to be embedded. 386 386 * @param array $args Optional arguments. Usually passed from a shortcode. 387 * @return bool|object False on failure, otherwise the result in the form of an object.387 * @return false|object False on failure, otherwise the result in the form of an object. 388 388 */ 389 389 public function fetch( $provider, $url, $args = '' ) { … … 421 421 * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.) 422 422 * @param string $format Format to use 423 * @return bool|objectFalse on failure, otherwise the result in the form of an object.423 * @return false|object|WP_Error False on failure, otherwise the result in the form of an object. 424 424 */ 425 425 private function _fetch_with_format( $provider_url_with_args, $format ) { … … 443 443 * @since 3.0.0 444 444 * @access private 445 * 446 * @param string $response_body 447 * @return object|false 445 448 */ 446 449 private function _parse_json( $response_body ) { 447 return ( ( $data = json_decode( trim( $response_body ) ) ) && is_object( $data ) ) ? $data : false; 450 $data = json_decode( trim( $response_body ) ); 451 return ( $data && is_object( $data ) ) ? $data : false; 448 452 } 449 453 … … 453 457 * @since 3.0.0 454 458 * @access private 459 * 460 * @param string $response_body 461 * @return object|false 455 462 */ 456 463 private function _parse_xml( $response_body ) { … … 474 481 * @since 3.6.0 475 482 * @access private 483 * 484 * @param string $response_body 485 * @return object|false 476 486 */ 477 487 private function _parse_xml_body( $response_body ) {
Note: See TracChangeset
for help on using the changeset viewer.