Changeset 34974 for trunk/src/wp-includes/embed-functions.php
- Timestamp:
- 10/08/2015 11:21:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed-functions.php
r34972 r34974 680 680 * Filters the given oEmbed HTML. 681 681 * 682 * If the $urlisn't on the trusted providers list,682 * If the `$url` isn't on the trusted providers list, 683 683 * we need to filter the HTML heavily for security. 684 684 * … … 687 687 * @since 4.4.0 688 688 * 689 * @param string $re turn The returned oEmbed HTML.689 * @param string $result The oEmbed HTML result. 690 690 * @param object $data A data object result from an oEmbed provider. 691 691 * @param string $url The URL of the content to be embedded. 692 692 * @return string The filtered and sanitized oEmbed result. 693 693 */ 694 function wp_filter_oembed_result( $re turn, $data, $url ) {695 if ( false === $re turn|| ! in_array( $data->type, array( 'rich', 'video' ) ) ) {696 return $re turn;694 function wp_filter_oembed_result( $result, $data, $url ) { 695 if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ) ) ) { 696 return $result; 697 697 } 698 698 … … 702 702 // Don't modify the HTML for trusted providers. 703 703 if ( false !== $wp_oembed->get_provider( $url, array( 'discover' => false ) ) ) { 704 return $re turn;704 return $result; 705 705 } 706 706 … … 719 719 ); 720 720 721 $html = wp_kses( $re turn, $allowed_html );721 $html = wp_kses( $result, $allowed_html ); 722 722 preg_match( '|^.*(<iframe.*?></iframe>).*$|m', $html, $iframes ); 723 723
Note: See TracChangeset
for help on using the changeset viewer.