Embeds: Add a filter for the site title HTML.

Props swissspidy.

Fixes #34534.




git-svn-id: https://develop.svn.wordpress.org/trunk@35578 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-11-09 00:10:36 +00:00
parent 6b9ba5893f
commit a62255ef65
1 changed files with 14 additions and 2 deletions

View File

@ -121,13 +121,22 @@ if ( have_posts() ) :
<div class="wp-embed-footer">
<div class="wp-embed-site-title">
<?php
printf(
$site_title = sprintf(
'<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>',
esc_url( home_url() ),
esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_html( get_bloginfo( 'name' ) )
);
/**
* Filter the site title HTML in the embed footer.
*
* @since 4.4.0
*
* @param string $site_title The site title HTML.
*/
echo apply_filters( 'embed_site_title_html', $site_title );
?>
</div>
@ -219,13 +228,16 @@ else :
<div class="wp-embed-footer">
<div class="wp-embed-site-title">
<?php
printf(
$site_title = sprintf(
'<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>',
esc_url( home_url() ),
esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_html( get_bloginfo( 'name' ) )
);
/** This filter is documented in wp-includes/embed-template.php */
echo apply_filters( 'embed_site_title_html', $site_title );
?>
</div>
</div>