|
@@ 360-370 (lines=11) @@
|
| 357 |
|
|
| 358 |
|
$thumbnail = null; |
| 359 |
|
$attachment_id = null; |
| 360 |
|
if ( ! empty( $featured_img_full ) ) { |
| 361 |
|
$attachment_id = $this->get_image_id( $this->upload_url . $featured_img_full ); |
| 362 |
|
|
| 363 |
|
$thumbnail = $this->get_image_thumb_by_attachment_id( $attachment_id, 'medium' ); |
| 364 |
|
|
| 365 |
|
if ( empty( $thumbnail ) ) { |
| 366 |
|
// since medium sized thumbnail image is missing, |
| 367 |
|
// let's set full image url as thumbnail. |
| 368 |
|
$thumbnail = $featured_img_full; |
| 369 |
|
} |
| 370 |
|
} |
| 371 |
|
|
| 372 |
|
// Add a nonce field. |
| 373 |
|
echo $this->nonce_field( 'dfi_fimageplug-' . $featured_id ); // WPCS: XSS ok. |
|
@@ 887-892 (lines=6) @@
|
| 884 |
|
$dfi_images = get_post_meta( $post_id, 'dfiFeatured', true ); |
| 885 |
|
$ret_val = array(); |
| 886 |
|
|
| 887 |
|
if ( ! empty( $dfi_images ) && is_array( $dfi_images ) ) { |
| 888 |
|
foreach ( $dfi_images as $dfi_image ) { |
| 889 |
|
$dfi_image_full = $this->separate( $dfi_image, 'full' ); |
| 890 |
|
$ret_val[] = (int) $this->get_image_id( $this->upload_url . $dfi_image_full ); |
| 891 |
|
} |
| 892 |
|
} |
| 893 |
|
$ret_val = $this->sanitize_array( $ret_val ); |
| 894 |
|
return $ret_val; |
| 895 |
|
} |