Plugin Directory

Changeset 2927870


Ignore:
Timestamp:
06/19/2023 11:06:58 AM (3 years ago)
Author:
advancedgridbuilder
Message:

4.5.1

Location:
agb-free
Files:
94 added
11 edited

Legend:

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

    r2926934 r2927870  
    1010 * Plugin URI:        https://www.advancedgridbuilder.com
    1111 * Description:       The ultimate grid and list generator for all Wordpress content types
    12  * Version:           4.5.0
     12 * Version:           4.5.1
    1313 * License:           GPL-2.0+
    1414 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    1515 * Text Domain:       AGB
     16 *
     17 *
    1618 * @package           AGB
    1719 *
     
    3840}
    3941
     42if (!function_exists('dyg_add_theme_colors')) {
    4043//inject the dygiphy theme colours into the head
    41 add_action('wp_head', 'dyg_add_theme_colors', 0);
     44    add_action('wp_head', 'dyg_add_theme_colors', 0);
    4245
    43 function dyg_add_theme_colors() {
    44     echo "<style>
     46    function dyg_add_theme_colors() {
     47        echo "<style>
    4548        :root {
    4649    --dygiphy-theme-color: #91b1db;
     
    5053    --dygiphy-theme-color-dark: #48586d;
    5154}</style>";
     55    }
    5256}
     57
  • agb-free/trunk/dyg-form/js/dyg-form.js

    r2924333 r2927870  
    5959        //destory an existing sortable instance to avoid duplicates
    6060        jQuery(this).find('ul').each(function () {
    61             if (jQuery(this).hasClass('ui-sortable'))
     61            var sortableInstance = jQuery(this).data("ui-sortable");
     62            if (sortableInstance) {
    6263                jQuery(this).sortable("destroy");
     64            }
    6365        });
    6466
     
    7880            connectWith: jQuery(this).find('ul'),
    7981            //duplicates rather than moves when initialising.  needs more work
    80 //            remove: function (e, li) {
    81 //                copyHelper = li.item.clone().insertAfter(li.item);
    82 //                $(this).sortable('cancel');
    83 //                return li.item.clone();
    84 //            }
     82            //            remove: function (e, li) {
     83            //                copyHelper = li.item.clone().insertAfter(li.item);
     84            //                $(this).sortable('cancel');
     85            //                return li.item.clone();
     86            //            }
    8587        }).disableSelection();
    8688
     
    141143        dygformConditionalLogicShow(this);
    142144    });
    143 //    jQuery('[data-show-class],[data-hide-class]').off('change').on('change',function () {
    144 //        var thisForm = jQuery(this).closest('form');
    145 //        dygformConditionalLogic(thisForm);
    146 //        dygformConditionalLogicShow(this);
    147 //    });
     145    //    jQuery('[data-show-class],[data-hide-class]').off('change').on('change',function () {
     146    //        var thisForm = jQuery(this).closest('form');
     147    //        dygformConditionalLogic(thisForm);
     148    //        dygformConditionalLogicShow(this);
     149    //    });
    148150    dygformConditionalLogic('form.dygform');
    149151    jQuery('.dygform-accordion > label').off('click').on('click', function () {
     
    182184    if (jQuery(`${dygformForm} [data-dygformv3-key`).length) {
    183185        dygFormRecaptcha3(dygformForm);
    184     } else
    185     {
     186    } else {
    186187        dygformAJAXSubmit();
    187188    }
     
    190191function dygFormRecaptcha3(dygformForm) {
    191192    grecaptcha.ready(function () {
    192         grecaptcha.execute(jQuery(`${dygformForm} [data-dygformv3-key`).data('dygformv3-key'), {action: 'create_comment'}).then(function (token) {
     193        grecaptcha.execute(jQuery(`${dygformForm} [data-dygformv3-key`).data('dygformv3-key'), { action: 'create_comment' }).then(function (token) {
    193194            jQuery('<input type="hidden" name="g-recaptcha3-response" value="' + token + '">').insertAfter(`${dygformForm} .dygform-recaptcha3`);
    194195            dygformAJAXSubmit();
     
    220221        fields.push(field);
    221222    });
    222     fields.push({'id': 'dygform-name', 'name': jQuery(dygformForm).data('form-name'), 'instance': jQuery(dygformForm).data('instance')});
     223    fields.push({ 'id': 'dygform-name', 'name': jQuery(dygformForm).data('form-name'), 'instance': jQuery(dygformForm).data('instance') });
    223224    jQuery('.dygform-post-delete').remove();
    224225    try {
     
    255256                }
    256257            } else
    257             //if not succcessful and recaptcha failed
    258             if (result.recaptchav2) {
    259                 jQuery(`${dygformForm} .g-recaptcha`).next().show(250);
    260             } else
    261             // if not successful and an error message is returned
    262             if (result.message) {
    263                 jQuery(`${dygformForm} div.dygform-message`).addClass('dygform-error-message');
    264                 jQuery(`${dygformForm} div.dygform-message`).html(result.message);
    265                 jQuery(`${dygformForm} div.dygform-message`).show(250);
    266             }
     258                //if not succcessful and recaptcha failed
     259                if (result.recaptchav2) {
     260                    jQuery(`${dygformForm} .g-recaptcha`).next().show(250);
     261                } else
     262                    // if not successful and an error message is returned
     263                    if (result.message) {
     264                        jQuery(`${dygformForm} div.dygform-message`).addClass('dygform-error-message');
     265                        jQuery(`${dygformForm} div.dygform-message`).html(result.message);
     266                        jQuery(`${dygformForm} div.dygform-message`).show(250);
     267                    }
    267268            // if function/parameters is supplied, execute the callback
    268269            if (typeof result.function !== 'undefined') {
  • agb-free/trunk/dyg-grid/css/dyg-post-grid-templates.css

    r2926934 r2927870  
    215215    flex-flow: row wrap;
    216216    align-content: center;
     217    height: 100%;
    217218    align-items: center;
    218219}
  • agb-free/trunk/dyg-grid/css/dyg-post-grid.css

    r2926934 r2927870  
    4646
    4747.dyg-post-grid-wrapper div.dygpg-filter {
    48     text-align: center;
     48    text-align: left;
    4949    margin-bottom: 30px;
    5050    width: 100%;
     
    8888    color: #91b1db;
    8989    padding: 0px 5px 10px 0px;
     90    text-align: left;
    9091}
    9192
     
    104105    display: inline-flex;
    105106    border: 1px solid #91b1db;
    106     margin: 0px -1px -2px 0px;
     107    margin: 0px -1px -1px 0px;
    107108}
    108109
  • agb-free/trunk/dyg-grid/css/dygpg-form.css

    r2926934 r2927870  
    1111    width: 1.4em;
    1212    cursor: pointer;
     13}
     14.dygform-accordion > label:after {
     15    content: '↕';
     16    position: absolute;
     17    right: 10px;
     18    font-size: 14px;
     19    top: calc(50% - 9px);
    1320}
    1421
     
    225232.dygpg-edit-wrapper .dygform-accordion>label {
    226233    background-color: #c8d8ed;
     234    position: relative;
    227235}
    228236
  • agb-free/trunk/dyg-grid/dyg-post-grid.php

    r2926934 r2927870  
    1111$dygpg_state = [];
    1212
    13 define('AGB_VERSION', '4.5.0');
     13define('AGB_VERSION', '4.5.1');
    1414
    1515include_once DYG_STYLESHEET_DIRECTORY . '/dyg-grid/includes/class-dygpg-db.php';
  • agb-free/trunk/dyg-grid/forms/dygpg-form.php

    r2926934 r2927870  
    2525        'style'            => '',
    2626        'container-style'  => '',
    27         'data-link'        => '',
    28         'data-link-val'    => '',
    2927        'show'             => '',
    3028        'hide'             => '',
  • agb-free/trunk/dyg-grid/includes/class-dygpg-postgrid.php

    r2926934 r2927870  
    147147            $atts['style-fonts'] = '';
    148148        }
    149         if (version_compare($atts['version'] ?? '0.0.0', '4.4.0', '<')) {
     149        if (version_compare($atts['version'] ?? '0.0.0', '4.6.0', '<')) {
    150150            $atts['equal-content-heights'] = ($atts['equal-content-heights'] ?? '') === '' ? 'N' : $atts['equal-content-heights'];
    151151            $atts['equal-title-heights']   = ($atts['equal-title-heights'] ?? '') === '' ? 'N' : $atts['equal-title-heights'];
    152152            $atts['equal-grid-heights']    = ($atts['equal-grid-heights'] ?? '') === '' ? 'N' : $atts['equal-grid-heights'];
    153             $atts['image']                 = ($atts['image'] ?? '') === 'Y' ? '' : $atts['image'];
     153            $atts['image']                 = !in_array($atts['image'], ['B','C']) ? 'N' : $atts['image'];
    154154            unset($atts['sizes']);
    155155            unset($atts['title']);
  • agb-free/trunk/dyg-grid/js/dyg-resize.js

    r2926934 r2927870  
    88
    99function dygpgEqualiseFunctions() {
     10    aspect_ratio();
    1011    equalizeAllRowHeights();
    1112    equal_height();
    12     aspect_ratio();
    1313}
    1414//synchronises the height and width of all elements in the class
  • agb-free/trunk/dyg-theme/includes/dyg-toolkit.php

    r2926934 r2927870  
    121121}
    122122
    123 //enqueues the stylesheet with the files timestamp as the version number to force a cache load if the file changes
     123/**
     124 * Enqueue a stylesheet with the version based on the file's modification time.
     125 *
     126 * This function takes a relative URL for local stylesheets, converts it to an absolute path,
     127 * and attempts to determine the file's modification time to use as the version.
     128 * It then enqueues the stylesheet using WordPress's wp_enqueue_style() function.
     129 *
     130 * @param string $handle Name of the stylesheet.
     131 * @param string $src    URL of the stylesheet. If it is a relative URL, it should be relative to the WordPress root directory.
     132 * @param array  $deps   An array of registered stylesheet handles this stylesheet depends on.
     133 * @param bool   $ver    String specifying the stylesheet version number. If set to false, the filemtime will be used.
     134 * @param string $media  The media for which this stylesheet has been defined.
     135 */
    124136function dyg_enqueue_style($handle, $src = '', $deps = [], $ver = false, $media = 'all') {
    125137    if (str_contains($src, 'http://localhost/')) {
    126         $path = preg_replace('#https?://localhost/([^/]+)#', '', $src);
     138        $path = preg_replace('#^https?://localhost/#', '', $src);
    127139    } else {
    128140        $path = parse_url($src, PHP_URL_PATH);
     
    130142
    131143    $file = ABSPATH . $path;
    132     $ver  = filemtime($file);
     144    if (file_exists($file)) {
     145        $ver = filemtime($file);
     146    }
    133147    wp_enqueue_style($handle, $src, $deps, $ver, $media);
    134148}
     149
    135150
    136151class dyg_ajax {
  • agb-free/trunk/readme.txt

    r2926934 r2927870  
    1 # Advanced Grid Builder (AGB)
    2 Tags: post grid, content grid, grid, grid generator, accordion, image gallery, lightbox, slideshow, blog, list generator, menu generator
     1`# Advanced Grid Builder (AGB)
     2Tags: advanced grid builder, post grid, content grid, grid, grid generator, accordion, image gallery, lightbox, slideshow, blog, list generator, menu generator
    33Requires at least: 3.6
    44Contributors: AGB
    55Requires PHP: 7.4
    66Tested up to: 6.2
    7 Stable tag: 4.5.0
     7Stable tag: 4.5.1
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5959
    6060Get started quickly with our "Style Presets". These collections help you quickly achieve some of the most common configurations. The blog preset, for example, was designed specifically for your blog/news posts and includes all the usual fields you would expect to find, including hyperlinked meta fields. Check out more presets [here](https://www.advancedgridbuilder.com/presets/).
     61`
Note: See TracChangeset for help on using the changeset viewer.