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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
226 | * @since 2.9.0 |
227 | * |
228 | * @see WP_Embed::shortcode() |
229 | * |
230 | * @param mixed $cache The cached HTML result, stored in post meta. |
231 | * @param string $url The attempted embed URL. |
232 | * @param array $attr An array of shortcode attributes. |
233 | * @param int $post_ID Post ID. |
234 | */ |
235 | return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_ID ); |
236 | } |
237 | } |
238 |
|
239 | /** |
240 | * Filter whether to inspect the given URL for discoverable <link> tags. |
241 | * |
242 | * @since 2.9.0 |
243 | * |
244 | * @see WP_oEmbed::discover() |
Line | Code |
255 | update_post_meta( $post_ID, $cachekey, $html ); |
256 | update_post_meta( $post_ID, $cachekey_time, time() ); |
257 | } elseif ( ! $cache ) { |
258 | update_post_meta( $post_ID, $cachekey, '{{unknown}}' ); |
259 | } |
260 |
|
261 | // If there was a result, return it |
262 | if ( $html ) { |
263 | /** This filter is documented in wp-includes/class-wp-embed.php */ |
264 | return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_ID ); |
265 | } |
266 | } |
267 |
|
268 | // Still unknown |
269 | return $this->maybe_make_link( $url ); |
270 | } |
271 |
|
272 | /** |
273 | * Delete all oEmbed caches. Unused by core as of 4.0.0. |