Make WordPress Core


Ignore:
Timestamp:
10/17/2020 09:58:34 AM (4 years ago)
Author:
azaozz
Message:

Fix and improve arranging of postboxes/metaboxes:

  • Enable arranging only when the Screen Options tab is open.
  • Prevent accidental/unintended dragging. Seen it happen mostly on laptops when using the mousepad/trackpad.
  • Improve discoverability and usefulness by always showing the "drop zones" outline when postboxes are draggable/arrangeable.
  • Add some (brief) explanation to the Screen Options tab helping the user understand what options are available and how to change them. This is especially helpful for screen reader users to give an idea how to use the screen options and what to expect.
  • Fix/enhance some of the code in postbox.js and make it coding standards compliant.

See #50699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-screen.php

    r48670 r49179  
    11141114        ?>
    11151115        <fieldset class="metabox-prefs">
    1116         <legend><?php _e( 'Boxes' ); ?></legend>
     1116        <legend><?php _e( 'Screen elements' ); ?></legend>
     1117        <p>
     1118            <?php _e( 'Some screen elements can be shown or hidden by using the checkboxes.' ); ?>
     1119            <?php _e( 'They can be expanded and collapsed by clickling on their headings, and arranged by dragging their headings or by clicking on the up and down arrows.' ); ?>
     1120        </p>
    11171121        <?php
    1118             meta_box_prefs( $this );
     1122
     1123        meta_box_prefs( $this );
    11191124
    11201125        if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
Note: See TracChangeset for help on using the changeset viewer.