WordPress.org

Make WordPress Core

Ticket #18785: 18785.widgets-screen-options.patch

File 18785.widgets-screen-options.patch, 1.3 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/includes/screen.php

     
    551551 
    552552                $screen_settings = $this->_options['_screen_settings']; 
    553553 
    554                 // Default screen_settings for various screens. 
    555                 // TODO: should probably be set on these screens, not here. 
    556                 switch ( $this->id ) { 
    557                         case 'widgets': 
    558                                 $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"; 
    559                                 break; 
    560                 } 
    561  
    562554                // TODO: deprecate 
    563555                $screen_settings = apply_filters( 'screen_settings', $screen_settings, $this ); 
    564556 
  • wp-admin/widgets.php

     
    3535$title = __( 'Widgets' ); 
    3636$parent_file = 'themes.php'; 
    3737 
     38$current_screen->add_option( 
     39'<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" 
     40); 
    3841$current_screen->add_option_context(  
    3942'<p>test</p>' 
    4043);