Changeset 38572 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 09/08/2016 04:04:22 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r38303 r38572 1301 1301 1302 1302 if ( current_user_can( 'read_post', $post->ID ) ) { 1303 if ( 'draft' === $post->post_status ) {1303 if ( 'draft' === $post->post_status || empty( $post->post_name ) ) { 1304 1304 $view_link = get_preview_post_link( $post ); 1305 1305 $preview_target = " target='wp-preview-{$post->ID}'"; … … 1308 1308 $view_link = get_permalink( $post ); 1309 1309 } else { 1310 // Allow non-published (private, future) to be viewed at a pretty permalink .1310 // Allow non-published (private, future) to be viewed at a pretty permalink, in case $post->post_name is set 1311 1311 $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, $permalink ); 1312 1312 }
Note: See TracChangeset
for help on using the changeset viewer.