Changeset 37798 for branches/4.4/src/wp-includes/class-oembed.php
- Timestamp:
- 06/21/2016 02:41:05 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4/src/wp-includes/class-oembed.php
r36066 r37798 285 285 */ 286 286 public function get_html( $url, $args = '' ) { 287 /** 288 * Filters the oEmbed result before any HTTP requests are made. 289 * 290 * This allows one to short-circuit the default logic, perhaps by 291 * replacing it with a routine that is more optimal for your setup. 292 * 293 * Passing a non-null value to the filter will effectively short-circuit retrieval, 294 * returning the passed value instead. 295 * 296 * @since 4.5.3 297 * 298 * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Default null. 299 * @param string $url The URL to the content that should be attempted to be embedded. 300 * @param array $args Optional. Arguments, usually passed from a shortcode. Default empty. 301 */ 302 $pre = apply_filters( 'pre_oembed_result', null, $url, $args ); 303 304 if ( null !== $pre ) { 305 return $pre; 306 } 307 287 308 $provider = $this->get_provider( $url, $args ); 288 309 289 if ( !$provider || false === $data = $this->fetch( $provider, $url, $args ) ) 290 return false; 310 if ( ! $provider || false === $data = $this->fetch( $provider, $url, $args ) ) { 311 return false; 312 } 291 313 292 314 /**
Note: See TracChangeset
for help on using the changeset viewer.