Plugin Directory

Changeset 2580930


Ignore:
Timestamp:
08/10/2021 02:27:30 PM (5 years ago)
Author:
Sygnoos
Message:

Version 4.0.2 released.

Location:
popup-builder
Files:
360 added
1 deleted
9 edited

Legend:

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

    r2579444 r2580930  
    111111            switch($key) {
    112112                case 'POPUP_SOCIAL':
    113                     $version = @constant('SGPB_SOCIAL_POPUP_VERSION');
     113                    if (defined('SGPB_SOCIAL_POPUP_VERSION')) {
     114                        $version = @constant('SGPB_SOCIAL_POPUP_VERSION');
     115                    } else {
     116                        $version = @constant('SG_VERSION_'.$key);
     117                    }
    114118                    break;
    115119                case 'POPUP_AGE_VERIFICATION':
    116                     $version = @constant('SGPB_AGE_VERIFICATION_POPUP_VERSION');
     120                    if (defined('SGPB_AGE_VERIFICATION_POPUP_VERSION')) {
     121                        $version = @constant('SGPB_AGE_VERIFICATION_POPUP_VERSION');
     122                    } else{
     123                        $version = @constant('SG_VERSION_'.$key);
     124                    }
    117125                    break;
    118126                case 'POPUP_GAMIFICATION':
    119                     $version = @constant('POPUP_GAMIFICATION');
     127                    if (defined('POPUP_GAMIFICATION')) {
     128                        $version = @constant('POPUP_GAMIFICATION');
     129                    } else {
     130                        $version = @constant('SG_VERSION_'.$key);
     131                    }
    120132                    break;
    121133                default :
     
    138150    public function custom_admin_js()
    139151    {
     152        $currentPostType = AdminHelper::getCurrentPostType();
     153        if (!empty($currentPostType) && ($currentPostType == SG_POPUP_POST_TYPE || $currentPostType == SG_POPUP_AUTORESPONDER_POST_TYPE || $currentPostType == SG_POPUP_TEMPLATE_POST_TYPE)) {
    140154        ?>
    141155        <script type="text/javascript">
     
    160174        </script>
    161175        <?php
     176        }
    162177    }
    163178
  • popup-builder/trunk/com/classes/Filters.php

    r2578665 r2580930  
    343343    }
    344344
    345     public function excludeSitemapsYoast($exclude = false, $postType)
     345    public function excludeSitemapsYoast($exclude, $postType)
    346346    {
    347347        $postTypeObject = get_post_type_object($postType);
     
    864864        $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'select2.min.css', 'dep' => array(), 'ver' => SG_POPUP_VERSION, 'inFooter' => false);
    865865        $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'popupAdminStyles.css', 'dep' => array(), 'ver' => SG_POPUP_VERSION, 'inFooter' => false);
    866         $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'popupAdminStyles.css', 'dep' => array(), 'ver' => SG_POPUP_VERSION, 'inFooter' => false);
    867866        $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'newDesignFromBuild.css', 'dep' => array(), 'ver' => rand(1, 10000), 'inFooter' => false);
    868867
    869868        return $cssFiles;
    870869    }
     870
    871871}
    872872
  • popup-builder/trunk/com/classes/Javascript.php

    r2516157 r2580930  
    1313    public static function enqueueScripts($hook)
    1414    {
     15        global $wp_version;
    1516        $pageName = $hook;
    1617        $scripts = array();
     
    120121                    $localizeData['data'] = (array)$localizeData['data'];
    121122                }
    122 
    123                 ScriptsIncluder::localizeScript($localizeData['handle'], $localizeData['name'], $localizeData['data']);
     123                if (version_compare($wp_version, '4.5', '>')){
     124                    /* after wp 4.5 version */
     125                    ScriptsIncluder::addInlineScripts($localizeData['handle'], 'var '.$localizeData['name'].' = ' .json_encode($localizeData['data']) );
     126                } else {
     127                    /* since wp 4.5 version */
     128                    ScriptsIncluder::localizeScript($localizeData['handle'], $localizeData['name'], $localizeData['data']);
     129                }
    124130            }
    125131        }
  • popup-builder/trunk/com/classes/ScriptsLoader.php

    r2578665 r2580930  
    173173    {
    174174        global $post;
     175        global $wp_version;
    175176        $popups = $this->getLoadablePopups();
    176177        $registeredPlugins = AdminHelper::getOption(SGPB_POPUP_BUILDER_REGISTERED_PLUGINS);
     
    261262
    262263                    }
    263 
    264                     ScriptsIncluder::localizeScript($valueData['handle'], $valueData['name'], $valueData['data']);
     264                    if (version_compare($wp_version, '4.5', '>')){
     265                        /* after wp 4.5 version */
     266                        ScriptsIncluder::addInlineScripts($valueData['handle'], 'var '.$valueData['name'].' = ' .json_encode($valueData['data']));
     267                    } else {
     268                        /* since wp 4.5 version */
     269                        ScriptsIncluder::localizeScript($valueData['handle'], $valueData['name'], $valueData['data']);
     270                    }
     271
    265272                }
    266273            }
  • popup-builder/trunk/com/classes/extension/SgpbPopupExtension.php

    r2578665 r2580930  
    247247            $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'sgPopupRangeSlider.css', 'dep' => array(), 'ver' => rand(1, 1000), 'inFooter' => false);
    248248            $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'theme.css', 'dep' => array(), 'ver' => rand(1, 1000), 'inFooter' => false);
    249             $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'newDesignFromBuild.css', 'dep' => array(), 'ver' => rand(1, 10000), 'inFooter' => false);
    250249            $cssFiles[] = array('folderUrl' => '', 'filename' => 'wp-color-picker');
    251250        }
     
    254253            $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'popupAdminStyles.css', 'dep' => array(), 'ver' => SG_POPUP_VERSION, 'inFooter' => false);
    255254            $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'select2.min.css', 'dep' => array(), 'ver' => SG_POPUP_VERSION, 'inFooter' => false);
    256             $cssFiles[] = array('folderUrl' => SG_POPUP_CSS_URL, 'filename' => 'newDesignFromBuild.css', 'dep' => array(), 'ver' => rand(1, 10000), 'inFooter' => false);
    257255
    258256        }
     
    358356        return $cssData;
    359357    }
     358
    360359}
  • popup-builder/trunk/com/config/configPackage.php

    r2579219 r2580930  
    44}
    55
    6 define('SG_POPUP_VERSION', '4.0.1');
     6define('SG_POPUP_VERSION', '4.0.2');
    77define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
    88define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
  • popup-builder/trunk/com/helpers/ScriptsIncluder.php

    r2466445 r2580930  
    128128        wp_enqueue_script($fileName);
    129129    }
    130 
     130    /**
     131     * Popup localize scripts data
     132     *
     133     * since wp 4.5 use this method
     134     *
     135     * @param string $handle
     136     * @param string $name
     137     * @param array $data
     138     *
     139     * @return void
     140     */
    131141    public static function localizeScript($handle, $name, $data)
    132142    {
    133143        wp_localize_script($handle, $name, $data);
    134144    }
     145
     146    /**
     147     * Popup add line scripts
     148     *
     149     * after wp 4.5 use this method
     150     *
     151     * @param string $handle
     152     * @param string $data
     153     * @param string $before
     154     *
     155     * @return void
     156     */
     157    public static function addInlineScripts($handle, $data, $before = 'before')
     158    {
     159        wp_add_inline_script($handle, $data, $before);
     160    }
    135161}
  • popup-builder/trunk/popup-builder.php

    r2579219 r2580930  
    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.0.1
     6* Version: 4.0.2
    77* Author: Sygnoos
    88* Author URI: https://sygnoos.com
  • popup-builder/trunk/readme.txt

    r2579219 r2580930  
    99Tested up to: 5.8
    1010Requires PHP: 5.3.3
    11 Stable tag: 4.0.1
     11Stable tag: 4.0.2
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    146146== Changelog ==
    147147
     148= Version 4.0.2 =
     149* Bug fixed related to PHP notices, localize was called incorrectly.
     150* Bug fixed related to errors with PHP 8 version.
     151* Bug fixed related to CSS and JS files in order to improve website loading.
     152
    148153= Version 4.0.1 =
    149154* Bug fixed related to issue with PHP version below 7.0
     
    467472== Upgrade Notice ==
    468473
    469 Current Version of Popup Builder is 4.0
     474Current Version of Popup Builder is 4.0.2
Note: See TracChangeset for help on using the changeset viewer.