Changeset 28728
- Timestamp:
- 06/10/2014 06:13:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-oembed.php
r28651 r28728 96 96 97 97 /** 98 * T he do-it-all function that takes a URL and attempts to return the HTML.98 * Takes a URL and returns the corresponding oEmbed provider's URL, if there is one. 99 99 * 100 100 * @see WP_oEmbed::discover() 101 * @see WP_oEmbed::fetch()102 * @ see WP_oEmbed::data2html()103 * 104 * @ param string $url The URL to the content that should be attempted to be embedded.105 * @ param array $args Optional arguments. Usually passed from a shortcode.106 * @return bool|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.107 */108 public function get_html( $url, $args = '' ) { 101 * 102 * @param string $url The URL to the content. 103 * @param array $args Optional arguments. 104 * @return bool|string False on failure, otherwise the oEmbed provider URL. 105 * @since 4.0.0 106 */ 107 public function get_provider( $url, $args = '' ) { 108 109 109 $provider = false; 110 110 … … 129 129 if ( !$provider && $args['discover'] ) 130 130 $provider = $this->discover( $url ); 131 132 return $provider; 133 } 134 135 /** 136 * The do-it-all function that takes a URL and attempts to return the HTML. 137 * 138 * @see WP_oEmbed::fetch() 139 * @see WP_oEmbed::data2html() 140 * 141 * @param string $url The URL to the content that should be attempted to be embedded. 142 * @param array $args Optional arguments. Usually passed from a shortcode. 143 * @return bool|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed. 144 */ 145 function get_html( $url, $args = '' ) { 146 $provider = $this->get_provider( $url, $args ); 131 147 132 148 if ( !$provider || false === $data = $this->fetch( $provider, $url, $args ) )
Note: See TracChangeset
for help on using the changeset viewer.