| @@ 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'] ) { | |
| @@ 1137-1145 (lines=9) @@ | ||
| 1134 | } | |
| 1135 | } | |
| 1136 | ||
| 1137 | 			if ( !empty( $img_url ) ) { | |
| 1138 | $image_params['width'] = $thumbnail_size['width']; | |
| 1139 | $image_params['height'] = $thumbnail_size['height']; | |
| 1140 | $image_params['src'] = Jetpack_PostImages::fit_image_url( | |
| 1141 | $img_url, | |
| 1142 | $thumbnail_size['width'], | |
| 1143 | $thumbnail_size['height'] | |
| 1144 | ); | |
| 1145 | } | |
| 1146 | } | |
| 1147 | ||
| 1148 | return $image_params; | |