Make WordPress Core

Changeset 35578


Ignore:
Timestamp:
11/09/2015 12:10:36 AM (11 years ago)
Author:
pento
Message:

Embeds: Add a filter for the site title HTML.

Props swissspidy.

Fixes #34534.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/embed-template.php

    r35492 r35578  
    122122                                <div class="wp-embed-site-title">
    123123                                        <?php
    124                                         printf(
     124                                        $site_title = sprintf(
    125125                                                '<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>',
    126126                                                esc_url( home_url() ),
     
    129129                                                esc_html( get_bloginfo( 'name' ) )
    130130                                        );
     131
     132                                        /**
     133                                         * Filter the site title HTML in the embed footer.
     134                                         *
     135                                         * @since 4.4.0
     136                                         *
     137                                         * @param string $site_title The site title HTML.
     138                                         */
     139                                        echo apply_filters( 'embed_site_title_html', $site_title );
    131140                                        ?>
    132141                                </div>
     
    220229                        <div class="wp-embed-site-title">
    221230                                <?php
    222                                 printf(
     231                                $site_title = sprintf(
    223232                                        '<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>',
    224233                                        esc_url( home_url() ),
     
    227236                                        esc_html( get_bloginfo( 'name' ) )
    228237                                );
     238
     239                                /** This filter is documented in wp-includes/embed-template.php */
     240                                echo apply_filters( 'embed_site_title_html', $site_title );
    229241                                ?>
    230242                        </div>
Note: See TracChangeset for help on using the changeset viewer.