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

Prevent warning when importing starter content including CPT posts #340

Merged
merged 1 commit into from
Jan 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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