| @@ 570-573 (lines=4) @@ | ||
| 567 | if ( !$media && $args['from_attachment'] ) | |
| 568 | $media = self::from_attachment( $post_id, $args['width'], $args['height'] ); | |
| 569 | 		if ( !$media && $args['from_html'] ) { | |
| 570 | if ( empty( $args['html_content'] ) ) | |
| 571 | $media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content | |
| 572 | else | |
| 573 | $media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that | |
| 574 | } | |
| 575 | ||
| 576 | 		if ( !$media && $args['fallback_to_avatars'] ) { | |
| @@ 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; | |