Changeset 12121 for trunk/wp-admin/edit-pages.php
- Timestamp:
- 10/28/2009 02:46:08 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-pages.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-pages.php
r11952 r12121 16 16 if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) || isset($_GET['bulk_edit']) ) { 17 17 check_admin_referer('bulk-pages'); 18 $sendback = wp_get_referer();18 $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() ); 19 19 20 20 if ( strpos($sendback, 'page.php') !== false ) … … 25 25 $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = %s", $post_status ) ); 26 26 $doaction = 'delete'; 27 } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1) && isset($_GET['post']) ) {28 $post_ids = array_map( 'intval', (array) $_GET['post']);27 } elseif ( ( $_GET['action'] != -1 || $_GET['action2'] != -1 ) && ( isset($_GET['post']) || isset($_GET['ids']) ) ) { 28 $post_ids = isset($_GET['post']) ? array_map( 'intval', (array) $_GET['post'] ) : explode(',', $_GET['ids']); 29 29 $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; 30 30 } else { … … 44 44 $trashed++; 45 45 } 46 $sendback = add_query_arg( 'trashed', $trashed, $sendback);46 $sendback = add_query_arg( array('trashed' => $trashed, 'ids' => join(',', $post_ids)), $sendback ); 47 47 break; 48 48 case 'untrash': … … 164 164 if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { 165 165 printf( _n( 'Page moved to the trash.', '%s pages moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) ); 166 echo ' <a href="' . admin_url('edit-pages.php?post_status=trash') . '">' . __('View trash') . '</a> '; 166 $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; 167 echo ' <a href="' . esc_url( wp_nonce_url( "edit-pages.php?doaction=undo&action=untrash&ids=$ids", "bulk-pages" ) ) . '">' . __('Undo?') . '</a><br />'; 167 168 unset($_GET['trashed']); 168 169 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)