humanmade / network-media-library

Network Media Library plugin for WordPress Multisite
MIT License
290 stars 55 forks source link

Test compatibility with image gallery and media plugins #22

Open johnbillion opened 6 years ago

johnbillion commented 6 years ago
bojanks commented 5 years ago

It doesn't work with WP native gallery. Shortcode return nothing!

gaelgerard commented 5 years ago

It doesn't work with WP native gallery. Shortcode return nothing!

Hey, I'm also interested with this feature. Did u find a solution ?

kleins commented 3 years ago

Same here, with WP native gallery. Gallery stays empty or did not show last uploaded images. Any solution for that? Thx

kleins commented 3 years ago

Here it was a Problem mit Polylang. Polylang filtered for Languages, what results in not visible Images. This solved it: add_action('parse_query', function ($query) { if ($query->query['post_mime_type'] === 'image' && $query->query['post_type'] === 'attachment' && key_exists('tax_query', $query->query_vars)) { for ($i = 0; $i < count($query->query_vars['tax_query']); $i++) { if (key_exists($i, $query->query_vars['tax_query']) && key_exists('taxonomy', $query->query_vars['tax_query'][$i]) && $query->query_vars['tax_query'][$i]['taxonomy'] === 'language') { unset($query->query_vars['tax_query'][$i]); } } } }, PHP_INT_MAX);