[wp-trac] [WordPress Trac] #43826: get_post_galleries() should return gallery blocks

WordPress Trac noreply at wordpress.org
Tue Nov 16 21:23:27 UTC 2021


#43826: get_post_galleries() should return gallery blocks
---------------------------------------------+-----------------------------
 Reporter:  pento                            |       Owner:  hellofromTonya
     Type:  task (blessed)                   |      Status:  closed
 Priority:  normal                           |   Milestone:  5.9
Component:  Media                            |     Version:  5.0
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  template
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52190" 52190]:
 {{{
 #!CommitTicketReference repository="" revision="52190"
 Media: Add support for v1 and v2 gallery block in `get_post_galleries()`.

 The `get_post_galleries()` function only handled galleries from the
 `[gallery]` shortcode. It did not process gallery blocks.

 Introducing v1 and v2 gallery block support in `get_post_galleries()`
 including support for innerblock nesting.

 There are no changes to how the function is called. It detects if the post
 content has one or more gallery blocks. If detected, it parses the blocks
 and then processes to add each gallery block's HTML to the array of
 galleries before being passed through the filter and returned.

 Includes integration tests.

 Follow-up to [24682], [43309], [48262], [52042].

 Props glendaviesnz, costdev, antpb, audrasjb, birgire, celloexpressions,
 desrosj, hellofromTonya, jeffpaul, lynk, pento, ramonopoly, russhylov,
 takahashi_fumiki, tellyworth.
 Fixes #43826.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43826#comment:56>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list