WordPress.org

Make WordPress Core

Ticket #40185: 40185.patch

File 40185.patch, 1002 bytes (added by rianrietveld, 2 years ago)
  • src/wp-admin/includes/meta-boxes.php

     
    5050<?php
    5151$preview_link = esc_url( get_preview_post_link( $post ) );
    5252if ( 'publish' == $post->post_status ) {
    53         $preview_button = __( 'Preview Changes' );
     53        $preview_button_text = __( 'Preview Changes' );
    5454} else {
    55         $preview_button = __( 'Preview' );
     55        $preview_button_text = __( 'Preview' );
    5656}
     57$preview_button = sprintf( '%1$s<span class="screen-reader-text"> %2$s</span>',
     58                            esc_html( $preview_button_text ),
     59                            esc_html__( '(link opens in a new window)' ) );
    5760?>
    5861<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview-<?php echo (int) $post->ID; ?>" id="post-preview"><?php echo $preview_button; ?></a>
    5962<input type="hidden" name="wp-preview" id="wp-preview" value="" />