Making WordPress.org

Changeset 12987

Timestamp:
11/30/2023 09:02:33 PM (8 months ago)
Author:
coffee2code
Message:

Photo Directory, Posts: Add image enclosures for the photo directory feed.

Also adds constant for image size to use in photo feeds.

Props cagrimmett, coffee2code.
Fixes #7341.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/posts.php

    r12967 r12987  
    1313
    1414    /**
     15
     16
     17
     18
     19
    1520     * Initializer.
    1621     */
     
    4247        add_action( 'request',            [ __CLASS__, 'make_primary_feed_all_photos' ] );
    4348        add_filter( 'the_content_feed',   [ __CLASS__, 'add_photo_to_rss_feed' ] );
     49
    4450        add_filter( 'wp_get_attachment_image_attributes', [ __CLASS__, 'feed_attachment_image_attributes' ], 10, 3 );
    4551    }
     
    410416        if ( $post && Registrations::get_post_type() === get_post_type( $post ) && has_post_thumbnail( $post->ID ) ) {
    411417            $content = '<figure>'
    412                 . get_the_post_thumbnail( $post->ID, 'medium_large', [ 'style' => 'margin-bottom: 10px;', 'srcset' => ' ' ] ) . "\n"
     418                . get_the_post_thumbnail( $post->ID, , [ 'style' => 'margin-bottom: 10px;', 'srcset' => ' ' ] ) . "\n"
    413419                . ( $content ? "<figcaption>{$content}</figcaption>\n" : '' )
    414420                . "</figure>\n";
     
    416422
    417423        return $content;
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
    418466    }
    419467
Note: See TracChangeset for help on using the changeset viewer.