@@ 621-626 (lines=6) @@ | ||
618 | $media = self::from_gallery( $post_id ); |
|
619 | if ( !$media && $args['from_attachment'] ) |
|
620 | $media = self::from_attachment( $post_id, $args['width'], $args['height'] ); |
|
621 | if ( ! $media && $args['from_blocks'] ) { |
|
622 | if ( empty( $args['html_content'] ) ) |
|
623 | $media = self::from_blocks( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content |
|
624 | else |
|
625 | $media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that |
|
626 | } |
|
627 | if ( !$media && $args['from_html'] ) { |
|
628 | if ( empty( $args['html_content'] ) ) |
|
629 | $media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content |
|
@@ 627-632 (lines=6) @@ | ||
624 | else |
|
625 | $media = self::from_blocks( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that |
|
626 | } |
|
627 | if ( !$media && $args['from_html'] ) { |
|
628 | if ( empty( $args['html_content'] ) ) |
|
629 | $media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content |
|
630 | else |
|
631 | $media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that |
|
632 | } |
|
633 | ||
634 | if ( !$media && $args['fallback_to_avatars'] ) { |
|
635 | $media = self::from_blavatar( $post_id, $args['avatar_size'] ); |