From 6b9ba5893ff878b7d94265becd3ddeeea58b675b Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 9 Nov 2015 00:07:03 +0000 Subject: [PATCH] Embeds: Fix support for embedding in non-WordPress sites. This moves the last of the iframe message code from PHP to JavaScript, so it can be included in any site, without needing to rely on any of WordPress' internal behaviour. Props swissspidy. Fixes #34451. git-svn-id: https://develop.svn.wordpress.org/trunk@35577 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/embed-functions.php | 10 +++---- src/wp-includes/js/wp-embed-template.js | 23 ++++++++++++++-- src/wp-includes/js/wp-embed.js | 30 +++++++++++++++------ tests/phpunit/tests/oembed/filterResult.php | 20 ++++++++++---- 4 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/wp-includes/embed-functions.php b/src/wp-includes/embed-functions.php index 24604c1faa..4bd142a42a 100644 --- a/src/wp-includes/embed-functions.php +++ b/src/wp-includes/embed-functions.php @@ -460,7 +460,7 @@ function get_post_embed_html( $width, $height, $post = null ) { $embed_url = get_post_embed_url( $post ); - $output = '
' . get_the_title( $post ) . "
\n"; + $output = '
' . get_the_title( $post ) . "
\n"; $output .= "