WordPress.org

Make WordPress Core

Ticket #21334: 21334-3.diff

File 21334-3.diff, 2.2 KB (added by adamsilverstein, 5 years ago)

show quick links with 'enhanced accessibility' link in screen options

  • wp-admin/includes/screen.php

     
    904904                        case 'widgets': 
    905905                                $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 
    906906                                break; 
     907                        case 'edit-post': 
     908                                $this->_screen_settings = '<p><a id="access-on" href="edit.php?edit-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="edit.php?edit-access=off">' . __('Disable accessibility mode') . "</a></p>\n"; 
     909                                break; 
    907910                } 
    908911 
    909912                if ( $this->_screen_settings || $this->_options ) 
  • wp-admin/edit.php

     
    2424$wp_list_table = _get_list_table('WP_Posts_List_Table'); 
    2525$pagenum = $wp_list_table->get_pagenum(); 
    2626 
     27$edit_access = get_user_setting( 'edit_access' ); 
     28if ( isset($_GET['edit-access']) ) { 
     29        $edit_access = 'on' == $_GET['edit-access'] ? 'on' : 'off'; 
     30        set_user_setting( 'edit_access', $edit_access ); 
     31} 
     32 
     33function wp_edit_access_body_class($classes) { 
     34        return "$classes edit_access "; 
     35} 
     36 
     37if ( 'on' == $edit_access ) { 
     38        add_filter( 'admin_body_class', 'wp_edit_access_body_class' ); 
     39} 
     40 
    2741// Back-compat for viewing comments of an entry 
    2842foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) { 
    2943        if ( ! empty( $_REQUEST[ $_redirect ] ) ) { 
  • wp-admin/css/wp-admin.css

     
    83098309.widgets_access .widget-action, 
    83108310.widgets_access .sidebar-name-arrow, 
    83118311.widgets_access #access-on, 
     8312.edit_access #access-on, 
    83128313.widgets_access .widget-holder .description { 
    83138314        display: none; 
    83148315} 
     
    83188319        padding-top: 10px; 
    83198320} 
    83208321 
     8322.edit_access .row-actions{ 
     8323        visibility: visible; 
     8324} 
     8325 
     8326.edit_access #access-off, 
    83218327.widgets_access #access-off { 
    83228328        display: inline; 
    83238329}