Show Preview instead of View for unpublished posts and pages
git-svn-id: http://svn.automattic.com/wordpress/trunk@8907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d93df1ae1e
commit
463b5adba5
|
@ -765,7 +765,10 @@ function _post_row($a_post, $pending_comments, $mode) {
|
||||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
||||||
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
||||||
$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>";
|
$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>";
|
||||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
if ( in_array($post->post_status, array('pending', 'draft')) )
|
||||||
|
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||||
|
else
|
||||||
|
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||||
$action_count = count($actions);
|
$action_count = count($actions);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ( $actions as $action => $link ) {
|
foreach ( $actions as $action => $link ) {
|
||||||
|
@ -971,7 +974,10 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
|
||||||
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
|
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
|
||||||
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
$actions['inline'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>';
|
||||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$page->ID", 'delete-page_' . $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&post=$page->ID", 'delete-page_' . $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['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
if ( in_array($post->post_status, array('pending', 'draft')) )
|
||||||
|
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
|
||||||
|
else
|
||||||
|
$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||||
$action_count = count($actions);
|
$action_count = count($actions);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ( $actions as $action => $link ) {
|
foreach ( $actions as $action => $link ) {
|
||||||
|
|
Loading…
Reference in New Issue