Changeset 36873
- Timestamp:
- 03/07/2016 09:59:02 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r36708 r36873 491 491 absint( $width ), 492 492 absint( $height ), 493 esc_attr__( 'Embedded WordPress Post' ) 493 esc_attr( 494 sprintf( 495 /* translators: 1: post title, 2: site name */ 496 __( '“%1$s” — %2$s' ), 497 get_the_title( $post ), 498 get_bloginfo( 'name' ) 499 ) 500 ) 494 501 ); 495 502 -
trunk/tests/phpunit/tests/oembed/template.php
r36694 r36873 243 243 function test_get_post_embed_html() { 244 244 $post_id = self::factory()->post->create(); 245 246 $expected = '<iframe sandbox="allow-scripts" security="restricted" src="' . esc_url( get_post_embed_url( $post_id ) ) . '" width="200" height="200" title="Embedded WordPress Post" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>'; 245 $title = esc_attr( 246 sprintf( 247 __( '“%1$s” — %2$s' ), 248 get_the_title( $post_id ), 249 get_bloginfo( 'name' ) 250 ) 251 ); 252 253 $expected = '<iframe sandbox="allow-scripts" security="restricted" src="' . esc_url( get_post_embed_url( $post_id ) ) . '" width="200" height="200" title="' . $title . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe>'; 247 254 248 255 $this->assertStringEndsWith( $expected, get_post_embed_html( 200, 200, $post_id ) );
Note: See TracChangeset
for help on using the changeset viewer.