Ticket #46872: 46872.3.diff
File 46872.3.diff, 8.2 KB (added by , 4 years ago) |
---|
-
src/js/_enqueues/admin/common.js
1214 1214 }); 1215 1215 1216 1216 /** 1217 * Marries the secondary bulk action controls to the primary controls. 1218 * 1219 * @return {void} 1220 */ 1221 (function(){ 1222 var topBulkActionSelector = $('#bulk-action-selector-top'), 1223 topBulkActionSubmit = $('#doaction'), 1224 bottomBulkActionSelector = $('#bulk-action-selector-bottom'), 1225 bottomBulkActionSubmit = $('#doaction2'); 1226 1227 /** 1228 * Updates the primary bulk action selector upon change of the secondary selector. 1229 * 1230 * @since 5.6.0 1231 * 1232 * @return {void} 1233 */ 1234 function updateTopBulkActionSelector() { 1235 topBulkActionSelector.val($(this).val()); 1236 } 1237 bottomBulkActionSelector.on('change', updateTopBulkActionSelector); 1238 1239 /** 1240 * Updates the secondary bulk action selector upon change of the primary selector. 1241 * 1242 * @since 5.6.0 1243 * 1244 * @return {void} 1245 */ 1246 function updateBottomBulkActionSelector() { 1247 bottomBulkActionSelector.val($(this).val()); 1248 } 1249 topBulkActionSelector.on('change', updateBottomBulkActionSelector); 1250 1251 1252 /** 1253 * Triggers the primary bulk action submit upon click of secondary button. 1254 * 1255 * @since 5.6.0 1256 * 1257 * @return {void} 1258 */ 1259 function triggerBulkActionSubmitClick(e) { 1260 e.preventDefault(); 1261 e.stopPropagation(); 1262 1263 topBulkActionSubmit.trigger('click'); 1264 } 1265 bottomBulkActionSubmit.on('click', triggerBulkActionSubmitClick); 1266 })(); 1267 1268 /** 1217 1269 * Shows row actions on focus of its parent container element or any other elements contained within. 1218 1270 * 1219 1271 * @return {void} … … 1315 1367 pageInput.closest('form').submit( function() { 1316 1368 /* 1317 1369 * action = bulk action dropdown at the top of the table 1318 * action2 = bulk action dropdow at the bottom of the table1319 1370 */ 1320 if ( $('select[name="action"]').val() == -1 && $('select[name="action2"]').val() == -1 &&pageInput.val() == currentPage )1371 if ( $('select[name="action"]').val() == -1 && pageInput.val() == currentPage ) 1321 1372 pageInput.val('1'); 1322 1373 }); 1323 1374 } -
src/js/_enqueues/admin/edit-comments.js
808 808 commentReply.toggle($(this).parent()); 809 809 }); 810 810 811 $('#doaction, # doaction2, #post-query-submit').click(function(){811 $('#doaction, #post-query-submit').click(function(){ 812 812 if ( $('#the-comment-list #replyrow').length > 0 ) 813 813 commentReply.close(); 814 814 }); -
src/js/_enqueues/admin/inline-edit-post.js
139 139 /** 140 140 * Adds onclick events to the apply buttons. 141 141 */ 142 $('#doaction , #doaction2').click(function(e){142 $('#doaction').click(function(e){ 143 143 var n; 144 144 145 145 t.whichBulkButtonId = $( this ).attr( 'id' ); -
src/js/_enqueues/admin/media.js
178 178 $( '#find-posts-close' ).click( findPosts.close ); 179 179 180 180 // Binds the bulk action events to the submit buttons. 181 $( '#doaction , #doaction2' ).click( function( event ) {181 $( '#doaction' ).click( function( event ) { 182 182 183 183 /* 184 * Retrieves all select elements for bulk actions that have a name starting with `action` 185 * and handle its action based on its value. 184 * Handle the bulk action based on its value. 186 185 */ 187 $( 'select[name ^="action"]' ).each( function() {186 $( 'select[name="action"]' ).each( function() { 188 187 var optionValue = $( this ).val(); 189 188 190 189 if ( 'attach' === optionValue ) { -
src/wp-admin/css/forms.css
490 490 margin: 0 8px 0 0; 491 491 } 492 492 493 /* @since 5.6.0 Secondary bulk action controls require JS. */ 494 .no-js label[for="bulk-action-selector-bottom"], 495 .no-js select#bulk-action-selector-bottom, 496 .no-js input#doaction2 { 497 display: none; 498 } 499 493 500 .tablenav .actions select { 494 501 float: left; 495 502 margin-right: 6px; -
src/wp-admin/edit-comments.php
31 31 $doaction = 'delete'; 32 32 } elseif ( isset( $_REQUEST['delete_comments'] ) ) { 33 33 $comment_ids = $_REQUEST['delete_comments']; 34 $doaction = ( '-1' !== $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];34 $doaction = $_REQUEST['action']; 35 35 } elseif ( isset( $_REQUEST['ids'] ) ) { 36 36 $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) ); 37 37 } elseif ( wp_get_referer() ) { -
src/wp-admin/edit.php
203 203 break; 204 204 } 205 205 206 $sendback = remove_query_arg( array( 'action', ' action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback );206 $sendback = remove_query_arg( array( 'action', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback ); 207 207 208 208 wp_redirect( $sendback ); 209 209 exit; -
src/wp-admin/includes/class-wp-list-table.php
497 497 return $_REQUEST['action']; 498 498 } 499 499 500 if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {501 return $_REQUEST['action2'];502 }503 504 500 return false; 505 501 } 506 502 -
src/wp-admin/includes/class-wp-terms-list-table.php
171 171 * @return string 172 172 */ 173 173 public function current_action() { 174 if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && ( 'delete' === $_REQUEST['action'] || 'delete' === $_REQUEST['action2'] )) {174 if ( isset( $_REQUEST['action'] ) && isset( $_REQUEST['delete_tags'] ) && 'delete' === $_REQUEST['action'] ) { 175 175 return 'bulk-delete'; 176 176 } 177 177 -
src/wp-admin/network/sites.php
177 177 break; 178 178 179 179 case 'allblogs': 180 if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) )&& isset( $_POST['allblogs'] ) ) {181 $doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];180 if ( isset( $_POST['action'] && isset( $_POST['allblogs'] ) ) { 181 $doaction = $_POST['action']; 182 182 183 183 foreach ( (array) $_POST['allblogs'] as $key => $val ) { 184 184 if ( '0' != $val && get_network()->site_id != $val ) { -
src/wp-admin/network/users.php
46 46 wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); 47 47 } 48 48 49 if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] )) && isset( $_POST['allusers'] ) ) {49 if ( isset( $_POST['action'] ) && isset( $_POST['allusers'] ) ) { 50 50 check_admin_referer( 'bulk-users-network' ); 51 51 52 $doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];52 $doaction = $_POST['action']; 53 53 $userfunction = ''; 54 54 55 55 foreach ( (array) $_POST['allusers'] as $user_id ) {