Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #340 from xwp/bugfix/starter-content-warning
Browse files Browse the repository at this point in the history
Prevent warning when importing starter content including CPT posts
  • Loading branch information
westonruter authored Jan 17, 2017
2 parents a447949 + dd8eb14 commit f7f5c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/class-edit-post-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function get_previewed_post() {
public static function get_preview_post_link( $post ) {
$permalink = '';

if ( $post instanceof WP_Post ) {
if ( $post instanceof WP_Post && post_type_exists( $post->post_type ) ) {
$id_param = ( 'page' === $post->post_type ) ? 'page_id' : 'p';
$args = array();
$args['preview'] = true;
Expand Down

0 comments on commit f7f5c98

Please sign in to comment.