Edit Post: When a post is "Pending Review", the "View Post" link should behave like ot does for drafts and generate a preview link.

Props wpdev101.
Fixes #33541.

Built from https://develop.svn.wordpress.org/trunk@34324


git-svn-id: http://core.svn.wordpress.org/trunk@34288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-19 16:32:24 +00:00
parent 60fadd7bdc
commit e47963d1e7
2 changed files with 2 additions and 2 deletions

View File

@ -1329,7 +1329,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
}
if ( isset( $view_post ) ) {
if ( 'draft' == $post->post_status ) {
if ( 'draft' == $post->post_status || 'pending' == $post->post_status ) {
$draft_link = set_url_scheme( get_permalink( $post->ID ) );
$preview_link = get_preview_post_link( $post, array(), $draft_link );
$return .= "<span id='view-post-btn'><a href='" . esc_url( $preview_link ) . "' class='button button-small' target='wp-preview-{$post->ID}'>$view_post</a></span>\n";

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34323';
$wp_version = '4.4-alpha-34324';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.