Skip to content

Commit

Permalink
fix: use the user defined custom image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed May 27, 2024
1 parent 510d320 commit 6834e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/admin/feedzy-rss-feeds-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ private function run_job( $job, $max ) {
$image_source_url = '';
$img_success = true;
$new_post_id = 0;
$default_img_tag = ! empty( $import_featured_img ) ? '[#item_image]' : '';
$default_img_tag = ! empty( $import_featured_img ) && is_string( $import_featured_img ) ? $import_featured_img : '';

// image tag
if ( strpos( $default_img_tag, '[#item_image]' ) !== false ) {
Expand Down Expand Up @@ -1759,7 +1759,7 @@ function( $term ) {

do_action( 'feedzy_import_extra', $job, $item_obj, $new_post_id, $import_errors, $import_info );

$default_img_tag = ! empty( $import_featured_img ) ? '[#item_image]' : '';
$default_img_tag = ! empty( $import_featured_img ) && is_string( $import_featured_img ) ? $import_featured_img : '';
if ( ! empty( $default_img_tag ) && 'attachment' !== $import_post_type ) {
$image_source_url = '';
$img_success = true;
Expand Down

0 comments on commit 6834e53

Please sign in to comment.