Plugin Directory

Changeset 3174692


Ignore:
Timestamp:
10/24/2024 03:23:52 AM (18 months ago)
Author:
advancedgridbuilder
Message:

version 6.3.3

Location:
agb-free/trunk
Files:
2 added
21 edited

Legend:

Unmodified
Added
Removed
  • agb-free/trunk/agb-free.php

    r2998190 r3174692  
    1010 * Plugin URI:        https://www.advancedgridbuilder.com
    1111 * Description:       The ultimate grid and list generator for all Wordpress content types
    12  * Version:           6.0.3
     12 * Version:           6.3.3
    1313 * License:           GPL-2.0+
    1414 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
  • agb-free/trunk/dyg-form/css/dygform-public.css

    r2983320 r3174692  
    571571    margin-right: 20px;
    572572}
     573.dygform .two-thirds-width {
     574    display:inline-block;
     575    width: calc(calc(100% - 40px) / 3);
     576    margin-right: 20px;
     577}
     578.dygform .two-thirds-width {
     579    display:inline-block;
     580    width: calc(100% - (calc(calc(100% - 40px) / 3) + 20px));
     581}
    573582.dygform .fourth-width {
    574583    display:inline-block;
  • agb-free/trunk/dyg-form/js/dyg-form.js

    r2983320 r3174692  
    222222        },
    223223        beforeSend: function () {
     224            window.dygformIsReady = false; //mainly used for testing
    224225        },
    225226        complete: function () {
     
    256257            }
    257258            dygformReady();
     259            window.dygformIsReady = true;
    258260        },
    259261        error: function (error) {
     
    261263            jQuery(`${dygformForm} div.dygform-message`).addClass('dygform-error-message');
    262264            jQuery(`${dygformForm} div.dygform-message`).show(250);
     265            window.dygformIsReady = true;
    263266        }
    264267    }
  • agb-free/trunk/dyg-grid/addons/free/dygpg_accordion.php

    r2983320 r3174692  
    1515     */
    1616    public function modify_wrapper_classes($class, $obj) {
    17         if ($obj->args['accordion-enable'] === 'Y') {
     17        if ($obj->args['grid-type'] === 'Accordion') {
    1818            $class .= " dygpg-style-accordion";
    1919        }
     
    4949    public function dygpg_legacy_atts($atts) {
    5050        if (version_compare($atts['version'] ?? '0.0.0', '5.8.6', '<') && ($atts['preset'] ?? '') === 'dygpg-accordion') {
    51             $atts['accordion-enable'] = 'Y';
     51            $atts['grid-type'] = 'Accordion';
    5252        }
    5353        return $atts;
  • agb-free/trunk/dyg-grid/addons/free/dygpg_accordion_pro.php

    r2998189 r3174692  
    1313    public function modify_data($data) {
    1414        $element = [
    15             'accordion_enable'      => [
    16                 'type'          => 'checkbox',
    17                 'label'         => 'Accordion',
    18                 'data-link'     => 'accordion-enable',
    19                 'data-link-val' => 'Y',
    20             ],
    21             'accordion_show_first'  => [
    22                 'type'          => 'checkbox',
    23                 'label'         => 'Accordion (show first)',
    24                 'data-link'     => 'accordion-show-first',
    25                 'data-link-val' => 'Y',
    26             ],
    27             'accordion_toggle_open' => [
    28                 'type'          => 'checkbox',
    29                 'label'         => 'Accordion (toggle open)',
    30                 'data-link'     => 'accordion-toggle-open',
    31                 'data-link-val' => 'Y',
     15            'accordion-option-wrapper' => [
     16                'type'     => 'div',
     17                'container-class' => 'xx-option-wrapper accordion-option-wrapper', //general class for all grid type option wrappers
     18                'label'    => 'Accordion Options',
     19                'contains' => [
     20                    'accordion_show_first'  => [
     21                        'type'          => 'checkbox',
     22                        'label'         => 'Accordion (show first)',
     23                        'data-link'     => 'accordion-show-first',
     24                        'container-class' => 'third-width',
     25                        'data-link-val' => 'Y',
     26                    ],
     27                    'accordion_toggle_open' => [
     28                        'type'          => 'checkbox',
     29                        'label'         => 'Accordion (toggle open)',
     30                        'data-link'     => 'accordion-toggle-open',
     31                        'container-class' => 'third-width end',
     32                        'data-link-val' => 'Y',
     33                    ],
     34                ],
    3235            ],
    3336        ];
    34         dygform_insert_element($data, 'fonts', $element);
     37
     38        dygform_insert_element($data, 'grid-type-wrapper', $element);
    3539
    3640        return $data;
  • agb-free/trunk/dyg-grid/addons/free/dygpg_carousel.js

    r2983320 r3174692  
    1515        $carousel.off('afterChange.dygpgCarousel').on('afterChange.dygpgCarousel', function () {
    1616            checkSlickChangeMore(this);
     17            window.agbResize = false
    1718            apply_filters('dygpg-resize', null);
     19            window.agbResize = true;
     20        });
     21
     22        // Bind the setPosition event to call aspect_ratio
     23        $carousel.on('setPosition', function(event, slick){
     24            aspect_ratio();
    1825        });
    1926
  • agb-free/trunk/dyg-grid/addons/free/dygpg_carousel.php

    r2983320 r3174692  
    1515        add_filter('dygpg-modify-submit-args', [$this, 'modify_submit_args'], 20, 2); //needs to fire after breakpoints are validated
    1616        add_filter('dygpg-modify-existing-args', [$this, 'modify_existing_args'], 10, 1);
     17    }
     18
     19    private function is_carousel($obj) {
     20        $result = in_array($obj->args['use_carousel'], ['S', 'F']) && (($obj->args['grid-type'] ?? '') === 'Carousel');
     21        return $result;
    1722    }
    1823
     
    4954
    5055    function add_wrapper_parameter($param, $obj) {
    51         if (!in_array($obj->args['use_carousel'], ['S', 'F'])) {
     56        if (!$this->is_carousel($obj)) {
    5257            return $param;
    5358        }
     
    104109
    105110    function modify_wrapper_classes($classes, $obj) {
    106         if (!in_array($obj->args['use_carousel'], ['S', 'F'])) {
     111        if (!$this->is_carousel($obj)) {
    107112            return $classes;
    108113        }
     
    118123
    119124    function modify_load_more_wrapper_classes($classes, $obj) {
    120         if (!in_array($obj->args['use_carousel'], ['S', 'F'])) {
     125        if (!$this->is_carousel($obj)) {
    121126            return $classes;
    122127        }
     
    125130    }
    126131    function modify_load_more_ajax_class($classes, $obj) {
    127         if (!in_array($obj->args['use_carousel'], ['S', 'F'])) {
     132        if (!$this->is_carousel($obj)) {
    128133            return $classes;
    129134        }
     
    133138
    134139    function modify_load_more_button_classes($classes, $obj) {
    135         if (!in_array($obj->args['use_carousel'], ['S', 'F'])) {
     140        if (!$this->is_carousel($obj)) {
    136141            return $classes;
    137142        }
     
    159164     */
    160165    public function shortcode_array($shortcode) {
    161         $shortcode['use_carousel']             = 'N';
     166        $shortcode['use_carousel']             = 'S';
    162167        $shortcode['use_carousel_center_mode'] = '';
    163168        $shortcode['carousel_autoplay']        = 'Y';
  • agb-free/trunk/dyg-grid/addons/free/dygpg_carousel_pro.php

    r2998189 r3174692  
    1515            'carousel_wrapper' => [
    1616                'type'            => 'div',
    17                 'label'           => 'Carousel settings',
    18                 'container-class' => 'dygform-accordion',
    19                 'style'           => 'display:none;',
    20                 'help'            => 'panel/carousel-settings',
     17                'container-class' => 'xx-option-wrapper carousel-option-wrapper',
    2118                'contains'        => [
    2219                    'carousel_select_wrapper' => [
     
    2623                        'container-style' => 'width: 100%;',
    2724                        'contains'        => [
    28                             'carousel_off'    => [
    29                                 'type'          => 'radio',
    30                                 'data-link'     => 'use_carousel',
    31                                 'checked'       => 'checked',
    32                                 'data-link-val' => 'N',
    33                                 'label'         => 'Off',
    34                             ],
    3525                            'carousel_scroll' => [
    3626                                'type'          => 'radio',
     
    113103            ],
    114104        ];
    115         dygform_insert_element($data, 'image_wrapper', $element);
     105        dygform_insert_element($data, 'grid-type-wrapper', $element);
    116106
    117107        return $data;
  • agb-free/trunk/dyg-grid/addons/free/dygpg_meta_pro.php

    r2998189 r3174692  
    1818            'meta_wrapper' => [
    1919                'type'     => 'div',
     20                'label'    => 'Meta formatting',
     21                'help'     => 'meta-formatting',
    2022                'contains' => [
    2123                    'inline_separator' => [
     
    7375                        'data-link'       => 'button',
    7476                    ],
    75                     'field_padding'      => [
     77                    'field_padding'    => [
    7678                        'type'            => 'input',
    7779                        'element-type'    => 'text',
     
    8082                        'data-link'       => 'field-padding',
    8183                    ],
    82                     'field_max_width'      => [
     84                    'field_max_width'  => [
    8385                        'type'            => 'input',
    8486                        'element-type'    => 'text',
     
    9193        ]);
    9294    }
    93 
    94    
    95 
    9695
    9796    public function load_form($data, $args) {
  • agb-free/trunk/dyg-grid/addons/free/dygpg_styles_free.php

    r2983320 r3174692  
    1717        add_filter('dygpg-class', [$this, 'filter_class'], 10, 2);
    1818        add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts']);
     19        add_filter("dygpg-load-form", [$this, 'load'], 10, 2);
     20        add_filter('dygpg-legacy-atts', [$this, 'dygpg_legacy_atts'], 10, 2);
    1921
    2022        $this->elements = [
     
    6466                        'container-style' => 'columns:3;',
    6567                        'contains'        => [
    66                             'fonts'                         => [
     68                            'fonts' => [
    6769                                'type'          => 'checkbox',
    6870                                'label'         => 'Override theme fonts',
     
    7173                                'default'       => 'Y',
    7274                            ],
    73                             0                               => [
     75                            0       => [
    7476                                'type'          => 'checkbox',
    7577                                'label'         => 'Cell Shadow',
     
    7880                                'default'       => '',
    7981                            ],
    80                             1                               => [
     82                            1       => [
    8183                                'type'          => 'checkbox',
    8284                                'label'         => 'Image Shadow',
     
    8587                                'default'       => '',
    8688                            ],
    87                             2                               => [
     89                            2       => [
    8890                                'type'          => 'checkbox',
    8991                                'label'         => 'Hover Enlarge',
     
    9294                                'default'       => '',
    9395                            ],
    94                             3                               => [
    95                                 'type'          => 'checkbox',
    96                                 'label'         => 'Center All Text',
    97                                 'data-link'     => 'style-center-text',
    98                                 'data-link-val' => 'Y',
    99                                 'default'       => '',
    100                             ],
    101                             'style-bottom-content-vertical' => [
    102                                 'type'          => 'checkbox',
    103                                 'label'         => 'Content Bottom (Vertical)',
    104                                 'data-link'     => 'style-bottom-content-vertical',
    105                                 'data-link-val' => 'Y',
    106                                 'default'       => '',
    107                             ],
    108                             4                               => [
    109                                 'type'          => 'checkbox',
    110                                 'label'         => 'Content Center (Vertical)',
    111                                 'data-link'     => 'style-center-content-vertical',
    112                                 'data-link-val' => 'Y',
    113                                 'default'       => '',
    114                             ],
    115                             5                               => [
    116                                 'type'          => 'checkbox',
    117                                 'label'         => 'Content Center (Horizontal)',
    118                                 'data-link'     => 'style-center-content-horizontal',
    119                                 'data-link-val' => 'Y',
    120                                 'default'       => '',
    121                             ],
    122                             6                               => [
     96                            6       => [
    12397                                'type'          => 'checkbox',
    12498                                'label'         => 'Image Hover Zoom',
     
    127101                                'default'       => '',
    128102                            ],
    129                             7                               => [
     103                            7       => [
    130104                                'type'          => 'checkbox',
    131105                                'label'         => 'Cell Hover Shadow',
     
    133107                                'data-link-val' => 'Y',
    134108                                'default'       => '',
     109                            ],
     110                        ],
     111                    ],
     112                    'grid-type-wrapper'           => [
     113                        'type'            => 'div',
     114                        'label'           => 'Grid Type',
     115                        'help'            => 'grid-type',
     116                        'contains'        => [
     117                            'grid-type' => [
     118                                'class' => 'dygpg-grid-type-select',
     119                                'type'            => 'dropdown_group',
     120                                'container-class' => 'half-width',
     121                                'default'         => '',
     122                                'data-link'       => 'grid-type',
     123                                'placeholder'     => 'Grid type',
     124                                'options'         => [
     125                                ],
    135126                            ],
    136127                        ],
     
    141132    }
    142133
    143    
     134    /**
     135     * revise the agb editor form at load
     136     * insert the role options to the dropdown and select the default
     137     *
     138     * @param  array   $data
     139     * @param  array   $args
     140     * @return array
     141     */
     142    public function load($data, $args) {
     143        $e = dygform_find_element($data, "grid-type");
     144        dygform_add_options($e, ['Grid', 'Accordion', 'Carousel', 'Table'], $args['grid-type'] ?? '');
     145        return $data;
     146    }
     147
    144148    public function enqueue_scripts() {
    145149        dyg_enqueue_style('dygpg-styles-pro', DYG_STYLESHEET_DIRECTORY_URI . '/dyg-grid/addons/free/dygpg_styles_free.css');
    146150    }
    147 
    148151
    149152    public function store_args($args, $atts) {
     
    153156
    154157    public function filter_class($class, $obj) {
    155         if ($obj->args['style-center-text'] === 'Y') {
    156             $class .= ' dygpg-center-text';
    157         }
    158         if ($obj->args['style-center-content-horizontal'] === 'Y') {
    159             $class .= ' dygpg-center-content-horizontal';
    160         }
     158
    161159        if ($obj->args['style-cell-hover-shadow'] === 'Y') {
    162160            $class .= ' dygpg-shadow-hover';
     
    164162        if ($obj->args['style-image-hover-zoom'] === 'Y') {
    165163            $class .= ' dygpg-style-image-zoom';
    166         }
    167         if ($obj->args['style-center-content-vertical'] === 'Y') {
    168             $class .= ' dygpg-center-content-vertical';
    169         }
    170         if ($obj->args['style-bottom-content-vertical'] === 'Y') {
    171             $class .= ' dygpg-bottom-content-vertical';
    172164        }
    173165        if ($obj->args['style-shadow'] === 'Y') {
     
    195187            $shortcode[$element['data-link']] = $element['default'] ?? '';
    196188        }
     189
     190        $shortcode['grid-type'] = 'Grid';
    197191
    198192        return $shortcode;
     
    206200     */
    207201    public function sort_form_elements($data) {
    208         $e = dygform_find_element($data, 'style-preset-options');
     202        $e             = dygform_find_element($data, 'style-preset-options');
    209203        $containsArray = (array) $e->contains;
    210         uasort($containsArray, function($a, $b) {
     204        uasort($containsArray, function ($a, $b) {
    211205            return strcmp($a->label, $b->label);
    212206        });
     
    282276    }
    283277
     278        /**
     279     * modifies the grid attributes for legacy versions of the plugin
     280     * @param  type   $atts - array of shortcode attributes
     281     * @return type
     282     */
     283    public function dygpg_legacy_atts($atts) {
     284        if (version_compare($atts['version'] ?? '0.0.0', '6.1.0', '>')) {
     285            return $atts;
     286        }
     287       
     288        if (in_array($atts['use_carousel'], ['S', 'F'])) {
     289            $atts['grid-type'] = 'Carousel';
     290        }
     291
     292        if (in_array($atts['accordion-enable'], ['Y'])) {
     293            $atts['grid-type'] = 'Accordion';
     294        }
     295
     296        if (in_array($atts['show_table_headers'], ['Y'])) {
     297            $atts['grid-type'] = 'Table';
     298        }
     299
     300
     301        return $atts;
     302    }
     303
    284304}
  • agb-free/trunk/dyg-grid/addons/free/dygpg_styles_free_data.php

    r2998189 r3174692  
    99    'args' =>
    1010    array (
    11       'accordion-enable' => 'Y',
     11      'grid-type' => 'Accordion',
    1212      'accordion-show-first' => 'Y',
    1313      'accordion-toggle-open' => 'Y',
     
    1717      'attribute_padding_content' => '20px',
    1818      'attribute_padding_title' => '10px 20px',
     19      'cell-v-align' => 'T',
    1920      'columns' => '1,1,1,1',
    2021      'pattern' => '%title%,%<,%content%,%>',
    2122      'style-fonts' => '',
     23      'term_args' =>
     24      array (
     25        'taxonomy' => '',
     26        'orderby' => 'title',
     27        'hide_empty' => false,
     28        'order' => 'ASC',
     29      ),
    2230      'title' => 'N',
    2331      'title-tag' => 'h6',
     32      'use-dynamic-filter-links' => 'Y',
    2433    ),
    2534  ),
     
    5059      'resolutions' => '1080px,1080px',
    5160      'size' => 'large',
    52       'style-center-text' => 'Y',
     61      'content-h-align' => 'C',
     62      'cell-h-align' => 'C',
    5363      'style-fonts' => '',
    5464      'title' => 'N',
    5565      'title-tag' => 'h4',
    5666      'use_carousel' => 'F',
     67      'grid-type' => 'Carousel',
    5768      'width' => '200px,200px',
    5869    ),
     
    7283      'attribute_padding_content' => '17px',
    7384      'attribute_text-align_button' => 'center',
     85      'cell-v-align' => 'T',
    7486      'columns' => '3,3,2,1',
    75       'equal-grid-heights' => 'Y',
    76       'equal-title-heights' => 'Y',
     87      'equal-grid-heights' => 'R',
     88      'equal-title-heights' => 'R',
    7789      'link-titles' => 'Y',
    7890      'pattern' => '%image%,%<,%date%,%author%,%category%,%title%,%excerpt%,%button%,%>',
     
    103115      'pattern' => '%<,%excerpt%,%>,%date%,%category%,%author%,%title%',
    104116      'pattern-direction' => '%date%,%category%,%author%',
    105       'style-center-content-horizontal' => 'Y',
     117      'content-h-align' => 'C',
    106118      'title' => 'N',
    107119      'transition' => 'fade',
     
    129141      'pattern' => '%<,%excerpt%,%>,%date%,%category%,%author%,%title%',
    130142      'pattern-direction' => '%date%,%category%,%author%',
    131       'style-center-content-horizontal' => 'Y',
    132       'style-center-content-vertical' => 'Y',
     143      'content-h-align' => 'C',
     144      'content-v-align' => 'M',
    133145      'title' => 'N',
    134146      'transition' => 'flipx',
     
    152164      'attribute_margin_content' => '0px',
    153165      'attribute_padding_content' => '0px 4% 8% 4%',
     166      'carousel_autoplay' => '',
    154167      'carousel_center_padding' => '20%,20%,20%,20%',
    155168      'carousel_speed' => '5000',
    156169      'carousel_track_padding' => '40px',
     170      'cell-h-align' => 'C',
     171      'cell-v-align' => 'T',
    157172      'cell_background_overlay_color' => 'linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.9) 100%)',
    158173      'column-gap' => '0px,0px,0px,0px',
    159174      'columns' => '1,1,1,1',
    160       'image' => 'B',
     175      'content-h-align' => 'C',
     176      'content-v-align' => 'B',
     177      'content_background_images' => 'B',
    161178      'pattern' => '%<,%title%,%excerpt%,%>',
    162179      'resolutions' => '0px,0px,0px,0px',
    163180      'size' => 'large',
    164       'style-bottom-content-vertical' => 'Y',
    165       'style-center-content-horizontal' => 'Y',
    166       'style-center-text' => 'Y',
    167181      'style-fonts' => '',
    168182      'style-shadow' => 'Y',
    169183      'title' => 'N',
     184      'use-dynamic-filter-links' => 'Y',
    170185      'use_carousel' => 'S',
     186      'grid-type' => 'Carousel',
    171187      'use_carousel_center_mode' => 'Y',
    172188      'use_srcset' => '',
     
    181197    'args' =>
    182198    array (
    183       'columns' => '6,4,3,1',
     199      'columns' => '6,5,4,2',
    184200      'iclass-aspect-ratio' => '1-1',
    185201      'link' => 'N',
     
    206222      'attribute_text-align_image' => 'center',
    207223      'carousel_variable_width' => 'Y',
     224      'cell-v-align' => 'T',
    208225      'column-gap' => '50px,50px,50px,50px',
    209226      'columns' => '1,1,1,1',
    210       'equal-grid-heights' => 'R',
    211       'equal-title-heights' => 'R',
    212227      'iclass-aspect-ratio' => '',
    213228      'image-width' => '',
     
    216231      'pattern' => '%image%,%<,%title%,%excerpt%,%>',
    217232      'title' => 'N',
     233      'use-dynamic-filter-links' => 'Y',
    218234      'use_carousel_center_mode' => 'Y',
    219235    ),
     
    227243    'args' =>
    228244    array (
     245      'cell-h-align' => 'C',
    229246      'column-gap' => '3px,3px,3px,3px',
    230247      'content-aspect-ratio' => 'match_image',
     248      'content-h-align' => 'C',
     249      'content-v-align' => 'M',
    231250      'iclass-aspect-ratio' => '',
    232251      'link' => 'L',
    233252      'link-images' => '',
    234253      'pattern' => '%<,%title%,%>',
    235       'style-center-content-horizontal' => 'Y',
    236       'style-center-content-vertical' => 'Y',
    237254      'title' => 'N',
    238255      'transition' => 'flipx',
    239256      'use-columns' => 'V',
    240     ),
     257      'use-dynamic-filter-links' => 'Y',
     258    ),
     259  ),
     260  'dygpg-gallery-fade' =>
     261  array (
     262    'args' =>
     263    array (
     264      'attribute_color_content' => 'white',
     265      'attribute_padding_content' => '10px',
     266      'carousel_variable_width' => 'Y',
     267      'column-gap' => '0px,0px,0px,0px',
     268      'content-aspect-ratio' => '1:1',
     269      'content-h-align' => 'C',
     270      'content-v-align' => 'M',
     271      'content_background_images' => 'C',
     272      'content_background_overlay_color' => '#000000aa',
     273      'iclass-aspect-ratio' => '',
     274      'link' => 'L',
     275      'link-images' => '',
     276      'pattern' => '%<,%excerpt%,%>',
     277      'pattern-direction' => '%date%,%category%,%author%',
     278      'title' => 'N',
     279      'transition' => 'fade',
     280      'use-dynamic-filter-links' => 'Y',
     281      'use_carousel_center_mode' => 'Y',
     282    ),
     283    'type' => 'Galleries',
     284    'contains' => 'Excerpt Fade',
     285    'value' => 'dygpg-gallery-fade',
     286    'version' => 'free',
    241287  ),
    242288  'dygpg-gallery-hover' =>
     
    259305      'link-images' => '',
    260306      'pattern' => '%title%,%<,%excerpt%,%>',
    261       'style-center-text' => 'Y',
     307      'content-h-align' => 'C',
     308      'cell-h-align' => 'C',
    262309      'title' => 'N',
    263310      'transition' => 'squash-down',
     
    377424      'attribute_padding_content' => '30px',
    378425      'columns' => '2,2,2,1',
    379       'equal-grid-heights' => 'Y',
     426      'equal-content-heights' => 'Y',
    380427      'iclass-aspect-ratio' => '16:9',
    381428      'pattern' => '%image%,%<,%date%,%category%,%title%,%excerpt%,%>',
    382       'style-center-content-horizontal' => 'Y',
     429      'content-h-align' => 'C',
    383430      'style-fonts' => '',
    384431      'style-hover-enlarge' => 'Y',
     
    436483      'pattern-direction' => '%title%,%category%,%author%,%date%,%button%,%image%,%woo_price%,%category%,%settings_panel%,%product_cat%',
    437484      'show_table_headers' => 'Y',
     485      'grid-type' => 'Table',
    438486      'style-cell-hover-shadow' => 'Y',
    439487      'style-fonts' => '',
     
    470518      'pattern-direction' => '%image%,%product_cat%,%title%,%excerpt%,%woo_price%,%category%,%author%,%date%,%button%,%settings_panel%',
    471519      'show_table_headers' => 'Y',
     520      'grid-type' => 'Table',
    472521      'size' => 'thumbnail',
    473522      'style-cell-hover-shadow' => 'Y',
     
    501550      'title' => 'N',
    502551      'use_carousel' => 'S',
     552      'grid-type' => 'Carousel',
    503553      'use_srcset' => '',
    504554    ),
     
    518568      'link-cell' => 'Y',
    519569      'link-images' => '',
    520       'style-center-text' => 'Y',
     570      'content-h-align' => 'C',
     571      'cell-h-align' => 'C',
    521572      'style-shadow' => 'Y',
    522573      'title' => 'N',
     
    543594      'link-images' => '',
    544595      'pattern' => '%<,%title%,%excerpt%,%>',
    545       'style-center-content-horizontal' => 'Y',
    546       'style-center-content-vertical' => 'Y',
     596      'content-h-align' => 'C',
     597      'content-v-align' => 'M',
    547598      'title' => 'N',
    548599    ),
     
    565616      'attribute_padding_cell' => '8%',
    566617      'attribute_padding_content' => '4%',
     618      'breakpoints' => '0px',
     619      'carousel_center_padding' => '60px,60px',
    567620      'carousel_speed' => '5000',
     621      'cell-height' => '150px,150px',
     622      'cell-v-align' => 'T',
    568623      'cell_background_overlay_color' => '#000000aa',
    569       'column-gap' => '0px,0px,0px,0px',
    570       'columns' => '3,3,3,3',
     624      'column-gap' => '0px,0px',
     625      'columns' => '1,1',
     626      'content-h-align' => 'C',
     627      'content-v-align' => 'M',
    571628      'image' => 'B',
    572629      'pattern' => '%<,%title%,%excerpt%,%>',
     630      'resolutions' => '350px,350px',
    573631      'size' => 'large',
    574       'style-center-content-horizontal' => 'Y',
    575       'style-center-content-vertical' => 'Y',
    576       'style-fonts' => '',
    577       'title' => 'N',
     632      'style-fonts' => '',
     633      'title' => 'N',
     634      'use-dynamic-filter-links' => 'Y',
    578635      'use_carousel' => 'F',
     636      'grid-type' => 'Carousel',
    579637      'use_srcset' => '',
     638      'width' => '200px,200px',
    580639    ),
    581640  ),
     
    605664      'resolutions' => '0px,0px',
    606665      'size' => 'large',
    607       'style-bottom-content-vertical' => 'Y',
    608       'style-center-content-horizontal' => 'Y',
    609       'style-center-text' => 'Y',
     666      'content-v-align' => 'B',
     667      'content-h-align' => 'C',
     668      'cell-h-align' => 'C',
    610669      'style-fonts' => '',
    611670      'title' => 'N',
    612671      'use_carousel' => 'F',
     672      'grid-type' => 'Carousel',
    613673      'use_srcset' => '',
    614674      'width' => '200px,200px',
     
    629689      'attribute_padding_content' => '17px',
    630690      'attribute_text-align_button' => 'center',
     691      'cell-v-align' => 'T',
    631692      'columns' => '3,3,2,1',
    632       'equal-grid-heights' => 'Y',
    633       'equal-title-heights' => 'Y',
     693      'equal-grid-heights' => 'R',
     694      'equal-title-heights' => 'R',
    634695      'link-titles' => 'Y',
    635696      'pattern' => '%image%,%<,%date%,%author%,%category%,%title%,%excerpt%,%button%,%>',
     
    648709    'args' =>
    649710    array (
    650       'accordion-enable' => 'Y',
     711      'grid-type' => 'Accordion',
    651712      'accordion-show-first' => 'Y',
    652713      'attribute_background-color_title' => 'var(--agb-accent-color)',
     
    697758      'resolutions' => '332px,332px,332px,332px',
    698759      'start-index' => '1',
    699       'style-center-content-horizontal' => 'Y',
    700       'style-center-content-vertical' => 'Y',
    701       'style-center-text' => 'Y',
     760      'content-h-align' => 'C',
     761      'content-v-align' => 'M',
     762      'cell-h-align' => 'C',
    702763      'style-fonts' => '',
    703764      'title' => 'N',
     
    726787      'pattern-direction' => '%date%,%category%,%author%',
    727788      'resolutions' => '100px,100px,100px,100px',
    728       'style-center-content-horizontal' => 'Y',
     789      'content-h-align' => 'C',
    729790      'style-fonts' => '',
    730791      'title' => 'N',
  • agb-free/trunk/dyg-grid/addons/free/dygpg_table_free.php

    r2983320 r3174692  
    1616     */
    1717    public function modify_style_array($css, $obj) {
    18         if ($obj->args['show_table_headers'] !== 'Y') {
     18        if ($obj->args['grid-type'] !== 'Table') {
    1919            return $css;
    2020        }
     
    3636     */
    3737    public function get_widget($output, $obj) {
    38         if ($obj->args['show_table_headers'] !== 'Y') {
     38        if ($obj->args['show_table_headers'] !== 'Y'  OR $obj->args['grid-type'] !== 'Table') {
    3939            return $output;
    4040        }
  • agb-free/trunk/dyg-grid/addons/free/dygpg_table_pro.php

    r2998189 r3174692  
    1414    public function modify_data($data) {
    1515        $element = [
    16             'show_table_header' => [
    17                 'type'          => 'checkbox',
    18                 'data-link'     => 'show_table_headers',
    19                 'data-link-val' => 'Y',
    20                 'label'         => 'Show Table Headers',
     16            'table-option-wrapper' => [
     17                'type'     => 'div',
     18                'label'    => 'Table Options',
     19                'help'     => 'table-options',
     20                'container-class' => 'xx-option-wrapper table-option-wrapper',
     21                'contains' => [
     22                    'show_table_header' => [
     23                        'type'          => 'checkbox',
     24                        'data-link'     => 'show_table_headers',
     25                        'data-link-val' => 'Y',
     26                        'label'         => 'Show Table Headers',
     27                    ],
     28                ],
    2129            ],
    2230        ];
    23         dygform_insert_element($data, 'show_content', $element);
     31        dygform_insert_element($data, 'grid-type-wrapper', $element);
    2432
    2533        return $data;
  • agb-free/trunk/dyg-grid/css/dyg-post-grid-templates.css

    r2983320 r3174692  
    135135.dygpg-row-layout .dygpg-cell {
    136136    display: flex;
    137     flex-direction: row;
     137    flex-direction: row!important;
    138138}
    139139
     
    191191.dygpg-meta li {
    192192    display:inline;
     193    padding: 0px !important;
    193194}
    194195.dygpg-blog-fade .dygpg-transition-wrapper {
     
    225226/*end dygpg-list*/
    226227
    227 .dygpg-center-text .dygpg-content,
     228.dygpg-cell-valign-top .dygpg-cell,
     229.dygpg-content-valign-top .dygpg-content {
     230    flex-direction: column;
     231    justify-content: flex-start;
     232}
     233
     234.dygpg-cell-valign-bottom .dygpg-cell,
     235.dygpg-content-valign-bottom .dygpg-content {
     236    display: flex;
     237    flex-direction: column;
     238    justify-content: flex-end;
     239    height: 100%;
     240}
     241
     242.dygpg-cell-valign-middle .dygpg-cell,
     243.dygpg-content-valign-middle .dygpg-content {
     244    display: flex;
     245    flex-direction: column;
     246    justify-content: center;
     247    height: 100%;
     248}
     249
     250.dygpg-cell-halign-left .dygpg-cell,
     251.dygpg-content-halign-left .dygpg-content {
     252    text-align: left;
     253    align-items: flex-start;
     254}
     255
     256.dygpg-cell-halign-right .dygpg-cell,
     257.dygpg-content-halign-right .dygpg-content {
     258    text-align: right;
     259    align-items: flex-end;
     260}
     261
     262.dygpg-cell-halign-center .dygpg-cell,
     263.dygpg-content-halign-center .dygpg-content {
     264    text-align: center;
     265    align-items: center;
     266}
     267
     268/* .dygpg-center-text .dygpg-content,
    228269.dygpg-center-text .dygpg-pattern-button,
    229270.dygpg-center-text .dygpg-text {
     
    254295.dygpg-center-content-vertical .dygpg-content span  {
    255296    flex: 0 1 auto;
    256 }
     297} */
    257298.dygpg-button button {
    258299    background-color: unset;
  • agb-free/trunk/dyg-grid/dyg-post-grid.php

    r2998190 r3174692  
    1111$dygpg_state = [];
    1212
    13 define('AGB_VERSION', '6.0.3');
     13define('AGB_VERSION', '6.3.3');
    1414$previousVersion = get_option('agb_version');
    1515
  • agb-free/trunk/dyg-grid/forms/dygpg-form.php

    r2998189 r3174692  
    3535        . "<i class='fas fa-arrows-alt'></i>"
    3636        . "<i class='fas fa-times dygpg-close-edit'></i>"
    37         . "<div class='dygpg-version'>AGB " . (is_agb_theme() ? 'Theme' : '') . (is_agb_free() ? 'Free' : '') . (is_agb_pro() ? 'Pro' : '') . ' v'. AGB_VERSION . "</div>",
     37        . "<div class='dygpg-version'>AGB " . apply_filters('dygpg_version_string', (is_agb_theme() ? 'Theme' : '') . (is_agb_free() ? 'Free' : '') . (is_agb_pro() ? 'Pro' : '') . ' v'. AGB_VERSION) . "</div>",
    3838    ],
    3939    'id'              => [
  • agb-free/trunk/dyg-grid/includes/class-dygpg-postgrid.php

    r2998189 r3174692  
    7272
    7373    /**
    74      * modifies the args to handle legacy versions of agb thay may have u   sed args differently to the current version
     74     * modifies the args to handle legacy versions of agb thay may have used args differently to the current version
    7575     */
    7676    public static function handle_legacy_atts($atts) {
     
    779779    }
    780780
     781
    781782    // handles the loop for posts
    782783    function grid_query_post() {
     
    797798            $this->qpgexcerpt = function_exists('get_field') ? get_field('post_grid_excerpt') : '';
    798799            // the et_builder_get_the_term_list function is not loaded when the post_grid is generated via ajax
    799             $this->qdate    = get_the_date();
    800800            if (strpos($this->args['pattern'], '%content%') !== false) {
    801801                $this->qcontent = $this->args['content-shortcodes'] === 'Y' ? do_shortcode(get_the_content()) : get_the_content(); //filter will render divi content
     
    803803                $this->qcontent = '';
    804804            }
     805            $this->qdate    = get_the_date();
    805806            $this->qexcerpt = strpos($this->args['pattern'], '%excerpt%') !== false ? apply_filters('the_excerpt', get_the_excerpt()) : '';
    806807            //if qpid is zero, it's probably a media library loop so the attachment is the same as the post;
    807             $this->qpid     = get_post_thumbnail_id() === 0 ? $this->qid : get_post_thumbnail_id();
     808            $this->qpid     = get_post_thumbnail_id($this->qid) === 0 ? $this->qid : get_post_thumbnail_id($this->qid);
    808809            $this->qsrc     = wp_get_attachment_image_src($this->qpid, $this->args['size'])[0] ?? '';
    809810            $this->qsrcfull = wp_get_attachment_image_src($this->qpid, 'full')[0] ?? '';
     
    816817            return false;
    817818        }
    818         error_log("qindex=$this->qindex, offset={$this->args['params']['offset']}, total=$this->qtotal, qid=$this->qid");
    819819    }
    820820
  • agb-free/trunk/dyg-grid/js/dyg-resize.js

    r2983320 r3174692  
    44
    55function dygpgEqualiseFunctions() {
     6    window.agbReady = false;
    67    aspect_ratio();
    78    equalizeAllRowHeights();
    89    equal_height();
     10    window.agbResize = false
    911    apply_filters('dygpg-resize', '');
     12    window.agbResize = true;
     13    window.agbReady = true;
    1014}
    1115
  • agb-free/trunk/dyg-grid/js/dygpg-editor.js

    r2998189 r3174692  
    6262});
    6363
     64// Function to show/hide option wrappers based on the select value for the grid type selector
     65function updateOptionWrappers(selectElement) {
     66    var selectedValue = jQuery(selectElement).val().toLowerCase();
     67    var $dygpgWrapper = jQuery(selectElement).closest('form');
     68
     69    // Hide all option wrappers within the same .dgpg-wrapper
     70    $dygpgWrapper.find('.xx-option-wrapper').hide();
     71
     72    // Show the selected option wrapper
     73    $dygpgWrapper.find('.' + selectedValue + '-option-wrapper').show();
     74}
     75
    6476
    6577function dygpgAdminAjaxReadyFunctions() {
     78    // Initial setup for grid type options
     79    jQuery('.dygpg-grid-type-select').each(function () {
     80        updateOptionWrappers(this);
     81    });
     82
     83    // Update on select change for grid type options
     84    jQuery('.dygpg-grid-type-select').off('change').on('change', function () {
     85        updateOptionWrappers(this);
     86    });
     87
    6688    //auto select reset when a preset button is clicked
    6789    jQuery('select[name="theme-preset-options"]').off('change').on('change', function () {
     
    158180        var $input = jQuery(input);
    159181        var inputId = input.id; // Assuming each input has a unique ID
    160    
     182
    161183        // Check if Tagify has already been initialized using the Map
    162184        if (tagifyInstances.has(inputId)) {
     
    165187            return; // Skip this iteration
    166188        }
    167    
     189
    168190        var whitelist_string = $input.attr('data-whitelist');
    169        
     191
    170192        var tagify = new Tagify(input, {
    171193            whitelist: whitelist_string,
     
    179201            }
    180202        });
    181    
     203
    182204        // Store the Tagify instance
    183205        tagifyInstances.set(inputId, tagify);
    184    
     206
    185207        // Placeholder toggle function
    186208        function togglePlaceholderLabel() {
     
    194216            }
    195217        }
    196    
     218
    197219        // Attach the placeholder toggle function to Tagify events
    198         tagify.on('focus', function() {
     220        tagify.on('focus', function () {
    199221            var previous = $input.prev();
    200222            previous.removeClass('dygpg-placeholder-initial');
    201223            $input.addClass('dygpg-placeholder-hidden');
    202224        });
    203    
     225
    204226        tagify.on('blur', togglePlaceholderLabel);
    205    
     227
    206228        // For initial state
    207229        togglePlaceholderLabel();
    208    
     230
    209231        var dragsort = new DragSort(tagify.DOM.scope, {
    210232            selector: '.' + tagify.settings.classNames.tag,
     
    213235            }
    214236        });
    215    
     237
    216238        // Must update Tagify's value according to the re-ordered nodes in the DOM
    217239        function onDragEnd(elm) {
     
    264286    jQuery('body').prepend(e);
    265287    var x = jQuery(window).width() - jQuery(e).find('form').width();
    266     jQuery(e).css('top',y);
    267     jQuery(e).css('left',0);
    268    
    269 }
     288    jQuery(e).css('top', y);
     289    jQuery(e).css('left', 0);
     290
     291}
  • agb-free/trunk/dyg-grid/js/dygpg-load-more.js

    r2998189 r3174692  
    1414        return;
    1515    }
     16    window.agbReady = false; //mainly for testing
    1617   
    1718    dygLoadMoreInProgress = true;
  • agb-free/trunk/readme.txt

    r2998190 r3174692  
    55Requires PHP: 7.4
    66Tested up to: 6.4.1
    7 Stable tag: 6.0.3
     7Stable tag: 6.3.3
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.