Plugin Directory

Changeset 2721110


Ignore:
Timestamp:
05/10/2022 09:40:38 AM (4 years ago)
Author:
Sygnoos
Message:

New version 4.1.7 released

Location:
popup-builder
Files:
359 added
17 edited

Legend:

Unmodified
Added
Removed
  • popup-builder/trunk/com/classes/Actions.php

    r2698835 r2721110  
    6565        add_filter('views_edit-popupbuilder', array($this, 'mainActionButtons'), 10, 1);
    6666        add_action('wpml_loaded', array($this, 'wpmlRelatedActions'));
     67        add_action('the_post', array($this, 'postExcludeFromPopupsList'));
    6768
    6869        add_filter('get_user_option_screen_layout_'.SG_POPUP_POST_TYPE, array($this, 'screenLayoutSetOneColumn'));
     
    498499        if (empty($this->mediaButton)) {
    499500            $this->mediaButton = true;
    500             add_action('admin_footer', function() {
     501            $currentPostType = AdminHelper::getCurrentPostType();
     502            add_action('admin_footer', function() use ($currentPostType) {
    501503                self::enqueueScriptsForPageBuilders();
    502                 echo wp_kses(new MediaButton(false), AdminHelper::allowed_html_tags());
     504                if (!empty($currentPostType) && $currentPostType == SG_POPUP_POST_TYPE) {
     505                    require_once(SG_POPUP_VIEWS_PATH.'htmlCustomButtonElement.php');
     506                }
    503507            });
    504508        }
     
    14841488        wp_redirect(admin_url().'edit.php?post_type='.SG_POPUP_POST_TYPE.'&page='.SG_POPUP_SETTINGS_PAGE);
    14851489    }
     1490
     1491    /*
     1492     * this method will add a filter to exclude the current post from popup list
     1493     * which have a post_type=popupbuilder and it is on post edit page
     1494     * */
     1495    public function postExcludeFromPopupsList(){
     1496        global $pagenow;
     1497        if ( isset($pagenow) && $pagenow === 'post.php') {
     1498            if (get_post_type() === SG_POPUP_POST_TYPE){
     1499                add_filter('sgpb_exclude_from_popups_list', function($excludedPopups) {
     1500                    array_push($excludedPopups, get_the_ID());
     1501                    return $excludedPopups;
     1502                });
     1503            }
     1504        }
     1505    }
    14861506}
  • popup-builder/trunk/com/classes/ConditionCreator.php

    r2704875 r2721110  
    584584                        <?php if (!empty($hiddenOptionsView)): ?>
    585585                            <div class="col-md-4">
    586                                 <?php echo wp_kses($hiddenOptionsView, 'post'); ?>
     586                                <?php echo wp_kses($hiddenOptionsView, AdminHelper::allowed_html_tags()); ?>
    587587                            </div>
    588588                        <?php endif; ?>
  • popup-builder/trunk/com/classes/Filters.php

    r2698835 r2721110  
    769769            $content = do_blocks($content);
    770770        }
     771        // check if inside the popup included the same popup! this will prevent from the infinite loop of nested popups doing shortcode
     772        preg_match_all('/\[sg_popup.*?id="'.$popupId.'".*?\[\/sg_popup\]/', $content, $matches1);
     773        if (has_shortcode( $content, 'sg_popup' ) && (!empty($matches1) &&!empty($matches1[0]))){
     774            return $content;
     775        }
    771776
    772777        return do_shortcode($content);
  • popup-builder/trunk/com/classes/components/Menu.php

    r2686454 r2721110  
    4949    public function addPopupTriggeringClass($classes, $menuItem)
    5050    {
     51        if (!isset($menuItem->sgpbPopupId)) {
     52            return $classes;
     53        }
    5154        $popupId = $menuItem->sgpbPopupId;
    5255        if ($popupId && !in_array('sg-popup-id-'.$popupId, $classes)) {
  • popup-builder/trunk/com/classes/dataTable/Subscribers.php

    r2686454 r2721110  
    162162            }
    163163            if (empty($subscribersDates)) {
    164                 $gotDateList = '<option value="'.@$date['date-value'].'"'.$selected.'>'.__('Date', SG_POPUP_TEXT_DOMAIN).'</option>';
     164                $dateValue = isset($date) && isset($date['date-value']) ? $date['date-value'] : '';
     165                $gotDateList = '<option value="'.$dateValue.'"'.$selected.'>'.__('Date', SG_POPUP_TEXT_DOMAIN).'</option>';
    165166            }
    166167            echo wp_kses($dateList.$gotDateList, $allowed_html);
  • popup-builder/trunk/com/config/configPackage.php

    r2712631 r2721110  
    44}
    55
    6 define('SG_POPUP_VERSION', '4.1.6');
     6define('SG_POPUP_VERSION', '4.1.7');
    77define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
    88define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
  • popup-builder/trunk/com/helpers/AdminHelper.php

    r2695255 r2721110  
    172172        $attrString = '';
    173173        $savedData = $data;
    174 
    175         if (isset($selectedValue)) {
     174        if (isset($selectedValue) && $selectedValue !== '') {
    176175            $savedData = $selectedValue;
    177176        }
     
    12461245        $allPopups = SGPopup::getAllPopups();
    12471246        $popupIdTitles = array();
     1247        $excludesPopups = apply_filters('sgpb_exclude_from_popups_list', $excludesPopups);
    12481248
    12491249        if (empty($allPopups)) {
  • popup-builder/trunk/com/helpers/ConfigDataHelper.php

    r2704875 r2721110  
    607607
    608608        $data['weekDaysArray'] = array(
    609             'Mon' => __('Monday', SG_POPUP_TEXT_DOMAIN),
    610             'Tue' => __('Tuesday', SG_POPUP_TEXT_DOMAIN),
    611             'Wed' => __('Wednesday', SG_POPUP_TEXT_DOMAIN),
    612             'Thu' => __('Thursday', SG_POPUP_TEXT_DOMAIN),
    613             'Fri' => __('Friday', SG_POPUP_TEXT_DOMAIN),
    614             'Sat' => __('Saturday', SG_POPUP_TEXT_DOMAIN),
    615             'Sun' => __('Sunday', SG_POPUP_TEXT_DOMAIN)
     609            'Mon' => __('Monday'),
     610            'Tue' => __('Tuesday'),
     611            'Wed' => __('Wednesday'),
     612            'Thu' => __('Thursday'),
     613            'Fri' => __('Friday'),
     614            'Sat' => __('Saturday'),
     615            'Sun' => __('Sunday')
    616616        );
    617617
     
    12351235        $translatedData = array(
    12361236            'imageSupportAlertMessage' => __('Only image files supported', SG_POPUP_TEXT_DOMAIN),
     1237            'pdfSupportAlertMessage' => __('Only pdf files supported', SG_POPUP_TEXT_DOMAIN),
    12371238            'areYouSure' => __('Are you sure?', SG_POPUP_TEXT_DOMAIN),
    12381239            'addButtonSpinner' => __('L', SG_POPUP_TEXT_DOMAIN),
  • popup-builder/trunk/com/libs/Table.php

    r2686454 r2721110  
    121121            $query .= ' ORDER BY '.$orderby.' '.$order;
    122122        }
    123 
    124         $paged = isset($_GET["paged"]) ? (int)sanitize_text_field($_GET["paged"]) : '';
    125 
    126         if (empty($paged) || !is_numeric($paged) || $paged <= 0) {
    127             $paged = 1;
    128         }
    129 
    130         //adjust the query to take pagination into account
    131         if (!empty($paged) && !empty($perPage)) {
    132             $offset = ($paged - 1) * $perPage;
    133             $query .= ' LIMIT '.(int)$offset.','.(int)$perPage;
    134         }
    135 
    136123        $this->set_pagination_args(array(
    137124            "total_items" => $totalItems,
     
    139126            "per_page" => $perPage,
    140127        ));
     128        $paged = $this->get_pagenum();
     129
     130        if (empty($paged) || !is_numeric($paged) || $paged <= 0) {
     131            $paged = 1;
     132        }
     133
     134        //adjust the query to take pagination into account
     135        if (!empty($paged) && !empty($perPage)) {
     136            $offset = ($paged - 1) * $perPage;
     137            $query .= ' LIMIT '.(int)$offset.','.(int)$perPage;
     138        }
    141139
    142140        $columns = $this->get_columns();
  • popup-builder/trunk/popup-builder.php

    r2712631 r2721110  
    44* Plugin URI: https://popup-builder.com
    55* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
    6 * Version: 4.1.6
     6* Version: 4.1.7
    77* Author: Sygnoos
    88* Author URI: https://sygnoos.com
  • popup-builder/trunk/public/css/ResetFormStyle.css

    r2584791 r2721110  
    1515.sgpb-form-wrapper input[type="button"]{max-width:100% !important;padding:0
    161610px !important;box-sizing:border-box;font-size:14px !important;box-shadow:none !important;margin:5px
    17 auto !important;display:inline-block !important;font-weight:bold !important;background-image:none !important;line-height:normal !important}.sgpb-form-wrapper input[type="submit"],
     17auto;display:inline-block !important;font-weight:bold !important;background-image:none !important;line-height:normal !important}.sgpb-form-wrapper input[type="submit"],
    1818.sgpb-form-wrapper input[type="button"]{line-height:0.4 !important;font-size:18px !important}.sgpb-js-hide{display:none}
  • popup-builder/trunk/public/css/SubscriptionForm.css

    r2578665 r2721110  
    44solid #ccc;margin-bottom:10px;width:100%;box-sizing:border-box;font-family:Arial;color:#2C3E50;font-size:13px}.sgpb-form-wrapper .sgpb-field-textarea-wrapper,
    55.sgpb-form-wrapper .sgpb-field-dropdown-wrapper{margin:5px
    6 auto !important}.sgpb-form-wrapper input[type="submit"],
     6auto}.sgpb-form-wrapper input[type="submit"],
    77.sgpb-form-wrapper input[type="button"]{cursor:pointer}.sgpb-form-wrapper input[type="submit"]:hover{filter:brightness(90%);-ms-filter:brightness(90%)}.sgpb-form-wrapper{text-align:center}.sgpb-subscription-form
    88label.error{text-align:inherit;color:red;display:block;margin:5px
  • popup-builder/trunk/public/js/Backend.js

    r2712631 r2721110  
    1515{var that=this;jQuery(document).on('tinymce-editor-setup',function(event,editor){if('sgpb-newsletter-text'===editor.settings.id){return;}
    1616if(editor.settings.toolbar1.indexOf('popupBuilderHtmlButton')!==-1){return;}
    17 editor.settings.toolbar1+=', popupBuilderHtmlButton';editor.addButton('popupBuilderHtmlButton',{text:'Popup Builder Button',tooltip:'Popup Builder Custom HTML Button',icon:'wp-menu-image dashicons-before dashicons-menu-icon-sgpb-button',onclick:function(){that.mediaButtonPopup('sgpb-custom-button-wrapper');}});});};SGPBBackend.popups=[];SGPBBackend.prototype.mediaButtonPopup=function(hiddenDivId)
     17editor.settings.toolbar1+=', popupBuilderHtmlButton';editor.addButton('popupBuilderHtmlButton',{text:'Popup Builder Button',tooltip:'Popup Builder Custom HTML Button',image:sgpbPublicUrl+'img/sgpbLogo.png',onclick:function(){that.mediaButtonPopup('sgpb-custom-button-wrapper');}});});};SGPBBackend.popups=[];SGPBBackend.prototype.mediaButtonPopup=function(hiddenDivId)
    1818{var select2Init=1;var that=this;var popupConfigObj=new PopupConfig();popupConfigObj.magicCall('setContentPadding',14);popupConfigObj.magicCall('setContentBorderRadius',4);popupConfigObj.magicCall('setContentBorderRadiusType','px');popupConfigObj.magicCall('setScrollingEnabled',true);popupConfigObj.magicCall('setContentBorderWidth',5);popupConfigObj.magicCall('setContentBorderColor','#506274');popupConfigObj.magicCall('setShadowSpread',1);popupConfigObj.magicCall('setContentShadowBlur',4);popupConfigObj.magicCall('setContentShadowColor','#cccccc');popupConfigObj.magicCall('setMinWidth',400);popupConfigObj.magicCall('contents',document.getElementById(hiddenDivId));popupConfigObj.magicCall('setOverlayColor','black');popupConfigObj.magicCall('setOverlayOpacity',40);var config=popupConfigObj.combineConfigObj();var popup=new SGPopup(config);if(!SGPBBackend.popups.length){SGPBBackend.popups.push(popup);}
    1919SGPBBackend.popups[0].open();jQuery(window).bind('sgpbDidOpen',function(){jQuery('.sgpb-insert-popup').addClass('js-sg-select2');if(select2Init===1){that.popupSelect2();}
  • popup-builder/trunk/public/js/DebugReport.js

    r2688779 r2721110  
    4040                }
    4141                if (i == 'options') {
    42                     // all other options here
     42                    /*all other options here*/
    4343                    for (var option in paramName[x]) {
    4444                        console.log('%c '+option+ ' - ' + paramName[x][option], 'background: #eeeeee; color: #000000');
  • popup-builder/trunk/public/js/MediaButton.js

    r2712631 r2721110  
    11function SGPBMediaButton(){}
    22SGPBMediaButton.prototype.init=function()
    3 {this.tinymceButton();this.openMediaButtonPopup();};SGPBMediaButton.prototype.tinymceButton=function()
     3{this.openMediaButtonPopup();};SGPBMediaButton.prototype.tinymceButton=function()
    44{var that=this;jQuery(document).on('tinymce-editor-setup',function(event,editor){if('sgpb-newsletter-text'===editor.settings.id){return;}
    55if(editor.settings.toolbar1.indexOf('popupBuilderEditorButton')!==-1){return;}
  • popup-builder/trunk/public/js/Modals.js

    r2578665 r2721110  
    132132};
    133133
    134 // this action is to pass already opened modal new content for each part of source code
     134/*this action is to pass already opened modal new content for each part of source code*/
    135135SGPBModals.prototype.changeModalContentAdvanced = function (modal, header = '', body = '', confirmBtn = '', oldTargetId, newTargetId)
    136136{
  • popup-builder/trunk/readme.txt

    r2712631 r2721110  
    99Tested up to: 5.9
    1010Requires PHP: 5.3.3
    11 Stable tag: 4.1.6
     11Stable tag: 4.1.7
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    147147== Changelog ==
    148148
     149= Version 4.1.7 =
     150* Improvement of Popup Builder button: the button has been added in Gutenberg editor
     151* Bug fixed related to typo related to translating menu items
     152* Bug fixed related to 502 error when popup is inserted with its shortcode in the same popup
     153* Bug fixed related to conflict with UberMenu plugin
     154* Bug fixed related to PHP errors in "All Subscribers" page
     155
    149156= Version 4.1.6 =
    150157* Bug fixed related to draft popups that were not visible in trash
     
    531538== Upgrade Notice ==
    532539
    533 Current Version of Popup Builder is 4.1.6
     540Current Version of Popup Builder is 4.1.7
Note: See TracChangeset for help on using the changeset viewer.