[wp-trac] [WordPress Trac] #35804: Add post type to the oEmbed iframe 'title' attribute

WordPress Trac noreply at wordpress.org
Thu Feb 11 22:06:43 UTC 2016


#35804: Add post type to the oEmbed iframe 'title' attribute
--------------------------+-----------------------------
 Reporter:  ramiy         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Embeds        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Currently, the oEmbed output has a `title` attribute on the `<iframe>` tag
 saying "'''Embedded WordPress Post'''".

 {{{
 <iframe title="Embedded WordPress Post">
 }}}

 It's a hard-coded text.

 We should replace the "'''Post'''" to support custom post types.

 The attached patch do that.

 I replaced the old code:
 {{{
 esc_attr__( 'Embedded WordPress Post' )
 }}}


 With the new code:
 {{{
 esc_attr__(
         sprintf(
                 /* translators: %s: post type */
                 __( 'Embedded WordPress %s' ),
                 $post->post_type
         )
 )
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35804>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list