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 |
---|---|
280 | * @since 2.9.0 |
281 | * |
282 | * @see WP_Embed::shortcode() |
283 | * |
284 | * @param string|false $cache The cached HTML result, stored in post meta. |
285 | * @param string $url The attempted embed URL. |
286 | * @param array $attr An array of shortcode attributes. |
287 | * @param int $post_id Post ID. |
288 | */ |
289 | return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_id ); |
290 | } |
291 | } |
292 |
|
293 | /** |
294 | * Filters whether to inspect the given URL for discoverable link tags. |
295 | * |
296 | * @since 2.9.0 |
297 | * @since 4.4.0 The default value changed to true. |
298 | * |
Line | Code |
363 |
|
364 | if ( $has_kses ) { |
365 | kses_init_filters(); |
366 | } |
367 | } |
368 |
|
369 | // If there was a result, return it. |
370 | if ( $html ) { |
371 | /** This filter is documented in wp-includes/class-wp-embed.php */ |
372 | return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_id ); |
373 | } |
374 |
|
375 | // Still unknown. |
376 | return $this->maybe_make_link( $url ); |
377 | } |
378 |
|
379 | /** |
380 | * Deletes all oEmbed caches. Unused by core as of 4.0.0. |
381 | * |