1237 | | $return .= "<span id='view-post-btn'><a href='" . get_permalink( $post ) . "' class='button button-small'>$view_post</a></span>\n"; |
| 1241 | |
| 1242 | if( 'draft' == $post->post_status ) { |
| 1243 | $preview_link = set_url_scheme( get_permalink( $post->ID ) ); |
| 1244 | /** |
| 1245 | * Filter the URI of a post preview in the post submit box. |
| 1246 | * |
| 1247 | * @since 2.0.5 |
| 1248 | * |
| 1249 | * @param string $preview_link URI the user will be directed to for a post preview. |
| 1250 | */ |
| 1251 | $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); |
| 1252 | $return .= "<span id='view-post-btn'><a href='" . $preview_link . "' class='button button-small' target='_blank'>$view_post</a></span>\n"; |
| 1253 | } else { |
| 1254 | $return .= "<span id='view-post-btn'><a href='" . get_permalink( $post ) . "' class='button button-small'>$view_post</a></span>\n"; |
| 1255 | } |