Changeset 12162 for trunk/wp-admin/includes/meta-boxes.php
- Timestamp:
- 11/10/2009 10:38:19 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/meta-boxes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r12114 r12162 185 185 <div id="delete-action"> 186 186 <?php 187 if ( current_user_can("delete_${post_type}", $post->ID) ) { ?> 188 <?php $delete_url = add_query_arg( array('action'=>'trash', 'post'=>$post->ID) ); ?> 189 <a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo wp_nonce_url($delete_url, "trash-${post_type}_" . $post->ID); ?>"><?php _e('Move to Trash'); ?></a> 190 <?php } ?> 187 if ( current_user_can("delete_${post_type}", $post->ID) ) { 188 if ( !EMPTY_TRASH_DAYS ) { 189 $delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" ); 190 $delete_text = __('Delete Permanently'); 191 } else { 192 $delete_url = wp_nonce_url( add_query_arg( array('action' => 'trash', 'post' => $post->ID) ), "trash-${post_type}_{$post->ID}" ); 193 $delete_text = __('Move to Trash'); 194 } ?> 195 <a class="submitdelete deletion<?php if ( 'edit' != $action ) { echo " hidden"; } ?>" href="<?php echo $delete_url; ?>"><?php echo $delete_text; ?></a><?php 196 } ?> 191 197 </div> 192 198
Note: See TracChangeset
for help on using the changeset viewer.