Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- post-grid-and-filter-ultimate/assets/js/pgafu-public.js.orig 2021-01-28 08:40:04.000000000 +0000
- +++ post-grid-and-filter-ultimate/assets/js/pgafu-public.js 2024-02-22 18:21:03.405981500 +0000
- @@ -189,6 +189,7 @@
- jQuery('#'+filter_container).isotope({
- itemSelector : '.pgafu-post-cnt',
- filter : active_attr,
- + layoutMode : PGAGFU.layoutMode,
- });
- jQuery(document).on('click', '#'+filter_id+' li', function() {
- --- post-grid-and-filter-ultimate/includes/class-pgafu-script.php.orig 2023-06-02 02:43:58.000000000 +0100
- +++ post-grid-and-filter-ultimate/includes/class-pgafu-script.php 2024-02-23 15:17:29.976274500 +0000
- @@ -125,6 +125,14 @@
- wp_enqueue_style( 'pgafu-admin-style');
- }
- + // Allow for different layout mode (default is 'masonry');
- + $default_layout_mode = 'masonry';
- + $layout_mode = apply_filters( 'pgafu_isotope_layoutmode', $default_layout_mode );
- + // Ensure the mode is one of the permitted types.
- + if ( ! in_array( $layout_mode, array( 'masonry', 'fitRows', 'vertical', 'packery', 'cellsByRow', 'masonryHorizontal', 'fitColumns', 'cellsByColumn', 'horiz' ) ) ) {
- + $layout_mode = $default_layout_mode;
- + }
- + wp_add_inline_script( 'pgafu-public-js', 'const PGAGFU = ' . json_encode( array( 'layoutMode' => "$layout_mode" ) ) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement