mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld. Fixes #40185. Built from https://develop.svn.wordpress.org/trunk@40422 git-svn-id: http://core.svn.wordpress.org/trunk@40320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d8451ff70
commit
902b91400d
@ -50,10 +50,16 @@ function post_submit_meta_box( $post, $args = array() ) {
|
||||
<?php
|
||||
$preview_link = esc_url( get_preview_post_link( $post ) );
|
||||
if ( 'publish' == $post->post_status ) {
|
||||
$preview_button = __( 'Preview Changes' );
|
||||
$preview_button_text = __( 'Preview Changes' );
|
||||
} else {
|
||||
$preview_button = __( 'Preview' );
|
||||
$preview_button_text = __( 'Preview' );
|
||||
}
|
||||
|
||||
$preview_button = sprintf( '%1$s<span class="screen-reader-text"> %2$s</span>',
|
||||
$preview_button_text,
|
||||
/* translators: accessibility text */
|
||||
__( '(link opens in a new window)' )
|
||||
);
|
||||
?>
|
||||
<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>
|
||||
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40421';
|
||||
$wp_version = '4.8-alpha-40422';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user