Make WordPress Core


Ignore:
Timestamp:
03/21/2013 12:57:27 AM (12 years ago)
Author:
azaozz
Message:

Post locks: contain focus inside the dialog when tabbing, remove outline when focus is on the text, see #23697

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r23742 r23763  
    12161216
    12171217        $preview_link = apply_filters( 'preview_post_link', $preview_link );
     1218        $override = apply_filters( 'override_post_lock', true, $post, $user );
     1219        $tab_last = $override ? '' : ' wp-tab-last';
    12181220
    12191221        ?>
    12201222        <div class="post-locked-message">
    12211223        <div class="post-locked-avatar"><?php echo get_avatar( $user->ID, 64 ); ?></div>
    1222         <p class="currently-editing" tabindex="0"><?php esc_html_e( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p>
     1224        <p class="currently-editing wp-tab-first" tabindex="0"><?php esc_html_e( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p>
    12231225        <p>
    12241226        <a class="button" href="<?php echo esc_url( wp_get_referer() ); ?>"><?php _e('Go back'); ?></a>
    1225         <a class="button" href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a>
     1227        <a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a>
    12261228        <?php
    12271229
    12281230        // Allow plugins to prevent some users overriding the post lock
    1229         if ( apply_filters( 'override_post_lock', true, $post, $user ) ) {
     1231        if ( $override ) {
    12301232            ?>
    1231             <a class="button button-primary" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>
     1233            <a class="button button-primary wp-tab-last" href="<?php echo esc_url( add_query_arg( 'get-post-lock', '1', get_edit_post_link( $post->ID, 'url' ) ) ); ?>"><?php _e('Take over'); ?></a>
    12321234            <?php
    12331235        }
     
    12411243        <div class="post-taken-over">
    12421244            <div class="post-locked-avatar"></div>
    1243             <p class="currently-editing" tabindex="0"></p>
    1244             <p><a class="button button-primary" href="<?php echo esc_url( admin_url('edit.php') ); ?>"><?php _e('Go to All Posts'); ?></a></p>
     1245            <p class="currently-editing wp-tab-first" tabindex="0"></p>
     1246            <p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( admin_url('edit.php') ); ?>"><?php _e('Go to All Posts'); ?></a></p>
    12451247        </div>
    12461248        <?php
Note: See TracChangeset for help on using the changeset viewer.