Is there a way to hook into print_embed_sharing_dialog() and modify its output without hacking the core? We -really- dislike the new HTML output and Wordpress output options and want to display just one simple share link.
1 Answer
You can't modify the core function's output, but you can replace it with your own function by unhooking it from embed_footer
and adding your own function with custom output:
remove_action( 'embed_footer', 'print_embed_sharing_dialog' );
add_action( 'embed_footer', 'my_custom_sharing_dialog', 9 );
function my_custom_sharing_dialog() {
// write your own dialog html here
}
(I added it back with a priority of 9 to insure that it gets printed before the print_embed_scripts
.)