[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/wp-includes/ -> class-oembed.php (summary)

API for fetching the HTML to embed remote content based on a provided URL. Used internally by the {@link WP_Embed} class, but is designed to be generic.

File Size: 270 lines (9 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_oEmbed:: (8 methods):
  WP_oEmbed()
  __construct()
  get_html()
  discover()
  fetch()
  data2html()
  strip_scribd_newlines()
  _wp_oembed_get_object()


Class: WP_oEmbed  - X-Ref

oEmbed class.

WP_oEmbed()   X-Ref
PHP4 constructor


__construct()   X-Ref
PHP5 constructor


get_html( $url, $args = '' )   X-Ref
The do-it-all function that takes a URL and attempts to return the HTML.

param: string $url The URL to the content that should be attempted to be embedded.
param: array $args Optional arguments. Usually passed from a shortcode.
return: bool|string False on failure, otherwise the UNSANITIZED (and potentially unsafe) HTML that should be used to embed.

discover( $url )   X-Ref
Attempts to find oEmbed provider discovery <link> tags at the given URL.

param: string $url The URL that should be inspected for discovery <link> tags.
return: bool|string False on failure, otherwise the oEmbed provider URL.

fetch( $provider, $url, $args = '' )   X-Ref
Connects to a oEmbed provider and returns the result.

param: string $provider The URL to the oEmbed provider.
param: string $url The URL to the content that is desired to be embedded.
param: array $args Optional arguments. Usually passed from a shortcode.
return: bool|object False on failure, otherwise the result in the form of an object.

data2html( $data, $url )   X-Ref
Converts a data object from {@link WP_oEmbed::fetch()} and returns the HTML.

param: object $data A data object result from an oEmbed provider.
param: string $url The URL to the content that is desired to be embedded.
return: bool|string False on error, otherwise the HTML needed to embed.

strip_scribd_newlines( $html, $data, $url )   X-Ref
Strip new lines from the HTML if it's a Scribd embed.

param: string $html Existing HTML.
param: object $data Data object from WP_oEmbed::data2html()
param: string $url The original URL passed to oEmbed.
return: string Possibly modified $html

_wp_oembed_get_object()   X-Ref
Returns the initialized {@link WP_oEmbed} object

return: WP_oEmbed object.



Generated: Fri Jan 8 00:19:48 2010 Cross-referenced by PHPXref 0.7