post_embed_url filter-hookWP 4.4.0

Filters the URL to embed a specific post.

Usage

add_filter( 'post_embed_url', 'wp_kama_post_embed_url_filter', 10, 2 );

/**
 * Function for `post_embed_url` filter-hook.
 * 
 * @param string  $embed_url The post embed URL.
 * @param WP_Post $post      The corresponding post object.
 *
 * @return string
 */
function wp_kama_post_embed_url_filter( $embed_url, $post ){

	// filter...
	return $embed_url;
}
$embed_url(string)
The post embed URL.
$post(WP_Post)
The corresponding post object.

Changelog

Since 4.4.0 Introduced.

Where the hook is called

get_post_embed_url()
post_embed_url
wp-includes/embed.php 429
return esc_url_raw( apply_filters( 'post_embed_url', $embed_url, $post ) );

Where the hook is used in WordPress

Usage not found.