Fix CPT archive widget if post type not registered

This commit is contained in:
Robin Cornett
2016-07-05 08:32:31 -04:00
parent 13c4d67e4f
commit 3a5cb57720
@@ -73,6 +73,9 @@ class Display_Featured_Image_Genesis_Widget_CPT extends WP_Widget {
$instance = wp_parse_args( (array) $instance, $this->defaults );
$post_type = get_post_type_object( $instance['post_type'] );
if ( ! $post_type ) {
return;
}
$option = displayfeaturedimagegenesis_get_setting();
$image_id = '';