| @@ 1135-1143 (lines=9) @@ | ||
| 1132 | } |
|
| 1133 | } |
|
| 1134 | ||
| 1135 | if ( !empty( $img_url ) ) { |
|
| 1136 | $image_params['width'] = $thumbnail_size['width']; |
|
| 1137 | $image_params['height'] = $thumbnail_size['height']; |
|
| 1138 | $image_params['src'] = Jetpack_PostImages::fit_image_url( |
|
| 1139 | $img_url, |
|
| 1140 | $thumbnail_size['width'], |
|
| 1141 | $thumbnail_size['height'] |
|
| 1142 | ); |
|
| 1143 | } |
|
| 1144 | } |
|
| 1145 | ||
| 1146 | return $image_params; |
|
| @@ 587-590 (lines=4) @@ | ||
| 584 | if ( !$media && $args['from_attachment'] ) |
|
| 585 | $media = self::from_attachment( $post_id, $args['width'], $args['height'] ); |
|
| 586 | if ( !$media && $args['from_html'] ) { |
|
| 587 | if ( empty( $args['html_content'] ) ) |
|
| 588 | $media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content |
|
| 589 | else |
|
| 590 | $media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that |
|
| 591 | } |
|
| 592 | ||
| 593 | if ( !$media && $args['fallback_to_avatars'] ) { |
|