Dynamic Galleries CompatibilityEnhanced Media Library
Possible Conflicts
Enhanced Media Library is designed to enhance WordPress native galleries/playlists making their shortcodes “understand” supplementary attributes.
The plugin enhances shortcodes in most gentle manner possible. In most cases Enhanced Media Library is compatible with any plugin/theme that changes native WP gallery/playlist template in order to provide lightbox, carousel, slideshow, grid/mosaic and other functionality.
That said, other plugins/themes might override WP gallery/playlist attributes or queries in a way that would prevent Enhanced Media Library from displaying correct set of media items for a gallery/playlist.
If you find a possible conflict and prefer other plugin/theme functionality, please deactivate the feature (disable Enhanced media shortcodes
option on Settings
> Media Library (tab)
> Media Shortcodes (section)
) and let us know about the issue. We would like to find a solution!
For plugin/theme developers
If your theme or plugin changes the look (HTML) of the WordPress gallery or playlist using the post_gallery
filter, then please make sure to add the following code at the beginning of the function prior to processing the gallery/playlist attributes:
- For gallery
- For playlist
Code Example
Explanation
Enhanced Media Library hooks into shortcode_atts_{$shortcode}
filter, which is called in the shortcode_atts
function (see https://developer.wordpress.org/reference/functions/shortcode_atts/) to change the ids
parameter of gallery attributes.
This way the content of the gallery/playlist can be changed for future displaying within your theme or plugin.