Opened 4 years ago
Last modified 4 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 6.0.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
4 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The core gallery shortcode does not handle a
typeparameter, 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