MLA post_gallery replacement adds extra margin
-
Hi, thanks again for your work with this plugin.
For the first time I actually use the mla gallery shortcode, after many years!(?) However,
I noticed that the post_gallery default wp function is filtered and replaced by MLA. All my installs with wp default gallery css and styles get broken couse the MLA adds some extra “finess”, calculating gutter of columns and so on.
Gutter can be fixed with advanced CSS, instead of forced PHP output.
It also breaks responsive layout in many point of views, forcing MLA added margin gutter value. Impossible to style consistantly.
The original outputs width of parent in exact % and why not keep it that way. Here is part I talking about
$columns = intval($columns);
$procent = (floor(1000/$columns)) / 10; // ex 16,6666 = 16.6 %
$itemwidth = $columns > 0 ? $procent : 100;(slightly modded, but exactly as default function. (width 16.666 floors to 16% in originbal function, and gives 2% less gap on wide screens with 5 images….) Modern browsers handle decimal widths.)
My point is, the beauty of MLA Gallery Options with custom paste template, is to paste old or already well styled gallerys from the past. The “new” margin added calculation of itemwith breaks this.
Ive hacked the core files everytime on update to fix this, but would see an option to workaround or a better way to get the returned itemwith exact as expected from default wordpress post_gallery function.
Any ideas?
https://www.ads-software.com/extend/plugins/media-library-assistant/
- The topic ‘MLA post_gallery replacement adds extra margin’ is closed to new replies.