101 $sendback = add_query_arg('untrashed', $untrashed, $sendback); |
101 $sendback = add_query_arg('untrashed', $untrashed, $sendback); |
102 break; |
102 break; |
103 case 'delete': |
103 case 'delete': |
104 $deleted = 0; |
104 $deleted = 0; |
105 foreach( (array) $post_ids as $post_id ) { |
105 foreach( (array) $post_ids as $post_id ) { |
106 $post_del = & get_post($post_id); |
106 $post_del = get_post($post_id); |
107 |
107 |
108 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) |
108 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) |
109 wp_die( __('You are not allowed to delete this item.') ); |
109 wp_die( __('You are not allowed to delete this item.') ); |
110 |
110 |
111 if ( $post_del->post_type == 'attachment' ) { |
111 if ( $post_del->post_type == 'attachment' ) { |
213 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' . |
213 '<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' . |
214 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' |
214 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' |
215 ); |
215 ); |
216 } |
216 } |
217 |
217 |
218 add_screen_option( 'per_page', array('label' => $title, 'default' => 20) ); |
218 add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); |
219 |
219 |
220 require_once('./admin-header.php'); |
220 require_once('./admin-header.php'); |
221 ?> |
221 ?> |
222 <div class="wrap"> |
222 <div class="wrap"> |
223 <?php screen_icon(); ?> |
223 <?php screen_icon(); ?> |
224 <h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php |
224 <h2><?php |
|
225 echo esc_html( $post_type_object->labels->name ); |
|
226 if ( current_user_can( $post_type_object->cap->create_posts ) ) |
|
227 echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; |
225 if ( ! empty( $_REQUEST['s'] ) ) |
228 if ( ! empty( $_REQUEST['s'] ) ) |
226 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?> |
229 printf( ' <span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); |
227 </h2> |
230 ?></h2> |
228 |
231 |
229 <?php if ( isset( $_REQUEST['locked'] ) || isset( $_REQUEST['updated'] ) || isset( $_REQUEST['deleted'] ) || isset( $_REQUEST['trashed'] ) || isset( $_REQUEST['untrashed'] ) ) { |
232 <?php if ( isset( $_REQUEST['locked'] ) || isset( $_REQUEST['updated'] ) || isset( $_REQUEST['deleted'] ) || isset( $_REQUEST['trashed'] ) || isset( $_REQUEST['untrashed'] ) ) { |
230 $messages = array(); |
233 $messages = array(); |
231 ?> |
234 ?> |
232 <div id="message" class="updated"><p> |
235 <div id="message" class="updated"><p> |