Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#56679 new defect (bug)

get_post_gallery_images() Does not return images if the gallery shortcode has type="slideshow"

Reported by: maft's profile MaFt Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0.2
Component: General Keywords:
Focuses: Cc:


Using does not return anything if the gallery shortcode includes ' type="slideshow"' - removing the type allows it to work. But this means not being able to use slideshows for galleries.

Change History (2)

#1 @joyously
8 months ago

The core gallery shortcode does not handle a type parameter, but having one should not affect the output.
However, the gallery shortcode handler can be bypassed by a plugin using the 'post_gallery' filter.
Please retest without plugins, to isolate the core code.

for reference, the get_post_gallery_images function

#2 @MaFt
8 months ago

Ah, it looks like it is Jetpack that adds the 'type' dropdown option to the WordPress Gallery insertion page.

The 'type' parameter does, definitely, affect the get_post_gallery_images and get_post_galleries_images functions.

Removing Jetpack from the client's site is not an option sadly. I'll just have to try find another way to get the images. I can get the list of IDs from post_content so will just have to filter that and use another function.

I'll see if I can find a way to report to Jetpack that their code is interfering with core WP functions.


Note: See TracTickets for help on using tickets.