You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6718bd3
Browse filesBrowse the repository at this point in the historyBrowse files
Admin: Add screen option to turn off moving meta boxes.
In most cases, changing the order and position of dashboard or post meta boxes is an occasional need. When it's not needed, the extra two controls for every meta box create a high number of extra tab stops and a busy design. The drag and drop can result in accidental moves and difficulty scrolling on mobile devices due to accidental touch effects.
Add a screen option that allows users to disable moving meta boxes, disabling mover buttons and drag and drop behavior. The setting is defaulted to enable moving meta boxes, so there is no change in the default experience for users.
Developed in #12627.
Props azaozz, pbiron, afercia, johnbillion, hellofromtonya, helen, knutsp, johnjamesjacoby, garrett-eclipse, margaretschneider, johnstonphilip, hedgefield, sanketparmar, poligilad, sabernhardt, tyxla, jillq, sarahricker, ryokuhi, poena, abrain, SergeyBiryukov, joedolson.
Fixes #50699, #51419.
git-svn-id: https://develop.svn.wordpress.org/trunk@64301 602fd350-edb4-49c9-b593-d223f7449a82
@@ -1122,6 +1143,9 @@ public function render_meta_boxes_preferences() {
1122
1143
<p>
1123
1144
<?php_e( 'Some screen elements can be shown or hidden by using the checkboxes.' ); ?>
1124
1145
<?php_e( 'Expand or collapse the elements by clicking on their headings, and arrange them by dragging their headings or by clicking on the up and down arrows.' ); ?>
1146
+
<?phpif ( $this->has_meta_boxes() ) : ?>
1147
+
<?php_e( 'Use the setting below to control whether screen elements can be rearranged.' ); ?>
1148
+
<?phpendif; ?>
1125
1149
</p>
1126
1150
<div class="metabox-prefs-container">
1127
1151
<?php
@@ -1148,6 +1172,33 @@ public function render_meta_boxes_preferences() {
1148
1172
<?php
1149
1173
}
1150
1174
1175
+
/**
1176
+
* Gets the option to enable or disable meta box reordering.
1177
+
*
1178
+
* @since 7.2.0
1179
+
*
1180
+
* @return string Meta box reordering option markup.
0 commit comments