WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 30 | /** |
| 31 | * PHP5 constructor |
| 32 | * |
| 33 | * @uses apply_filters() Filters a list of pre-defined oEmbed providers. |
| 34 | */ |
| 35 | function __construct() { |
| 36 | // List out some popular sites that support oEmbed. |
| 37 | // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. |
| 38 | // Add to this list using the wp_oembed_add_provider() function (see it's PHPDoc for details). |
| 39 | $this->providers = apply_filters( 'oembed_providers', array( |
| 40 | '#http://(www\.)?youtube.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), |
| 41 | 'http://blip.tv/file/*' => array( 'http://blip.tv/oembed/', false ), |
| 42 | '#http://(www\.)?vimeo\.com/.*#i' => array( 'http://www.vimeo.com/api/oembed.{format}', true ), |
| 43 | '#http://(www\.)?dailymotion\.com/.*#i' => array( 'http://www.dailymotion.com/api/oembed', true ), |
| 44 | '#http://(www\.)?flickr\.com/.*#i' => array( 'http://www.flickr.com/services/oembed/', true ), |
| 45 | '#http://(www\.)?hulu\.com/watch/.*#i' => array( 'http://www.hulu.com/api/oembed.{format}', true ), |
| 46 | '#http://(www\.)?viddler\.com/.*#i' => array( 'http://lab.viddler.com/services/oembed/', true ), |
| 47 | 'http://qik.com/*' => array( 'http://qik.com/api/oembed.{format}', false ), |
| 48 | 'http://revision3.com/*' => array( 'http://revision3.com/api/oembed/', false ), |