[wp-trac] [WordPress Trac] #39304: `get_post_galleries()` can return incorrect gallery items.

WordPress Trac noreply at wordpress.org
Thu Jan 5 01:47:26 UTC 2017


#39304: `get_post_galleries()` can return incorrect gallery items.
----------------------------------------+------------------
 Reporter:  dd32                        |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.8
Component:  Media                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by dd32):

 * keywords:  has-patch => has-patch needs-unit-tests
 * milestone:  Awaiting Review => 4.8


Comment:

 I can't see a fault with the approach I've taken here, and although It
 feels a little hacky I can't see a cleaner way to achieve it.

 This could definitely use a set of unit tests showing the incorrect
 behaviour and confirming it does work in various combinations of `$id`
 param, `$post` global and the `id` shortcode attribute.

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


More information about the wp-trac mailing list