From b26621d336c7a832a675d030e065f6642c19c086 Mon Sep 17 00:00:00 2001 From: desrosj Date: Fri, 15 Mar 2019 16:42:54 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@44907 git-svn-id: http://core.svn.wordpress.org/trunk@44738 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/embed.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 5652326f56..2c5aedcaea 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -539,7 +539,7 @@ function get_oembed_response_data( $post, $width ) { 'provider_url' => get_home_url(), 'author_name' => get_bloginfo( 'name' ), 'author_url' => get_home_url(), - 'title' => $post->post_title, + 'title' => get_the_title( $post ), 'type' => 'link', ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 92cca06b5e..37ec4b5d14 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-alpha-44906'; +$wp_version = '5.2-alpha-44907'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.