Changeset 8895
- Timestamp:
- 09/15/2008 07:28:26 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
-
edit-attachment-rows.php (modified) (1 diff)
-
includes/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-attachment-rows.php
r8894 r8895 93 93 <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?> 94 94 <p> 95 <a href="media.php?action=edit&attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php _e('Edit'); ?></a> | 96 <a href="<?php the_permalink(); ?>"><?php _e('Get permalink'); ?></a> | 97 <a href="#" class="delete"><?php _e('Delete'); ?></a> 98 </p> 99 <?php do_action('manage_media_media_column', $post->ID); ?> 100 </td> 101 <?php 95 <?php 96 $actions = array(); 97 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 98 $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>"; 99 $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>'; 100 $action_count = count($actions); 101 $i = 0; 102 foreach ( $actions as $action => $link ) { 103 ++$i; 104 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 105 echo "<span class='$action'>$link$sep</span>"; 106 } 102 107 break; 103 108 -
trunk/wp-admin/includes/template.php
r8894 r8895 763 763 764 764 $actions = array(); 765 $actions['edit'] = '<a href=" post.php?action=edit&post=' . $post->ID. '">' . __('Edit') . '</a>';765 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>'; 766 766 $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; 767 767 $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 draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
Note: See TracChangeset
for help on using the changeset viewer.