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 |
|---|---|
| 23 | /** |
| 24 | * Constructor |
| 25 | * |
| 26 | * @uses apply_filters() Filters a list of pre-defined oEmbed providers. |
| 27 | */ |
| 28 | function __construct() { |
| 29 | // List out some popular sites that support oEmbed. |
| 30 | // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. |
| 31 | // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). |
| 32 | $this->providers = apply_filters( 'oembed_providers', array( |
| 33 | '#http://(www\.)?youtube.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), |
| 34 | 'http://youtu.be/*' => array( 'http://www.youtube.com/oembed', false ), |
| 35 | 'http://blip.tv/*' => array( 'http://blip.tv/oembed/', false ), |
| 36 | '#http://(www\.)?vimeo\.com/.*#i' => array( 'http://vimeo.com/api/oembed.{format}', true ), |
| 37 | '#http://(www\.)?dailymotion\.com/.*#i' => array( 'http://www.dailymotion.com/api/oembed', true ), |
| 38 | '#http://(www\.)?flickr\.com/.*#i' => array( 'http://www.flickr.com/services/oembed/', true ), |
| 39 | '#http://(.+\.)?smugmug\.com/.*#i' => array( 'http://api.smugmug.com/services/oembed/', true ), |
| 40 | '#http://(www\.)?hulu\.com/watch/.*#i' => array( 'http://www.hulu.com/api/oembed.{format}', true ), |
| 41 | '#http://(www\.)?viddler\.com/.*#i' => array( 'http://lab.viddler.com/services/oembed/', true ), |