post_embed_url
Filters the URL to embed a specific post.
Использование
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(строка)
- The post embed URL.
- $post(WP_Post)
- The corresponding post object.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
post_embed_url
wp-includes/embed.php 429
return sanitize_url( apply_filters( 'post_embed_url', $embed_url, $post ) );