Fix Edit Page link

git-svn-id: https://develop.svn.wordpress.org/trunk@8699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-08-21 05:52:03 +00:00
parent fd48e36227
commit 92799a0b3d
1 changed files with 2 additions and 1 deletions

View File

@ -468,6 +468,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
<?php <?php
break; break;
case 'title': case 'title':
$edit_link = get_edit_post_link( $page->ID );
?> ?>
<td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
<?php <?php
@ -477,7 +478,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
the_excerpt(); the_excerpt();
$actions = array(); $actions = array();
$actions['edit'] = '<a href="' . get_edit_post_link( $page->ID ) . '">' . __('Edit') . '</a>'; $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-post_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(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>"; $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-post_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(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>";
$action_count = count($actions); $action_count = count($actions);
$i = 0; $i = 0;