Embeds: Allow post title to be filtered when preparing an oEmbed response.
By changing the way the post title is added to the array of data from `$post->post_title` to `get_the_title()`, the title can now be modified using the `the_title` filter. This ensures post titles returned in oEmbed responses are consistent with those that show on a site. Props mheikkila, swissspidy. Fixes #42826. git-svn-id: https://develop.svn.wordpress.org/trunk@44907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b66ae2b4c1
commit
18a251d065
@ -539,7 +539,7 @@ function get_oembed_response_data( $post, $width ) {
|
|||||||
'provider_url' => get_home_url(),
|
'provider_url' => get_home_url(),
|
||||||
'author_name' => get_bloginfo( 'name' ),
|
'author_name' => get_bloginfo( 'name' ),
|
||||||
'author_url' => get_home_url(),
|
'author_url' => get_home_url(),
|
||||||
'title' => $post->post_title,
|
'title' => get_the_title( $post ),
|
||||||
'type' => 'link',
|
'type' => 'link',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user