Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed May 21, 2024
1 parent 1690611 commit 079628c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions includes/admin/feedzy-rss-feeds-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ public function feedzy_import_feed_options() {
$default_thumbnail_id = 0;
if ( feedzy_is_pro() ) {
$default_thumbnail_id = get_post_meta( $post->ID, 'default_thumbnail_id', true );
if ( empty( $default_thumbnail_id ) && '0' !== $default_thumbnail_id ) {
if (
empty( $default_thumbnail_id ) &&
'0' !== $default_thumbnail_id // Can use the fallback image from Global Settings.
) {
$default_thumbnail_id = ! empty( $this->free_settings['general']['default-thumbnail-id'] ) ? (int) $this->free_settings['general']['default-thumbnail-id'] : 0;
}
}
Expand Down Expand Up @@ -525,7 +528,7 @@ public function save_feedzy_import_feed_meta( $post_id, $post ) {
add_post_meta( $post_id, $key, $value );
}
if ( ! $value ) {
if ( 'default_thumbnail_id' === $key && '0' === $value ) {
if ( 'default_thumbnail_id' === $key && '0' === $value ) { // Mark the feed as having no default fallback image (including the global fallback).
continue;
}
delete_post_meta( $post_id, $key );
Expand Down

0 comments on commit 079628c

Please sign in to comment.