diff --git a/src/js/_enqueues/admin/postbox.js b/src/js/_enqueues/admin/postbox.js
index 9789518b65..636c4d8cdf 100644
|
a
|
b
|
|
| 41 | 41 | var $el = $( this ), |
| 42 | 42 | p = $el.parent( '.postbox' ), |
| 43 | 43 | id = p.attr( 'id' ), |
| 44 | | ariaExpandedValue; |
| | 44 | ariaExpandedValue, |
| | 45 | closestPostbox = $( this ).closest( '.postbox' ); |
| 45 | 46 | |
| 46 | 47 | if ( 'dashboard_browser_nag' === id ) { |
| 47 | 48 | return; |
| 48 | 49 | } |
| 49 | 50 | |
| | 51 | if ( $el.hasClass( 'handle-order-prev' ) ) { |
| | 52 | // The handle order prev button was clicked. |
| | 53 | closestPostbox.prev().before( closestPostbox ); |
| | 54 | postboxes.save_order( postboxes.page ); |
| | 55 | return; |
| | 56 | } |
| | 57 | |
| | 58 | if ( $el.hasClass( 'handle-order-next' ) ) { |
| | 59 | // The handle order next button was clicked. |
| | 60 | closestPostbox.next().after( closestPostbox ); |
| | 61 | postboxes.save_order( postboxes.page ); |
| | 62 | return; |
| | 63 | } |
| | 64 | |
| 50 | 65 | p.toggleClass( 'closed' ); |
| 51 | 66 | |
| 52 | 67 | ariaExpandedValue = ! p.hasClass( 'closed' ); |
| … |
… |
|
| 99 | 114 | * @return {void} |
| 100 | 115 | */ |
| 101 | 116 | add_postbox_toggles : function (page, args) { |
| 102 | | var $handles = $( '.postbox .hndle, .postbox .handlediv' ); |
| | 117 | var $handles = $( '.postbox .hndle, .postbox .handlediv, .postbox .handle-order-next, .postbox .handle-order-prev' ); |
| 103 | 118 | |
| 104 | 119 | this.page = page; |
| 105 | 120 | this.init( page, args ); |
diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index a8b8112b00..76d7cdee90 100644
|
a
|
b
|
html.wp-toolbar { |
| 2057 | 2057 | font-weight: 400; |
| 2058 | 2058 | } |
| 2059 | 2059 | |
| | 2060 | .postbox .handle-order-prev, |
| | 2061 | .postbox .handle-order-next, |
| 2060 | 2062 | .postbox .handlediv { |
| 2061 | 2063 | display: none; |
| 2062 | 2064 | float: right; |
| … |
… |
html.wp-toolbar { |
| 2069 | 2071 | cursor: pointer; |
| 2070 | 2072 | } |
| 2071 | 2073 | |
| | 2074 | .postbox .handle-order-prev, |
| | 2075 | .postbox .handle-order-next { |
| | 2076 | display: inline-block; |
| | 2077 | } |
| | 2078 | |
| 2072 | 2079 | .js .postbox .handlediv { |
| 2073 | 2080 | display: block; |
| 2074 | 2081 | } |
| … |
… |
img { |
| 3048 | 3055 | content: "\f140"; |
| 3049 | 3056 | } |
| 3050 | 3057 | |
| | 3058 | .js .postbox .handle-order-next .toggle-indicator:before, |
| | 3059 | .js .postbox .handle-order-prev .toggle-indicator:before, |
| 3051 | 3060 | .js .postbox .handlediv .toggle-indicator:before { |
| 3052 | 3061 | margin-top: 4px; |
| 3053 | 3062 | width: 20px; |
| … |
… |
img { |
| 3055 | 3064 | text-indent: -1px; /* account for the dashicon alignment */ |
| 3056 | 3065 | } |
| 3057 | 3066 | |
| | 3067 | .js .postbox .handle-order-next .toggle-indicator:before { |
| | 3068 | transform: rotate(90deg); |
| | 3069 | } |
| | 3070 | |
| | 3071 | .js .postbox .handle-order-prev .toggle-indicator:before { |
| | 3072 | transform: rotate(-90deg); |
| | 3073 | } |
| | 3074 | |
| 3058 | 3075 | .rtl.js .postbox .handlediv .toggle-indicator:before { |
| 3059 | 3076 | text-indent: 1px; /* account for the dashicon alignment */ |
| 3060 | 3077 | } |
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 5e6838eab1..9257d803d3 100644
|
a
|
b
|
function do_meta_boxes( $screen, $context, $object ) { |
| 1315 | 1315 | ) . '</span>'; |
| 1316 | 1316 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| 1317 | 1317 | echo '</button>'; |
| | 1318 | |
| | 1319 | echo '<button type="button" class="handle-order-next">'; |
| | 1320 | echo '<span class="screen-reader-text">' . sprintf( |
| | 1321 | /* translators: Meta box title. */ |
| | 1322 | __( 'Move %s panel to next position' ), |
| | 1323 | $widget_title |
| | 1324 | ) . '</span>'; |
| | 1325 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| | 1326 | echo '</button>'; |
| | 1327 | |
| | 1328 | echo '<button type="button" class="handle-order-prev">'; |
| | 1329 | echo '<span class="screen-reader-text">' . sprintf( |
| | 1330 | /* translators: Meta box title. */ |
| | 1331 | __( 'Move %s panel to previous position' ), |
| | 1332 | $widget_title |
| | 1333 | ) . '</span>'; |
| | 1334 | echo '<span class="toggle-indicator" aria-hidden="true"></span>'; |
| | 1335 | echo '</button>'; |
| 1318 | 1336 | } |
| 1319 | 1337 | echo '<h2 class="hndle">'; |
| 1320 | 1338 | if ( 'dashboard_php_nag' === $box['id'] ) { |