Ticket #16031: 16031-4.7.patch
File 16031-4.7.patch, 13.9 KB (added by , 8 years ago) |
---|
-
src
-
src/wp-admin/edit-comments.php
Property changes on: src ___________________________________________________________________ Modified: svn:ignore ## -1,2 +1,3 ## .wp-tests-version .htaccess +.idea
101 101 if ( $trashed || $spammed ) 102 102 $redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to ); 103 103 104 /** 105 * Fires when a custom bulk action should be handled. 106 * 107 * The sendback link should be modified with success or failure feedback 108 * from the action to be used to display feedback to the user. 109 * 110 * @since 4.7.0 111 * 112 * @param string $redirect_to The redirect URL. 113 * @param string $doaction The action being taken. 114 * @param array $comment_ids The comments to take the action on. 115 */ 116 $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids ); 117 104 118 wp_safe_redirect( $redirect_to ); 105 119 exit; 106 120 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { -
src/wp-admin/edit-tags.php
201 201 $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ); 202 202 } 203 203 204 if ( $wp_list_table->current_action() && $_REQUEST['delete_tags'] ) { 205 /** 206 * Fires when a custom bulk action should be handled. 207 * 208 * The sendback link should be modified with success or failure feedback 209 * from the action to be used to display feedback to the user. 210 * 211 * @since 4.7.0 212 * 213 * @param string $location The redirect URL. 214 * @param string $action The action being taken. 215 * @param array $tag_ids The tags to take the action on. 216 */ 217 $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $_REQUEST['delete_tags'] ); 218 } 219 204 220 if ( $location ) { 205 221 if ( ! empty( $_REQUEST['paged'] ) ) { 206 222 $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); -
src/wp-admin/edit.php
162 162 } 163 163 } 164 164 break; 165 default: 166 /** 167 * Fires when a custom bulk action should be handled. 168 * 169 * The sendback link should be modified with success or failure feedback 170 * from the action to be used to display feedback to the user. 171 * 172 * @since 4.7.0 173 * 174 * @param string $sendback The redirect URL. 175 * @param string $doaction The action being taken. 176 * @param array $post_ids The posts to take the action on. 177 */ 178 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids ); 179 break; 165 180 } 166 181 167 182 $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); -
src/wp-admin/includes/class-wp-list-table.php
436 436 */ 437 437 protected function bulk_actions( $which = '' ) { 438 438 if ( is_null( $this->_actions ) ) { 439 $ no_new_actions = $this->_actions = $this->get_bulk_actions();439 $this->_actions = $this->get_bulk_actions(); 440 440 /** 441 441 * Filters the list table Bulk Actions drop-down. 442 442 * … … 450 450 * @param array $actions An array of the available bulk actions. 451 451 */ 452 452 $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); 453 $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );454 453 $two = ''; 455 454 } else { 456 455 $two = '2'; -
src/wp-admin/link-manager.php
18 18 19 19 if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) { 20 20 check_admin_referer( 'bulk-bookmarks' ); 21 22 $redirect_to = admin_url( 'link-manager.php' ); 23 $bulklinks = (array) $_REQUEST['linkcheck']; 21 24 22 25 if ( 'delete' == $doaction ) { 23 $bulklinks = (array) $_REQUEST['linkcheck'];26 24 27 foreach ( $bulklinks as $link_id ) { 25 28 $link_id = (int) $link_id; 26 29 27 30 wp_delete_link( $link_id ); 28 31 } 29 32 30 wp_redirect( add_query_arg('deleted', count( $bulklinks ), admin_url( 'link-manager.php' ) ) ); 31 exit; 33 $redirect_to = add_query_arg('deleted', count( $bulklinks ), $redirect_to ); 32 34 } 35 36 /** 37 * Fires when a custom bulk action should be handled. 38 * 39 * The sendback link should be modified with success or failure feedback 40 * from the action to be used to display feedback to the user. 41 * 42 * @since 4.7.0 43 * 44 * @param string $redirect_to The redirect URL. 45 * @param string $doaction The action being taken. 46 * @param array $bulklinks The links to take the action on. 47 */ 48 $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $bulklinks ); 49 50 wp_redirect( $redirect_to ); 51 exit; 33 52 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { 34 53 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); 35 54 exit; -
src/wp-admin/network/site-themes.php
127 127 update_option( 'allowedthemes', $allowed_themes ); 128 128 restore_current_blog(); 129 129 130 if ( isset( $_REQUEST['checked'] ) && ! isset( $n ) ) { 131 /** 132 * Fires when a custom bulk action should be handled. 133 * 134 * The sendback link should be modified with success or failure feedback 135 * from the action to be used to display feedback to the user. 136 * 137 * @since 4.7.0 138 * 139 * @param string $referer The redirect URL. 140 * @param string $action The action being taken. 141 * @param array $theme_ids The themes to take the action on. 142 * @param int $site_id The current site id 143 */ 144 $referer = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $referer, $action, $_REQUEST['checked'], $id ); 145 146 wp_safe_redirect( $referer ); 147 exit; 148 } 149 130 150 wp_safe_redirect( add_query_arg( array( 'id' => $id, $action => $n ), $referer ) ); 131 151 exit; 132 152 } -
src/wp-admin/network/site-users.php
166 166 break; 167 167 } 168 168 169 if ( isset( $_REQUEST['users'] ) && ! isset( $update ) ) { 170 /** 171 * Fires when a custom bulk action should be handled. 172 * 173 * The sendback link should be modified with success or failure feedback 174 * from the action to be used to display feedback to the user. 175 * 176 * @since 4.7.0 177 * 178 * @param string $referer The redirect URL. 179 * @param string $action The action being taken. 180 * @param array $user_ids The users to take the action on. 181 * @param int $site_id The id of the current site 182 */ 183 $referer = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $referer, $action, $_REQUEST['users'], $id ); 184 185 wp_safe_redirect( $referer ); 186 exit(); 187 } 188 169 189 wp_safe_redirect( add_query_arg( 'update', $update, $referer ) ); 170 190 exit(); 171 191 } -
src/wp-admin/network/sites.php
219 219 wp_safe_redirect( add_query_arg( array( 'updated' => $updated_action ), wp_get_referer() ) ); 220 220 exit(); 221 221 } 222 223 if ( isset($_REQUEST['allblogs']) ) { 224 $sendback = wp_get_referer(); 225 226 /** 227 * Fires when a custom bulk action should be handled. 228 * 229 * The sendback link should be modified with success or failure feedback 230 * from the action to be used to display feedback to the user. 231 * 232 * @since 4.7.0 233 * 234 * @param string $sendback The redirect URL. 235 * @param string $action The action being taken. 236 * @param array $blog_ids The blogs to take the action on. 237 * @param int $site_id The current site id. 238 */ 239 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $_REQUEST['action'], $_REQUEST['allblogs'], $id ); 240 241 if ( $sendback ) { 242 wp_safe_redirect( $sendback ); 243 exit(); 244 } 245 246 } 247 222 248 } 223 249 224 250 $msg = ''; -
src/wp-admin/network/themes.php
196 196 ), network_admin_url( 'themes.php' ) ) ); 197 197 exit; 198 198 } 199 200 if ( isset($_POST['checked']) ) { 201 $sendback = wp_get_referer(); 202 203 /** 204 * Fires when a custom bulk action should be handled. 205 * 206 * The sendback link should be modified with success or failure feedback 207 * from the action to be used to display feedback to the user. 208 * 209 * @since 4.7.0 210 * 211 * @param string $sendback The redirect URL. 212 * @param string $action The action being taken. 213 * @param array $theme_ids The themes to take the action on. 214 */ 215 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $_REQUEST['checked'] ); 216 217 if ( $sendback ) { 218 wp_safe_redirect( $sendback ); 219 exit; 220 } 221 } 222 199 223 } 200 224 201 225 $wp_list_table->prepare_items(); -
src/wp-admin/network/users.php
93 93 } 94 94 } 95 95 96 if ( isset( $_POST['allusers'] ) ) { 97 98 $sendback = wp_get_referer(); 99 100 /** 101 * Fires when a custom bulk action should be handled. 102 * 103 * The sendback link should be modified with success or failure feedback 104 * from the action to be used to display feedback to the user. 105 * 106 * @since 4.7.0 107 * 108 * @param string $sendback The redirect URL. 109 * @param string $action The action being taken. 110 * @param array $user_ids The users to take the action on. 111 * @param int $site_id The id of the current site 112 */ 113 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $_POST['action'], $_POST['allusers'], $id ); 114 115 if ( $sendback ) { 116 wp_safe_redirect( $sendback ); 117 exit(); 118 } 119 } 120 96 121 wp_safe_redirect( add_query_arg( array( 'updated' => 'true', 'action' => $userfunction ), wp_get_referer() ) ); 97 122 } else { 98 123 $location = network_admin_url( 'users.php' ); -
src/wp-admin/plugins.php
357 357 } 358 358 break; 359 359 } 360 361 if ( isset( $_POST['checked'] ) ) { 362 $sendback = wp_get_referer(); 363 364 /** 365 * Fires when a custom bulk action should be handled. 366 * 367 * The sendback link should be modified with success or failure feedback 368 * from the action to be used to display feedback to the user. 369 * 370 * @since 4.7.0 371 * 372 * @param string $sendback The redirect URL. 373 * @param string $action The action being taken. 374 * @param array $plugin_ids The plugins to take the action on. 375 */ 376 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $_POST['checked'] ); 377 378 if ( $sendback ) { 379 wp_safe_redirect( $sendback ); 380 exit; 381 } 382 } 383 360 384 } 361 385 362 386 $wp_list_table->prepare_items(); -
src/wp-admin/upload.php
165 165 break; 166 166 } 167 167 168 /** 169 * Fires when a custom bulk action should be handled. 170 * 171 * The sendback link should be modified with success or failure feedback 172 * from the action to be used to display feedback to the user. 173 * 174 * @since 4.7.0 175 * 176 * @param string $location The redirect URL. 177 * @param string $doaction The action being taken. 178 * @param array $post_ids The posts to take the action on. 179 */ 180 $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, $post_ids ); 181 168 182 wp_redirect( $location ); 169 183 exit; 170 184 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { -
src/wp-admin/users.php
410 410 exit; 411 411 } 412 412 413 if ( !empty($_REQUEST['users']) ) { 414 $sendback = wp_get_referer(); 415 416 /** 417 * Fires when a custom bulk action should be handled. 418 * 419 * The sendback link should be modified with success or failure feedback 420 * from the action to be used to display feedback to the user. 421 * 422 * @since 4.7.0 423 * 424 * @param string $sendback The redirect URL. 425 * @param string $action The action being taken. 426 * @param array $user_ids The users to take the action on. 427 */ 428 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $wp_list_table->current_action(), $_REQUEST['users'] ); 429 430 if ( $sendback ) { 431 wp_safe_redirect( $sendback ); 432 exit; 433 } 434 } 435 413 436 $wp_list_table->prepare_items(); 414 437 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 415 438 if ( $pagenum > $total_pages && $total_pages > 0 ) {