Changeset 9690 for trunk/wp-admin/edit-attachment-rows.php
- Timestamp:
- 11/14/2008 07:40:24 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/edit-attachment-rows.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-attachment-rows.php
r9506 r9690 28 28 add_filter('the_title','wp_specialchars'); 29 29 while (have_posts()) : the_post(); 30 $ class = 'alternate' == $class? '' : 'alternate';30 $alt = ( 'alternate' == $alt ) ? '' : 'alternate'; 31 31 global $current_user; 32 32 $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' ); … … 34 34 35 35 ?> 36 <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $ class. ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">36 <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top"> 37 37 38 38 <?php … … 81 81 <?php 82 82 $actions = array(); 83 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 84 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 83 if ( current_user_can('edit_post', $post->ID) ) 84 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 85 if ( current_user_can('delete_post', $post->ID) ) 86 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 85 87 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 86 88 $action_count = count($actions);
Note: See TracChangeset
for help on using the changeset viewer.