From f94f58fbb114dcdfe2c3b80a558a60e795d49b96 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 18 Nov 2015 20:51:26 +0000 Subject: [PATCH] Embeds: Introduce `print_embed_comments_button()`, `print_embed_sharing_button()`, and `print_embed_sharing_dialog()`, which respectively output the comments button, sharing buttons, and sharing dialog elements in the embed template. This change hooks these new output functions to existing hooks in the embed template, allowing for more straightforward display control of these elements. Leaves the embed header and footer intact pending further modularization in a future release. Props juliobox, swissspidy, DrewAPicture. See #34561. Built from https://develop.svn.wordpress.org/trunk@35689 git-svn-id: http://core.svn.wordpress.org/trunk@35653 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 4 ++ wp-includes/embed-functions.php | 91 +++++++++++++++++++++++++++++++++ wp-includes/embed-template.php | 54 ------------------- wp-includes/version.php | 2 +- 4 files changed, 96 insertions(+), 55 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index e4ac939f4f..75ca351c20 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -458,6 +458,10 @@ add_action( 'embed_head', 'wp_no_robots' ); add_action( 'embed_head', 'rel_canonical' ); add_action( 'embed_head', 'locale_stylesheet' ); +add_action( 'embed_content_meta', 'print_embed_comments_button' ); +add_action( 'embed_content_meta', 'print_embed_sharing_button' ); + +add_action( 'embed_footer', 'print_embed_sharing_dialog' ); add_action( 'embed_footer', 'print_embed_scripts' ); add_action( 'embed_footer', 'wp_print_footer_scripts', 20 ); diff --git a/wp-includes/embed-functions.php b/wp-includes/embed-functions.php index 2ddc81842d..549ff9545c 100644 --- a/wp-includes/embed-functions.php +++ b/wp-includes/embed-functions.php @@ -954,3 +954,94 @@ function print_embed_scripts() { function _oembed_filter_feed_content( $content ) { return str_replace( '