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 | '#https?://(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 | '#https?://(www\.)?vimeo\.com/.*#i' => array( 'http://vimeo.com/api/oembed.{format}', true ), |
37 | '#https?://(www\.)?dailymotion\.com/.*#i' => array( 'http://www.dailymotion.com/services/oembed', true ), |
38 | 'http://dai.ly/*' => array( 'http://www.dailymotion.com/services/oembed', false ), |
39 | '#https?://(www\.)?flickr\.com/.*#i' => array( 'http://www.flickr.com/services/oembed/', true ), |
40 | 'http://flic.kr/*' => array( 'http://www.flickr.com/services/oembed/', false ), |
41 | '#https?://(.+\.)?smugmug\.com/.*#i' => array( 'http://api.smugmug.com/services/oembed/', true ), |