@@ 566-569 (lines=4) @@ | ||
563 | if ( !$media && $args['from_attachment'] ) |
|
564 | $media = self::from_attachment( $post_id, $args['width'], $args['height'] ); |
|
565 | if ( !$media && $args['from_html'] ) { |
|
566 | if ( empty( $args['html_content'] ) ) |
|
567 | $media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content |
|
568 | else |
|
569 | $media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that |
|
570 | } |
|
571 | ||
572 | if ( !$media && $args['fallback_to_avatars'] ) { |
@@ 1133-1141 (lines=9) @@ | ||
1130 | } |
|
1131 | } |
|
1132 | ||
1133 | if ( !empty( $img_url ) ) { |
|
1134 | $image_params['width'] = $thumbnail_size['width']; |
|
1135 | $image_params['height'] = $thumbnail_size['height']; |
|
1136 | $image_params['src'] = Jetpack_PostImages::fit_image_url( |
|
1137 | $img_url, |
|
1138 | $thumbnail_size['width'], |
|
1139 | $thumbnail_size['height'] |
|
1140 | ); |
|
1141 | } |
|
1142 | } |
|
1143 | ||
1144 | return $image_params; |