Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#34534 closed enhancement (fixed)

WP oEmbed: Filter entire logo markup to allow inline svg, objects, et al.

Reported by: peterwilsoncc's profile peterwilsoncc Owned by: swissspidy's profile swissspidy
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch commit
Focuses: docs Cc:

Description

The logo markup in wp-includes/embed-template.php includes an image tag.

printf(
        '<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' ) )
);

It'd be grand if the entire markup could be filterable to allow for inline-svg, objects, plain text and other markup for the logo.

Filter name suggestions:

  • embed_logo_markup
  • embed_site_title

Attachments (1)

34534.diff (1.7 KB) - added by swissspidy 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @dd32
10 years ago

  • Milestone changed from Awaiting Review to 4.4

Shifting for review by others

#2 @swissspidy
10 years ago

Sounds reasonable to me. While working on #34561 I've added an embed_site_title filter to the patch there.

#3 @wonderboymusic
10 years ago

  • Owner set to swissspidy
  • Status changed from new to assigned

#4 @swissspidy
10 years ago

  • Status changed from assigned to accepted

@swissspidy
10 years ago

#5 @swissspidy
10 years ago

  • Focuses docs added
  • Keywords has-patch commit added; needs-patch removed

#6 @pento
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 35578:

Embeds: Add a filter for the site title HTML.

Props swissspidy.

Fixes #34534.

Note: See TracTickets for help on using tickets.