@@ 390-400 (lines=11) @@ | ||
387 | ||
388 | $thumbnail = null; |
|
389 | $attachment_id = null; |
|
390 | if ( ! empty( $featured_img_full ) ) { |
|
391 | $attachment_id = $this->get_image_id( $this->upload_url . $featured_img_full ); |
|
392 | ||
393 | $thumbnail = $this->get_image_thumb_by_attachment_id( $attachment_id, 'medium' ); |
|
394 | ||
395 | if ( empty( $thumbnail ) ) { |
|
396 | // since medium sized thumbnail image is missing, |
|
397 | // let's set full image url as thumbnail. |
|
398 | $thumbnail = $featured_img_full; |
|
399 | } |
|
400 | } |
|
401 | ||
402 | // Add a nonce field. |
|
403 | echo $this->nonce_field( 'dfi_fimageplug-' . $featured_id ); // WPCS: XSS ok. |
|
@@ 906-911 (lines=6) @@ | ||
903 | $dfi_images = get_post_meta( $post_id, 'dfiFeatured', true ); |
|
904 | $ret_val = array(); |
|
905 | ||
906 | if ( ! empty( $dfi_images ) && is_array( $dfi_images ) ) { |
|
907 | foreach ( $dfi_images as $dfi_image ) { |
|
908 | $dfi_image_full = $this->separate( $dfi_image, 'full' ); |
|
909 | $ret_val[] = (int) $this->get_image_id( $this->upload_url . $dfi_image_full ); |
|
910 | } |
|
911 | } |
|
912 | ||
913 | return $ret_val; |
|
914 | } |