Changeset 12162 for trunk/wp-admin/edit-attachment-rows.php
- Timestamp:
- 11/10/2009 10:38:19 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-attachment-rows.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-attachment-rows.php
r11841 r12162 90 90 <?php 91 91 $actions = array(); 92 if ( $is_trash ) { 93 if ( current_user_can('delete_post', $post->ID) ) { 92 if ( current_user_can('edit_post', $post->ID) && !$is_trash ) 93 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 94 if ( current_user_can('delete_post', $post->ID) ) { 95 if ( $is_trash ) 94 96 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>"; 97 elseif ( EMPTY_TRASH_DAYS ) 98 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>"; 99 if ( $is_trash || !EMPTY_TRASH_DAYS ) 95 100 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>"; 96 } 97 } else { 98 if ( current_user_can('edit_post', $post->ID) ) 99 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 100 if ( current_user_can('delete_post', $post->ID) ) 101 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>"; 101 } 102 if ( !$is_trash ) 102 103 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 103 }104 104 $action_count = count($actions); 105 105 $i = 0;
Note: See TracChangeset
for help on using the changeset viewer.