Plugin Directory

Changeset 2848657


Ignore:
Timestamp:
01/15/2023 01:06:39 PM (3 years ago)
Author:
_smartik_
Message:

Release 3.5.0

Location:
smk-sidebar-generator
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • smk-sidebar-generator/tags/3.5.0/abstract.php

    r2500393 r2848657  
    44 *
    55 * -------------------------------------------------------------------------------------
    6  * @Author:     Andrew Surdu
     6 * @Author:     Andrei Surdu
    77 * @Author URI: https://zerowp.com/
    8  * @Copyright:  (c) 2014 Andrew Surdu. All rights reserved
     8 * @Copyright:  (c) 2014 Andrei Surdu. All rights reserved
    99 * -------------------------------------------------------------------------------------
    1010 *
     
    1919    abstract class Smk_Sidebar_Generator_Abstract {
    2020
    21         //------------------------------------//--------------------------------------//
    22        
    2321        /**
    2422         * Plugin version
     
    3028        protected $version;
    3129
    32         //------------------------------------//--------------------------------------//
    33        
    3430        /**
    3531         * Html helpers
     
    4137        protected $html;
    4238
    43         //------------------------------------//--------------------------------------//
    44        
    4539        public function __construct(){
    4640            $this->version = smk_sidebar_version();
     
    4842        }
    4943
    50         //------------------------------------//--------------------------------------//
    51        
    5244        /**
    5345         * Plugin Settings
     
    5547         * Inner plugin settings.
    5648         *
    57          * @return array
     49         * @return array | string
    5850         */
    5951        abstract protected function pluginSettings();
    6052
    61         //------------------------------------//--------------------------------------//
    62        
    6353        /**
    6454         * Page
     
    7060        abstract public function page();
    7161
    72         //------------------------------------//--------------------------------------//
    73        
    7462        /**
    7563         * Init the object
     
    9179        }
    9280
    93         //------------------------------------//--------------------------------------//
    94        
    9581        /**
    9682         * Add to init object
     
    10288        public function setup(){}
    10389
    104         //------------------------------------//--------------------------------------//
    105        
    10690        /**
    10791         * Register setting
     
    117101        }
    118102
    119         //------------------------------------//--------------------------------------//
    120        
    121103        /**
    122104         * Sanitize data
     
    146128        // }
    147129
    148         //------------------------------------//--------------------------------------//
    149        
    150130        /**
    151131         * Sidebar Widgets
     
    159139        }
    160140
    161         //------------------------------------//--------------------------------------//
    162        
    163141        /**
    164142         * All saved widgets types
     
    180158        }
    181159
    182         //------------------------------------//--------------------------------------//
    183        
    184160        /**
    185161         * Widgets Options
     
    197173        }
    198174
    199         //------------------------------------//--------------------------------------//
    200        
    201175        /**
    202176         * All registered sidebars
     
    221195        }
    222196
    223         //------------------------------------//--------------------------------------//
    224        
    225197        /**
    226198         * All generated sidebars
     
    240212        }
    241213
    242         //------------------------------------//--------------------------------------//
    243        
    244214        /**
    245215         * Register sidebars
     
    281251        }
    282252
    283         //------------------------------------//--------------------------------------//
    284        
    285253        /**
    286254         * All static sidebars
     
    302270        }
    303271
    304         //------------------------------------//--------------------------------------//
    305        
    306272        /**
    307273         * Menu
     
    326292        }
    327293
    328         //------------------------------------//--------------------------------------//
    329        
    330294        /**
    331295         * Enqueue
     
    347311        }
    348312
    349         //------------------------------------//--------------------------------------//
    350        
    351313        /**
    352314         * Is plugin page
     
    358320        public function isPluginPage(){
    359321            $settings = $this->pluginSettings();
    360             return isset( $_GET['page'] ) && $_GET['page'] == $settings['slug'] ? true : false;
     322            return isset( $_GET['page'] ) && $_GET['page'] == $settings['slug'];
    361323        }
    362324 
     
    441403            }
    442404        }
    443 
    444         //------------------------------------//--------------------------------------//
    445 
    446         /**
    447          * Debug
    448          *
    449          * Debud saved data
    450          *
    451          * @param array $data The data to debug.
    452          * @return string
    453          */
    454         public function debug($data = array(), $title = ''){
    455             if( is_array($data) ){
    456                 array_walk_recursive( $data, array( $this, 'debugFilter' ) );
    457             }
    458             if( !empty($title) ){
    459                 echo '<h3>'. $title .'</h3>';
    460             }
    461             echo '<pre>';
    462                 print_r($data);
    463             echo '</pre>';
    464         }
    465 
    466         //------------------------------------//--------------------------------------//
    467 
    468         /**
    469          * Debug filter
    470          *
    471          * Debud filter special characters.
    472          *
    473          * @param array $data The data to filter.
    474          * @return array
    475          */
    476         public function debugFilter(&$data){
    477             $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
    478         }
    479 
    480405    } // class
    481406} // class_exists
  • smk-sidebar-generator/tags/3.5.0/assets/scripts.js

    r2168468 r2848657  
    11/*
    2 * @Author: Andrew Surdu
     2* @Author: Andrei Surdu
    33* @Date:   2014-03-12 21:17:04
    4 * @Last Modified by:   Andrew Surdu
     4* @Last Modified by:   Andrei Surdu
    55* @Last Modified time: 2014-07-16 21:09:21
    66*/
  • smk-sidebar-generator/tags/3.5.0/assets/styles.css

    r2168468 r2848657  
    11/*
    2 * @Author: Andrew Surdu
     2* @Author: Andrei Surdu
    33* @Date:   2014-03-12 21:17:04
    4 * @Last Modified by:   Andrew Surdu
     4* @Last Modified by:   Andrei Surdu
    55* @Last Modified time: 2014-07-16 21:09:29
    66*/
  • smk-sidebar-generator/tags/3.5.0/html.php

    r2500393 r2848657  
    66 *
    77 * -------------------------------------------------------------------------------------
    8  * @Author: Andrew Surdu
     8 * @Author: Andrei Surdu
    99 * @Author URI: https://zerowp.com/
    10  * @Copyright: (c) 2014 Andrew Surdu. All rights reserved
     10 * @Copyright: (c) 2014 Andrei Surdu. All rights reserved
    1111 * -------------------------------------------------------------------------------------
    1212 *
  • smk-sidebar-generator/tags/3.5.0/readme.txt

    r2500393 r2848657  
    33Tags: sidebar, widget, generator, custom, unlimited
    44Requires at least: 4.0
    5 Tested up to: 5.7
    6 Stable tag: 3.4.3
     5Tested up to: 6.2
     6Stable tag: 3.5.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313This plugin generates as many sidebars as you need. Then allows you to place them on any page you wish.
    1414
    15 
    16 <!--**Demo video:** http://youtu.be/fluNdMnSCKA-->
    17 
    18 <!--iframe width="560" height="315" src="https://plugins.trac.wordpress.org//www.youtube.com/embed/fluNdMnSCKA" frameborder="0" allowfullscreen></iframe-->
     15https://www.youtube.com/watch?v=VvKjYLDu_W0
    1916
    2017####Features:
     
    2522
    2623####How to install this plugin?
    27 Like any other Wordpress plugin. <br />
     24Like any other WordPress plugin. <br />
    2825Drop `smk-sidebar-generator` to `wp-content/plugins/`.<br />
    2926More info here: http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
     
    6259
    6360== Changelog ==
     61
     62= 3.5.0 =
     63* PHP 8+ Compatibility
     64* Various code improvements
    6465
    6566= 3.4.3 =
  • smk-sidebar-generator/tags/3.5.0/render.php

    r2500393 r2848657  
    44 *
    55 * -------------------------------------------------------------------------------------
    6  * @Author: Andrew Surdu
     6 * @Author: Andrei Surdu
    77 * @Author URI: https://zerowp.com/
    8  * @Copyright: (c) 2014 Andrew Surdu. All rights reserved
     8 * @Copyright: (c) 2014 Andrei Surdu. All rights reserved
    99 * -------------------------------------------------------------------------------------
    1010 *
     
    2323        }
    2424
    25         //------------------------------------//--------------------------------------//
    26        
    2725        /**
    2826         * Plugin Settings
     
    3028         * Inner plugin settings.
    3129         *
    32          * @return array
     30         * @return array | string
    3331         */
    3432        protected function pluginSettings( $key = '' ){
     
    5149        }
    5250
    53         //------------------------------------//--------------------------------------//
    54        
    5551        /**
    5652         * Page
     
    9591        }
    9692
    97         //------------------------------------//--------------------------------------//
    98        
    9993        /**
    10094         * Page Open
     
    118112        }
    119113
    120         //------------------------------------//--------------------------------------//
    121        
    122114        /**
    123115         * Page Close
     
    135127        }
    136128
    137         //------------------------------------//--------------------------------------//
    138        
    139129        /**
    140130         * All sidebars list
     
    158148        }
    159149
    160         //------------------------------------//--------------------------------------//
    161        
    162150        /**
    163151         * A single sidebar list
     
    226214        }
    227215
    228         //------------------------------------//--------------------------------------//
    229        
    230216        /**
    231217         * Sidebar Accordion
     
    266252        }
    267253
    268         //------------------------------------//--------------------------------------//
    269        
    270254        /**
    271255         * A single condition
     
    291275        }
    292276
    293         //------------------------------------//--------------------------------------//
    294        
    295277        /**
    296278         * Sidebar field name
     
    317299        }
    318300
    319         //------------------------------------//--------------------------------------//
    320        
    321301        /**
    322302         * Sidebar field ID
     
    343323        }
    344324
    345         //------------------------------------//--------------------------------------//
    346        
    347325        /**
    348326         * Sidebar field description
     
    369347        }
    370348
    371         //------------------------------------//--------------------------------------//
    372        
    373349        /**
    374350         * Sidebar field To Replace
     
    412388        }
    413389
    414         //------------------------------------//--------------------------------------//
    415        
    416390        /**
    417391         * Sidebar field Condition main
     
    454428        }
    455429
    456         //------------------------------------//--------------------------------------//
    457        
    458430        /**
    459431         * Sidebar field Condition EqualTo
     
    462434         *
    463435         * @param string $name HTML field name
    464          * @param string $sidebar_data Data for current sidebar
    465          * @return string The HTML
    466          */
    467         public function fieldConditionEqualTo($name, $sidebar_data, $index = 0, $type){
     436         * @param array $sidebar_data Data for current sidebar
     437         * @return string The HTML
     438         */
     439        public function fieldConditionEqualTo($name, $sidebar_data, $index = 0, $type = null){
    468440
    469441            $saved = ! empty( $sidebar_data['conditions'][ absint( $index ) ]['equalto'] ) ? $sidebar_data['conditions'][ absint( $index ) ]['equalto'] : '';
     
    483455        }
    484456
    485         //------------------------------------//--------------------------------------//
    486        
    487457        /**
    488458         * Get Equal to Options
     
    513483
    514484        public function equaltoAjax(){ 
    515             $data = $_POST['data'];
     485            $data = wp_unslash($_POST['data']);
    516486            $type = $data['condition_if'];
    517487            $opt = $this->getEqualToOptions($type);
     
    522492        }
    523493
    524         //------------------------------------//--------------------------------------//
    525        
    526494        /**
    527495         * All removed sidebars list
     
    544512        }
    545513
    546         //------------------------------------//--------------------------------------//
    547        
    548514        /**
    549515         * Sidebar Template
  • smk-sidebar-generator/tags/3.5.0/smk-sidebar-generator.php

    r2500393 r2848657  
    44 * Plugin URI:  https://zerowp.com/sidebar-generator
    55 * Description: Generate an unlimited number of sidebars and assign them to any page using the conditional options without touching a single line of code.
    6  * Author:      Andrew Surdu
     6 * Author:      Andrei Surdu
    77 * Version:     3.4.3
    88 * Author URI:  https://zerowp.com
  • smk-sidebar-generator/trunk/abstract.php

    r2500393 r2848657  
    44 *
    55 * -------------------------------------------------------------------------------------
    6  * @Author:     Andrew Surdu
     6 * @Author:     Andrei Surdu
    77 * @Author URI: https://zerowp.com/
    8  * @Copyright:  (c) 2014 Andrew Surdu. All rights reserved
     8 * @Copyright:  (c) 2014 Andrei Surdu. All rights reserved
    99 * -------------------------------------------------------------------------------------
    1010 *
     
    1919    abstract class Smk_Sidebar_Generator_Abstract {
    2020
    21         //------------------------------------//--------------------------------------//
    22        
    2321        /**
    2422         * Plugin version
     
    3028        protected $version;
    3129
    32         //------------------------------------//--------------------------------------//
    33        
    3430        /**
    3531         * Html helpers
     
    4137        protected $html;
    4238
    43         //------------------------------------//--------------------------------------//
    44        
    4539        public function __construct(){
    4640            $this->version = smk_sidebar_version();
     
    4842        }
    4943
    50         //------------------------------------//--------------------------------------//
    51        
    5244        /**
    5345         * Plugin Settings
     
    5547         * Inner plugin settings.
    5648         *
    57          * @return array
     49         * @return array | string
    5850         */
    5951        abstract protected function pluginSettings();
    6052
    61         //------------------------------------//--------------------------------------//
    62        
    6353        /**
    6454         * Page
     
    7060        abstract public function page();
    7161
    72         //------------------------------------//--------------------------------------//
    73        
    7462        /**
    7563         * Init the object
     
    9179        }
    9280
    93         //------------------------------------//--------------------------------------//
    94        
    9581        /**
    9682         * Add to init object
     
    10288        public function setup(){}
    10389
    104         //------------------------------------//--------------------------------------//
    105        
    10690        /**
    10791         * Register setting
     
    117101        }
    118102
    119         //------------------------------------//--------------------------------------//
    120        
    121103        /**
    122104         * Sanitize data
     
    146128        // }
    147129
    148         //------------------------------------//--------------------------------------//
    149        
    150130        /**
    151131         * Sidebar Widgets
     
    159139        }
    160140
    161         //------------------------------------//--------------------------------------//
    162        
    163141        /**
    164142         * All saved widgets types
     
    180158        }
    181159
    182         //------------------------------------//--------------------------------------//
    183        
    184160        /**
    185161         * Widgets Options
     
    197173        }
    198174
    199         //------------------------------------//--------------------------------------//
    200        
    201175        /**
    202176         * All registered sidebars
     
    221195        }
    222196
    223         //------------------------------------//--------------------------------------//
    224        
    225197        /**
    226198         * All generated sidebars
     
    240212        }
    241213
    242         //------------------------------------//--------------------------------------//
    243        
    244214        /**
    245215         * Register sidebars
     
    281251        }
    282252
    283         //------------------------------------//--------------------------------------//
    284        
    285253        /**
    286254         * All static sidebars
     
    302270        }
    303271
    304         //------------------------------------//--------------------------------------//
    305        
    306272        /**
    307273         * Menu
     
    326292        }
    327293
    328         //------------------------------------//--------------------------------------//
    329        
    330294        /**
    331295         * Enqueue
     
    347311        }
    348312
    349         //------------------------------------//--------------------------------------//
    350        
    351313        /**
    352314         * Is plugin page
     
    358320        public function isPluginPage(){
    359321            $settings = $this->pluginSettings();
    360             return isset( $_GET['page'] ) && $_GET['page'] == $settings['slug'] ? true : false;
     322            return isset( $_GET['page'] ) && $_GET['page'] == $settings['slug'];
    361323        }
    362324 
     
    441403            }
    442404        }
    443 
    444         //------------------------------------//--------------------------------------//
    445 
    446         /**
    447          * Debug
    448          *
    449          * Debud saved data
    450          *
    451          * @param array $data The data to debug.
    452          * @return string
    453          */
    454         public function debug($data = array(), $title = ''){
    455             if( is_array($data) ){
    456                 array_walk_recursive( $data, array( $this, 'debugFilter' ) );
    457             }
    458             if( !empty($title) ){
    459                 echo '<h3>'. $title .'</h3>';
    460             }
    461             echo '<pre>';
    462                 print_r($data);
    463             echo '</pre>';
    464         }
    465 
    466         //------------------------------------//--------------------------------------//
    467 
    468         /**
    469          * Debug filter
    470          *
    471          * Debud filter special characters.
    472          *
    473          * @param array $data The data to filter.
    474          * @return array
    475          */
    476         public function debugFilter(&$data){
    477             $data = htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
    478         }
    479 
    480405    } // class
    481406} // class_exists
  • smk-sidebar-generator/trunk/assets/scripts.js

    r2168468 r2848657  
    11/*
    2 * @Author: Andrew Surdu
     2* @Author: Andrei Surdu
    33* @Date:   2014-03-12 21:17:04
    4 * @Last Modified by:   Andrew Surdu
     4* @Last Modified by:   Andrei Surdu
    55* @Last Modified time: 2014-07-16 21:09:21
    66*/
  • smk-sidebar-generator/trunk/assets/styles.css

    r2168468 r2848657  
    11/*
    2 * @Author: Andrew Surdu
     2* @Author: Andrei Surdu
    33* @Date:   2014-03-12 21:17:04
    4 * @Last Modified by:   Andrew Surdu
     4* @Last Modified by:   Andrei Surdu
    55* @Last Modified time: 2014-07-16 21:09:29
    66*/
  • smk-sidebar-generator/trunk/html.php

    r2500393 r2848657  
    66 *
    77 * -------------------------------------------------------------------------------------
    8  * @Author: Andrew Surdu
     8 * @Author: Andrei Surdu
    99 * @Author URI: https://zerowp.com/
    10  * @Copyright: (c) 2014 Andrew Surdu. All rights reserved
     10 * @Copyright: (c) 2014 Andrei Surdu. All rights reserved
    1111 * -------------------------------------------------------------------------------------
    1212 *
  • smk-sidebar-generator/trunk/readme.txt

    r2500393 r2848657  
    33Tags: sidebar, widget, generator, custom, unlimited
    44Requires at least: 4.0
    5 Tested up to: 5.7
    6 Stable tag: 3.4.3
     5Tested up to: 6.2
     6Stable tag: 3.5.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313This plugin generates as many sidebars as you need. Then allows you to place them on any page you wish.
    1414
    15 
    16 <!--**Demo video:** http://youtu.be/fluNdMnSCKA-->
    17 
    18 <!--iframe width="560" height="315" src="https://plugins.trac.wordpress.org//www.youtube.com/embed/fluNdMnSCKA" frameborder="0" allowfullscreen></iframe-->
     15https://www.youtube.com/watch?v=VvKjYLDu_W0
    1916
    2017####Features:
     
    2522
    2623####How to install this plugin?
    27 Like any other Wordpress plugin. <br />
     24Like any other WordPress plugin. <br />
    2825Drop `smk-sidebar-generator` to `wp-content/plugins/`.<br />
    2926More info here: http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
     
    6259
    6360== Changelog ==
     61
     62= 3.5.0 =
     63* PHP 8+ Compatibility
     64* Various code improvements
    6465
    6566= 3.4.3 =
  • smk-sidebar-generator/trunk/render.php

    r2500393 r2848657  
    44 *
    55 * -------------------------------------------------------------------------------------
    6  * @Author: Andrew Surdu
     6 * @Author: Andrei Surdu
    77 * @Author URI: https://zerowp.com/
    8  * @Copyright: (c) 2014 Andrew Surdu. All rights reserved
     8 * @Copyright: (c) 2014 Andrei Surdu. All rights reserved
    99 * -------------------------------------------------------------------------------------
    1010 *
     
    2323        }
    2424
    25         //------------------------------------//--------------------------------------//
    26        
    2725        /**
    2826         * Plugin Settings
     
    3028         * Inner plugin settings.
    3129         *
    32          * @return array
     30         * @return array | string
    3331         */
    3432        protected function pluginSettings( $key = '' ){
     
    5149        }
    5250
    53         //------------------------------------//--------------------------------------//
    54        
    5551        /**
    5652         * Page
     
    9591        }
    9692
    97         //------------------------------------//--------------------------------------//
    98        
    9993        /**
    10094         * Page Open
     
    118112        }
    119113
    120         //------------------------------------//--------------------------------------//
    121        
    122114        /**
    123115         * Page Close
     
    135127        }
    136128
    137         //------------------------------------//--------------------------------------//
    138        
    139129        /**
    140130         * All sidebars list
     
    158148        }
    159149
    160         //------------------------------------//--------------------------------------//
    161        
    162150        /**
    163151         * A single sidebar list
     
    226214        }
    227215
    228         //------------------------------------//--------------------------------------//
    229        
    230216        /**
    231217         * Sidebar Accordion
     
    266252        }
    267253
    268         //------------------------------------//--------------------------------------//
    269        
    270254        /**
    271255         * A single condition
     
    291275        }
    292276
    293         //------------------------------------//--------------------------------------//
    294        
    295277        /**
    296278         * Sidebar field name
     
    317299        }
    318300
    319         //------------------------------------//--------------------------------------//
    320        
    321301        /**
    322302         * Sidebar field ID
     
    343323        }
    344324
    345         //------------------------------------//--------------------------------------//
    346        
    347325        /**
    348326         * Sidebar field description
     
    369347        }
    370348
    371         //------------------------------------//--------------------------------------//
    372        
    373349        /**
    374350         * Sidebar field To Replace
     
    412388        }
    413389
    414         //------------------------------------//--------------------------------------//
    415        
    416390        /**
    417391         * Sidebar field Condition main
     
    454428        }
    455429
    456         //------------------------------------//--------------------------------------//
    457        
    458430        /**
    459431         * Sidebar field Condition EqualTo
     
    462434         *
    463435         * @param string $name HTML field name
    464          * @param string $sidebar_data Data for current sidebar
    465          * @return string The HTML
    466          */
    467         public function fieldConditionEqualTo($name, $sidebar_data, $index = 0, $type){
     436         * @param array $sidebar_data Data for current sidebar
     437         * @return string The HTML
     438         */
     439        public function fieldConditionEqualTo($name, $sidebar_data, $index = 0, $type = null){
    468440
    469441            $saved = ! empty( $sidebar_data['conditions'][ absint( $index ) ]['equalto'] ) ? $sidebar_data['conditions'][ absint( $index ) ]['equalto'] : '';
     
    483455        }
    484456
    485         //------------------------------------//--------------------------------------//
    486        
    487457        /**
    488458         * Get Equal to Options
     
    513483
    514484        public function equaltoAjax(){ 
    515             $data = $_POST['data'];
     485            $data = wp_unslash($_POST['data']);
    516486            $type = $data['condition_if'];
    517487            $opt = $this->getEqualToOptions($type);
     
    522492        }
    523493
    524         //------------------------------------//--------------------------------------//
    525        
    526494        /**
    527495         * All removed sidebars list
     
    544512        }
    545513
    546         //------------------------------------//--------------------------------------//
    547        
    548514        /**
    549515         * Sidebar Template
  • smk-sidebar-generator/trunk/smk-sidebar-generator.php

    r2500393 r2848657  
    44 * Plugin URI:  https://zerowp.com/sidebar-generator
    55 * Description: Generate an unlimited number of sidebars and assign them to any page using the conditional options without touching a single line of code.
    6  * Author:      Andrew Surdu
     6 * Author:      Andrei Surdu
    77 * Version:     3.4.3
    88 * Author URI:  https://zerowp.com
Note: See TracChangeset for help on using the changeset viewer.