Opened 2 years ago
Last modified 2 years ago
#56679 new defect (bug)
get_post_gallery_images() Does not return images if the gallery shortcode has type="slideshow"
Reported by: | MaFt | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.0.2 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
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)
#2
@
2 years 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.
Thanks
The core gallery shortcode does not handle a
type
parameter, but having one should not affect the output.https://developer.wordpress.org/reference/functions/gallery_shortcode/
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