Ticket #10121: 10121.patch
| File 10121.patch, 2.2 KB (added by , 17 years ago) |
|---|
-
wp-admin/includes/template.php
1447 1447 if ( current_user_can('edit_post', $post->ID) ) { 1448 1448 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>'; 1449 1449 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick Edit') . '</a>'; 1450 } 1451 if ( current_user_can('delete_post', $post->ID) ) { 1450 1452 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post')) . "' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . esc_js(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>"; 1451 1453 } 1452 1454 if ( in_array($post->post_status, array('pending', 'draft')) ) { … … 1660 1662 if ( current_user_can('edit_page', $page->ID) ) { 1661 1663 $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>'; 1662 1664 $actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; 1665 } 1666 if ( current_user_can('delete_page', $page->ID) ) { 1663 1667 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page')) . "' href='" . wp_nonce_url("page.php?action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 1664 1668 } 1665 1669 if ( in_array($post->post_status, array('pending', 'draft')) ) {