mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-14 03:56:09 +09:00
Fix CPT archive widget if post type not registered
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user