Plugin Directory

Changeset 3148388


Ignore:
Timestamp:
09/09/2024 04:45:57 AM (19 months ago)
Author:
deviodigital
Message:

Releasing BoostBox v1.6.2

Location:
boostbox/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • boostbox/trunk/README.txt

    r3041592 r3148388  
    44Tags: popup, lead-generation, marketing, popups, exit-intent
    55Requires at least: 3.0.1
    6 Tested up to: 6.4.3
    7 Stable tag: 1.6.1
     6Tested up to: 6.6.2
     7Stable tag: 1.6.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949
    5050== Changelog ==
     51
     52= 1.6.2 =
     53*   Updated variables to fix deprecation notices throughout multiple files of the plugin
     54*   Updated array to shorthand syntax throughout multiple files of the plugin
     55*   General code cleanup throughout multiple files of the plugin
    5156
    5257= 1.6.1 =
  • boostbox/trunk/admin/boostbox-admin-settings.php

    r3035929 r3148388  
    3838
    3939        // Args for popups.
    40         $args = array(
     40        $args = [
    4141            'hierarchical' => 1,
    4242            'exclude'      => '',
     
    5454            'orderby'      => 'title',
    5555            'order'        => 'ASC'
    56         );
     56        ];
    5757
    5858        $args = apply_filters( 'boostbox_popup_settings_args', $args );
     
    6161        $popups = get_posts( $args );
    6262
    63         $options = array(
     63        $options = [
    6464            '' => esc_attr__( '--', 'boostbox' )
    65         );
     65        ];
    6666
    6767        // Loop through the popups.
     
    7676        // Section: General.
    7777        $boostbox_obj->add_section(
    78             array(
     78            [
    7979                'id'    => 'boostbox_general',
    8080                'title' => esc_attr__( 'General Settings', 'boostbox' ),
    81             )
     81            ]
    8282        );
    8383
     
    8585        $boostbox_obj->add_field(
    8686            'boostbox_general',
    87             array(
     87            [
    8888                'id'      => 'boostbox_global_popup',
    8989                'type'    => 'select',
     
    9191                'desc'    => esc_attr__( 'Select the popup used whenever the global option is set on posts/pages', 'boostbox' ),
    9292                'options' => $options,
    93             )
     93            ]
    9494        );
    9595        // Field: Cookie days.
    9696        $boostbox_obj->add_field(
    9797            'boostbox_general',
    98             array(
     98            [
    9999                'id'          => 'boostbox_cookie_days',
    100100                'type'        => 'number',
     
    102102                'desc'        => esc_attr__( 'Set the days a cookie is stored after the user closes a popup', 'boostbox' ),
    103103                'placeholder' => '',
    104             )
     104            ]
    105105        );
    106106
     
    108108        $boostbox_obj->add_field(
    109109            'boostbox_general',
    110             array(
     110            [
    111111                'id'   => 'boostbox_privacy_disable_analytics',
    112112                'type' => 'checkbox',
    113113                'name' => esc_attr__( 'Disable Tracking', 'boostbox' ),
    114114                'desc' => esc_attr__( 'Turn off the impression and conversion tracking', 'boostbox' ),
    115             )
     115            ]
    116116        );
    117117    }
  • boostbox/trunk/admin/boostbox-custom-post-type.php

    r3035929 r3148388  
    2121    function boostbox_popups() {
    2222
    23         $labels = array(
     23        $labels = [
    2424            'name'                  => _x( 'Popups', 'Post Type General Name', 'boostbox' ),
    2525            'singular_name'         => _x( 'Popup', 'Post Type Singular Name', 'boostbox' ),
     
    4949            'items_list_navigation' => esc_html__( 'Popups list navigation', 'boostbox' ),
    5050            'filter_items_list'     => esc_html__( 'Filter popups list', 'boostbox' ),
    51         );
    52         $rewrite = array(
     51        ];
     52        $rewrite = [
    5353            'slug'                  => 'boostbox',
    5454            'with_front'            => true,
    5555            'pages'                 => true,
    5656            'feeds'                 => true,
    57         );
    58         $args = array(
     57        ];
     58        $args = [
    5959            'label'                 => esc_html__( 'BoostBox Popups', 'boostbox' ),
    6060            'description'           => esc_html__( 'Build popups with the core editor', 'boostbox' ),
    6161            'labels'                => $labels,
    62             'supports'              => array( 'title', 'editor', 'thumbnail' ),
    63             'taxonomies'            => array(),
     62            'supports'              => [ 'title', 'editor', 'thumbnail' ],
     63            'taxonomies'            => [],
    6464            'hierarchical'          => false,
    6565            'public'                => true,
     
    7979            'show_in_rest'          => true,
    8080            'rest_base'             => 'popups',
    81         );
     81        ];
    8282        register_post_type( 'boostbox_popups', $args );
    8383
     
    122122    // Add impressions column.
    123123    $boostbox_columns->add_column( 'impressions',
    124         array(
     124        [
    125125            'label' => esc_html__( 'Impressions', 'boostbox' ),
    126126            'type'  => 'custom_html',
    127127            'order' => '2',
    128128            'html'  => '' // pass empty to utilize filter below
    129         )
     129        ]
    130130    );
    131131
    132132    // Add conversions column.
    133133    $boostbox_columns->add_column( 'conversions',
    134         array(
     134        [
    135135            'label' => esc_html__( 'Conversions', 'boostbox' ),
    136136            'type'  => 'custom_html',
    137137            'order' => '3',
    138138            'html'  => '' // pass empty to utilize filter below
    139         )
     139        ]
    140140    );
    141141
    142142    // Add conversion rate column.
    143143    $boostbox_columns->add_column( 'conversion_rate',
    144         array(
     144        [
    145145            'label' => esc_html__( 'Conversion rate', 'boostbox' ),
    146146            'type'  => 'custom_html',
    147147            'order' => '4',
    148148            'html'  => '' // pass empty to utilize filter below
    149         )
     149        ]
    150150    );
    151151}
  • boostbox/trunk/admin/class-boostbox-admin-settings.php

    r3027699 r3148388  
    3939         * @since 1.0.0
    4040         */
    41         private $_sections_array = array();
     41        private $sections_array = [];
    4242
    4343        /**
     
    4747         * @since 1.0.0
    4848         */
    49         private $_fields_array = array();
     49        private $fields_array = [];
    5050
    5151        /**
     
    5656        public function __construct() {
    5757            // Enqueue the admin scripts.
    58             add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
     58            add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] );
    5959
    6060            // Hook it up.
    61             add_action( 'admin_init', array( $this, 'admin_init' ) );
     61            add_action( 'admin_init', [ $this, 'admin_init' ] );
    6262
    6363            // Menu.
    64             add_action( 'admin_menu', array( $this, 'admin_menu' ) );
     64            add_action( 'admin_menu', [ $this, 'admin_menu' ] );
    6565
    6666        }
     
    7979                'iris',
    8080                admin_url( 'js/iris.min.js' ),
    81                 array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ),
     81                [ 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ],
    8282                false,
    8383                1
     
    153153        public function add_field( $section, $field_array ) {
    154154            // Set the defaults
    155             $defaults = array(
     155            $defaults = [
    156156                'id'   => '',
    157157                'name' => '',
    158158                'desc' => '',
    159159                'type' => 'text',
    160             );
     160            ];
    161161
    162162            // Combine the defaults with user's arguements.
     
    288288                    $sanitize_callback = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : '';
    289289
    290                     $args = array(
     290                    $args = [
    291291                        'id'                => $the_id,
    292292                        'type'              => $type,
     
    300300                        'placeholder'       => $placeholder,
    301301                        'sanitize_callback' => $sanitize_callback,
    302                     );
     302                    ];
    303303
    304304                    /**
     
    310310                     * @param string   $page
    311311                     * @param string   $section = 'default'
    312                      * @param array    $args = array()
     312                     * @param array    $args = []
    313313                     * @since 1.0.0
    314314                     */
     
    320320                        $field_id,
    321321                        $name,
    322                         array( $this, 'callback_' . $type ),
     322                        [ $this, 'callback_' . $type ],
    323323                        $section,
    324324                        $section,
     
    338338                 * @since 1.0.0
    339339                 */
    340                 register_setting( $section['id'], $section['id'], array( $this, 'sanitize_fields' ) );
     340                register_setting( $section['id'], $section['id'], [ $this, 'sanitize_fields' ] );
    341341            } // foreach ended.
    342342
     
    582582            echo wp_kses_post( '<div style="max-width: ' . esc_attr( $size ) . ';">' );
    583583
    584             $editor_settings = array(
     584            $editor_settings = [
    585585                'teeny'         => true,
    586586                'textarea_name' => $args['section'] . '[' . $args['id'] . ']',
    587587                'textarea_rows' => 10,
    588             );
     588            ];
    589589
    590590            if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {
     
    729729                'manage_options',
    730730                'settings',
    731                 array( $this, 'plugin_page' )
     731                [ $this, 'plugin_page' ]
    732732            );
    733733        }
  • boostbox/trunk/admin/class-boostbox-admin.php

    r3035929 r3148388  
    3939     * @var    string  $_plugin_name - The ID of this plugin.
    4040     */
    41     private $_plugin_name;
     41    private $plugin_name;
    4242
    4343    /**
     
    4848     * @var    string  $_version - The current version of this plugin.
    4949     */
    50     private $_version;
     50    private $version;
    5151
    5252    /**
     
    7474        // Check if you're on the edit screen for BoostBox popups.
    7575        if ( is_admin() && $current_screen && (
    76             in_array( $current_screen->post_type, array( 'boostbox_popups', 'post', 'page' ) ) ||
     76            in_array( $current_screen->post_type, [ 'boostbox_popups', 'post', 'page' ] ) ||
    7777            ( 'post' === $current_screen->base && 'post-new.php' === $current_screen->id )
    7878        ) ) {
    7979            // General: Select2 CSS.
    80             wp_enqueue_style( $this->plugin_name . '-select2', plugin_dir_url( __FILE__ ) . 'css/select2.min.css', array(), $this->version, 'all' );
     80            wp_enqueue_style( $this->plugin_name . '-select2', plugin_dir_url( __FILE__ ) . 'css/select2.min.css', [], $this->version, 'all' );
    8181        }
    8282        // General: Admin CSS.
    83         wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/boostbox-admin.min.css', array(), $this->version, 'all' );
     83        wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/boostbox-admin.min.css', [], $this->version, 'all' );
    8484    }
    8585
     
    9595
    9696        // Args for popups.
    97         $args = array(
     97        $args = [
    9898            'hierarchical' => 1,
    9999            'exclude'      => '',
     
    111111            'orderby'      => 'title',
    112112            'order'        => 'ASC'
    113         );
     113        ];
    114114
     115        // Filter the args.
    115116        $args = apply_filters( 'boostbox_popup_settings_args', $args );
    116117
     
    119120
    120121        // Generate empty arrays.
    121         $popup_conversions = array();
    122         $popup_impressions = array();
     122        $popup_conversions = [];
     123        $popup_impressions = [];
    123124        // Initialize total counters.
    124125        $total_impressions = 0;
     
    136137        }
    137138        // General: Charts JS.
    138         wp_enqueue_script( $this->plugin_name . '-charts', plugin_dir_url( __FILE__ ) . 'js/charts.js', array( 'jquery' ), $this->version, false );
    139         wp_localize_script( $this->plugin_name . '-charts', 'chart_vars', array(
     139        wp_enqueue_script( $this->plugin_name . '-charts', plugin_dir_url( __FILE__ ) . 'js/charts.js', [ 'jquery' ], $this->version, false );
     140        wp_localize_script( $this->plugin_name . '-charts', 'chart_vars', [
    140141            'total_impressions' => $total_impressions,
    141142            'total_conversions' => $total_conversions,
    142143            'popup_impressions' => $popup_impressions,
    143144            'popup_conversions' => $popup_conversions
    144         ) );
     145        ] );
    145146        // Check if you're on the edit screen for the "boostbox_popups" Custom Post Type
    146147        if ( is_admin() && $current_screen && (
    147             in_array( $current_screen->post_type, array( 'boostbox_popups', 'post', 'page' ) ) ||
     148            in_array( $current_screen->post_type, [ 'boostbox_popups', 'post', 'page' ] ) ||
    148149            ( 'post' === $current_screen->base && 'post-new.php' === $current_screen->id )
    149150        ) ) {
    150151            // General: Select2 JS.
    151             wp_enqueue_script( $this->plugin_name . '-select2', plugin_dir_url( __FILE__ ) . 'js/select2.min.js', array( 'jquery' ), $this->version, false );
     152            wp_enqueue_script( $this->plugin_name . '-select2', plugin_dir_url( __FILE__ ) . 'js/select2.min.js', [ 'jquery' ], $this->version, false );
    152153        }
    153154        // General: Admin JS.
    154         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/boostbox-admin.js', array( 'jquery', 'wp-hooks', 'wp-blocks', 'wp-color-picker', 'boostbox-select2' ), $this->version, false );
    155         wp_localize_script( $this->plugin_name, 'script_vars', array(
     155        wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/boostbox-admin.js', [ 'jquery', 'wp-hooks', 'wp-blocks', 'wp-color-picker', 'boostbox-select2' ], $this->version, false );
     156        wp_localize_script( $this->plugin_name, 'script_vars', [
    156157            'stylesheet_url'      => get_stylesheet_directory_uri(),
    157158            'popup_id'            => json_encode( get_the_ID() ),
    158159            'metrics_reset_nonce' => wp_create_nonce( 'boostbox_metrics_reset_nonce' ),
    159         ) );
     160        ] );
    160161    }
    161162
     
    176177        'boostbox-popups-block',
    177178        plugin_dir_url( __FILE__ ) . '/js/boostbox-popups-block.js',
    178         array( 'wp-blocks', 'wp-components', 'wp-editor', 'wp-data' ),
     179        [ 'wp-blocks', 'wp-components', 'wp-editor', 'wp-data' ],
    179180        BOOSTBOX_VERSION
    180181    );
     
    185186 * Run on save post
    186187 *
    187  * @param int $post_id - the post ID.
    188  * @param object $post - the post data.
     188 * @param int    $post_id - the post ID.
     189 * @param object $post    - the post data.
    189190 */
    190191function save_boostbox_popups_block( $post_id, $post ) {
  • boostbox/trunk/admin/class-boostbox-cpt-columns.php

    r3031244 r3148388  
    4141         * @var array
    4242         */
    43         public $columns = array();
     43        public $columns = [];
    4444
    4545        /**
     
    5050         * @var array
    5151         */
    52         public $remove_columns = array();
     52        public $remove_columns = [];
    5353
    5454        /**
     
    5959         * @var array
    6060         */
    61         public $sortable_columns = array();
     61        public $sortable_columns = [];
    6262
    6363        /**
     
    9191            $this->replace  = $replace;
    9292            // add columns.
    93             add_filter( "manage_{$cpt}_posts_columns", array( $this,'_columns' ), 50 );
     93            add_filter( "manage_{$cpt}_posts_columns", [ $this,'_columns' ], 50 );
    9494            // remove columns.
    95             add_filter( "manage_{$cpt}_posts_columns", array( $this,'_columns_remove' ), 60 );
     95            add_filter( "manage_{$cpt}_posts_columns", [ $this,'_columns_remove' ], 60 );
    9696            // display columns.
    97             add_action( "manage_{$cpt}_posts_custom_column", array( $this,'_custom_column' ), 50, 2 );
     97            add_action( "manage_{$cpt}_posts_custom_column", [ $this,'_custom_column' ], 50, 2 );
    9898            // sortable columns.
    99             add_filter( "manage_edit-{$cpt}_sortable_columns", array( $this, '_sortable_columns' ), 50 );
     99            add_filter( "manage_edit-{$cpt}_sortable_columns", [ $this, '_sortable_columns' ], 50 );
    100100            // sort order.
    101             add_filter( 'pre_get_posts', array( $this, '_column_orderby' ), 50 );
     101            add_filter( 'pre_get_posts', [ $this, '_column_orderby' ], 50 );
    102102        }
    103103 
     
    113113            global $typenow;
    114114            if ( $this->name == $typenow ) {
    115                 $tmp = array();
     115                $tmp = [];
    116116                if ( $this->replace ) {
    117117                    foreach ( $this->columns as $key => $args ) {
     
    130130                            $defaults = array_merge( $defaults, $tmp );
    131131                        }
    132                         $tmp = array();
     132                        $tmp = [];
    133133                    }
    134134                }
     
    208208         */
    209209        function do_column( $post_id, $column, $column_name ) {
    210             if ( in_array( $column['type'], array( 'text', 'thumb', 'post_meta', 'custom_tax', 'custom_html' ) ) ) {
     210            if ( in_array( $column['type'], [ 'text', 'thumb', 'post_meta', 'custom_tax', 'custom_html' ] ) ) {
    211211                echo $column['prefix'];
    212212            }
     
    247247            }
    248248            // Display column.
    249             if ( in_array( $column['type'], array( 'text', 'thumb', 'post_meta', 'custom_tax', 'custom_html' ) ) ) {
     249            if ( in_array( $column['type'], [ 'text', 'thumb', 'post_meta', 'custom_tax', 'custom_html' ] ) ) {
    250250                echo $column['suffix'];
    251251            }
     
    292292         */
    293293        function add_column( $key, $args ) {
    294             $def = array(
     294            $def = [
    295295                'label'    => esc_html__( 'Column label', 'boostbox' ),
    296                 'size'     => array( '80', '80' ),
     296                'size'     => [ '80', '80' ],
    297297                'taxonomy' => '',
    298298                'meta_key' => '',
     
    304304                'suffix'   => '',
    305305                'std'      => '',
    306             );
     306            ];
    307307
    308308            $this->columns[$key] = array_merge( $def, $args );
  • boostbox/trunk/admin/metaboxes/boostbox-display-settings.php

    r3035929 r3148388  
    8080    <div class="panels">
    8181        <div id="first-panel" class="panel active animated slideInRight">';
    82             $locations = array(
     82            // Create an array of locations.
     83            $locations = [
    8384                'top-left'      => esc_attr__( 'Top Left', 'boostbox' ),
    8485                'top-center'    => esc_attr__( 'Top Center', 'boostbox' ),
     
    9091                'bottom-center' => esc_attr__( 'Bottom Center', 'boostbox' ),
    9192                'bottom-right'  => esc_attr__( 'Bottom Right', 'boostbox' ),
    92             );
    93 
     93            ];
     94
     95            // Filter the locations.
    9496            $locations = apply_filters( 'boostbox_display_location_locations', $locations );
    9597
     
    108110            if ( ! empty( $locations ) ) {
    109111                foreach ( $locations as $location => $value ) {
     112                    $selected = '';
    110113                    if ( $location == $display_location ) {
    111114                        $selected = 'selected="selected"';
    112                     } else {
    113                         $selected = '';
    114115                    }
    115116                    $field .= '<option value="' . esc_attr( $location ) . '" '. $selected .'>' . esc_html( $value ) . '</option>';
     
    146147
    147148        <div id="second-panel" class="panel animated slideInRight">', boostbox_allowed_tags() );
    148 
    149             $animations = array(
     149            // Create an array of animations.
     150            $animations = [
    150151                ''            => esc_attr__( '--', 'boostbox' ),
    151152                'fade-in'     => esc_attr__( 'Fade in', 'boostbox' ),
     
    156157                'pop-swirl'   => esc_attr__( 'Pop swirl', 'boostbox' ),
    157158                'anvil'       => esc_attr__( 'Anvil', 'boostbox' ),
    158             );
    159 
     159            ];
     160
     161            // Filter the animations.
    160162            $animations = apply_filters( 'boostbox_animation_type_animations', $animations );
    161163
     
    170172            if ( ! empty( $animations ) ) {
    171173                foreach ( $animations as $animation => $value ) {
     174                    $selected = '';
    172175                    if ( $animation == $popup_animation ) {
    173176                        $selected = 'selected="selected"';
    174                     } else {
    175                         $selected = '';
    176177                    }
    177178                    $field .= '<option value="' . esc_attr( $animation ) . '" '. $selected .'>' . esc_html( $value ) . '</option>';
     
    197198
    198199        <div id="third-panel" class="panel animated slideInRight">', boostbox_allowed_tags() );
    199 
    200             $triggers = array(
     200            // Create an array of triggers.
     201            $triggers = [
    201202                'auto-open'   => esc_attr__( 'Auto open', 'boostbox' ),
    202203                'on-scroll'   => esc_attr__( 'On Scroll', 'boostbox' ),
    203204                'time'        => esc_attr__( 'Time', 'boostbox' ),
    204             );
    205 
     205            ];
     206
     207            // Filter the triggers.
    206208            $triggers = apply_filters( 'boostbox_trigger_type_triggers', $triggers );
    207209
     
    216218            if ( ! empty( $triggers ) ) {
    217219                foreach ( $triggers as $trigger => $value ) {
     220                    $selected = '';
    218221                    if ( $trigger == $trigger_type ) {
    219222                        $selected = 'selected="selected"';
    220                     } else {
    221                         $selected = '';
    222223                    }
    223224                    $field .= '<option value="' . esc_attr( $trigger ) . '" '. $selected .'>' . esc_html( $value ) . '</option>';
     
    254255
    255256        <div id="fourth-panel" class="panel animated slideInRight">', boostbox_allowed_tags() );
    256             $placements = array(
     257            // Create an array of placements.
     258            $placements = [
    257259                'outside' => esc_attr__( 'Outside', 'boostbox' ),
    258260                'inside'  => esc_attr__( 'Inside', 'boostbox' ),
    259261                'hidden'  => esc_attr__( 'Hidden', 'boostbox' )
    260             );
     262            ];
    261263       
     264            // Filter the placement.
    262265            $close_icon_placement = apply_filters( 'boostbox_close_icon_placements', $placements );
    263266
     
    272275            if ( ! empty( $close_icon_placement ) ) {
    273276                foreach ( $close_icon_placement as $placement => $value ) {
     277                    $selected = '';
    274278                    if ( $placement == $icon_placement ) {
    275279                        $selected = 'selected="selected"';
    276                     } else {
    277                         $selected = '';
    278280                    }
    279281                    $field .= '<option value="' . esc_attr( $placement ) . '" '. $selected .'>' . esc_html( $value ) . '</option>';
  • boostbox/trunk/admin/metaboxes/boostbox-popup-settings.php

    r3035929 r3148388  
    3434    $post_types = get_post_types();
    3535    // Remove unnecessary post types.
    36     $post_types = array_diff( $post_types, array( 'revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block' ) );
     36    $post_types = array_diff( $post_types, [ 'revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block' ] );
    3737    // Filter the post types.
    38     $post_types = apply_filters( 'boostbox_popup_settings_metabox_post_types', array( 'products', 'post', 'page' ) );
     38    $post_types = apply_filters( 'boostbox_popup_settings_metabox_post_types', [ 'products', 'post', 'page' ] );
    3939    // Loop through the post types.
    4040    foreach ( $post_types as $post_type ) {
     
    6565
    6666    // Args for popups.
    67     $args = array(
     67    $args = [
    6868        'hierarchical' => 1,
    6969        'exclude'      => '',
     
    8181        'orderby'      => 'title',
    8282        'order'        => 'ASC'
    83     );
     83    ];
    8484
    8585    $args = apply_filters( 'boostbox_popup_settings_args', $args );
  • boostbox/trunk/boostbox.php

    r3061151 r3148388  
    1414 * Plugin URI:        https://deviodigital.com/boostbox-lead-generation-plugin
    1515 * Description:       Build popups for lead generation, content promotion and more using the core editor.
    16  * Version:           1.6.1
     16 * Version:           1.6.2
    1717 * Author:            Devio Digital
    1818 * Author URI:        https://deviodigital.com
     
    2929
    3030// Current plugin version.
    31 define( 'BOOSTBOX_VERSION', '1.6.1' );
     31define( 'BOOSTBOX_VERSION', '1.6.2' );
    3232
    3333// Plugin basename.
  • boostbox/trunk/includes/boostbox-helper-functions.php

    r3035929 r3148388  
    3030    $my_allowed = wp_kses_allowed_html( 'post' );
    3131    // iframe
    32     $my_allowed['iframe'] = array(
    33         'src'             => array(),
    34         'height'          => array(),
    35         'width'           => array(),
    36         'frameborder'     => array(),
    37         'allowfullscreen' => array(),
    38     );
     32    $my_allowed['iframe'] = [
     33        'src'             => [],
     34        'height'          => [],
     35        'width'           => [],
     36        'frameborder'     => [],
     37        'allowfullscreen' => [],
     38    ];
    3939    // form fields - input
    40     $my_allowed['input'] = array(
    41         'class'   => array(),
    42         'id'      => array(),
    43         'name'    => array(),
    44         'value'   => array(),
    45         'type'    => array(),
    46         'checked' => array(),
    47     );
     40    $my_allowed['input'] = [
     41        'class'   => [],
     42        'id'      => [],
     43        'name'    => [],
     44        'value'   => [],
     45        'type'    => [],
     46        'checked' => [],
     47    ];
    4848    // select
    49     $my_allowed['select'] = array(
    50         'class' => array(),
    51         'id'    => array(),
    52         'name'  => array(),
    53         'value' => array(),
    54         'type'  => array(),
    55     );
     49    $my_allowed['select'] = [
     50        'class' => [],
     51        'id'    => [],
     52        'name'  => [],
     53        'value' => [],
     54        'type'  => [],
     55    ];
    5656    // select options
    57     $my_allowed['option'] = array(
    58         'selected' => array(),
    59         'value'    => array(),
    60     );
     57    $my_allowed['option'] = [
     58        'selected' => [],
     59        'value'    => [],
     60    ];
    6161    // style
    62     $my_allowed['style'] = array(
    63         'types' => array(),
    64     );
     62    $my_allowed['style'] = [
     63        'types' => [],
     64    ];
    6565    // SVG.
    66     $my_allowed['svg'] = array(
    67         'xmlns'          => array(),
    68         'width'          => array(),
    69         'height'         => array(),
    70         'viewbox'        => array(),
    71         'class'          => array(),
    72         'aria-hidden'    => array(),
    73         'aria-labeledby' => array()
    74     );
    75     $my_allowed['path'] = array(
    76         'd'    => array(),
    77         'fill' => array()
    78     );
     66    $my_allowed['svg'] = [
     67        'xmlns'          => [],
     68        'width'          => [],
     69        'height'         => [],
     70        'viewbox'        => [],
     71        'class'          => [],
     72        'aria-hidden'    => [],
     73        'aria-labeledby' => []
     74    ];
     75    $my_allowed['path'] = [
     76        'd'    => [],
     77        'fill' => []
     78    ];
    7979    return $my_allowed;
    8080}
  • boostbox/trunk/includes/class-boostbox-loader.php

    r3035929 r3148388  
    5959    public function __construct() {
    6060
    61         $this->actions = array();
    62         $this->filters = array();
     61        $this->actions = [];
     62        $this->filters = [];
    6363
    6464    }
     
    113113    private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
    114114
    115         $hooks[] = array(
     115        $hooks[] = [
    116116            'hook'          => $hook,
    117117            'component'     => $component,
     
    119119            'priority'      => $priority,
    120120            'accepted_args' => $accepted_args
    121         );
     121        ];
    122122
    123123        return $hooks;
     
    134134
    135135        foreach ( $this->filters as $hook ) {
    136             add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
     136            add_filter( $hook['hook'], [ $hook['component'], $hook['callback'] ], $hook['priority'], $hook['accepted_args'] );
    137137        }
    138138
    139139        foreach ( $this->actions as $hook ) {
    140             add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
     140            add_action( $hook['hook'], [ $hook['component'], $hook['callback'] ], $hook['priority'], $hook['accepted_args'] );
    141141        }
    142142
  • boostbox/trunk/includes/class-boostbox.php

    r3041592 r3148388  
    7878    public function __construct() {
    7979        $this->plugin_name = 'boostbox';
    80         $this->version     = '1.6.1';
     80        $this->version     = '1.6.2';
    8181
    8282        if ( defined( 'BOOSTBOX_VERSION' ) ) {
  • boostbox/trunk/languages/boostbox.pot

    r3035929 r3148388  
    33msgstr ""
    44"Project-Id-Version: BoostBox\n"
    5 "POT-Creation-Date: 2024-02-14 17:59-0500\n"
     5"POT-Creation-Date: 2024-03-28 19:01-0400\n"
    66"PO-Revision-Date: 2024-02-14 17:59-0500\n"
    77"Last-Translator: \n"
     
    1717"X-Poedit-SourceCharset: UTF-8\n"
    1818"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
    19 "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
    20 "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
     19"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
     20"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
    2121"X-Poedit-SearchPath-0: .\n"
    2222"X-Poedit-SearchPathExcluded-0: *.min.js\n"
  • boostbox/trunk/public/boostbox-popups.php

    r3041592 r3148388  
    7373        <?php
    7474        // Query args.
    75         $args = array(
     75        $args = [
    7676            'post_type'           => 'boostbox_popups',
    7777            'post_status'         => 'publish',
     
    7979            'no_found_rows'       => true,
    8080            'ignore_sticky_posts' => true
    81         );
     81        ];
    8282
    8383        // Filter the args.
  • boostbox/trunk/public/class-boostbox-public.php

    r3035929 r3148388  
    3737     * @since  1.0.0
    3838     * @access private
    39      * @var    string  $_plugin_name - The ID of this plugin.
     39     * @var    string  $plugin_name - The ID of this plugin.
    4040     */
    41     private $_plugin_name;
     41    private $plugin_name;
    4242
    4343    /**
     
    4646     * @since  1.0.0
    4747     * @access private
    48      * @var    string  $_version - The current version of this plugin.
     48     * @var    string  $version - The current version of this plugin.
    4949     */
    50     private $_version;
     50    private $version;
    5151
    5252    /**
     
    7474    public function enqueue_styles() {
    7575        // Publc CSS.
    76         wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/boostbox-public.min.css', array(), $this->version, 'all' );
     76        wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/boostbox-public.min.css', [], $this->version, 'all' );
    7777    }
    7878
     
    9797        }
    9898        // Create localize script args.
    99         $localize_args = array(
     99        $localize_args = [
    100100            'popup_id'             => $popup_id,
    101101            'milliseconds'         => $milliseconds,
     
    107107            'nonce'                => wp_create_nonce( 'boostbox_nonce' ), 
    108108            'disable_analytics'    => boostbox_settings_disable_analytics()   
    109         );
     109        ];
    110110        // Filter the args.
    111111        $localize_args = apply_filters( 'boostbox_localize_scripts_args', $localize_args );
    112112        // Public JS.
    113         wp_enqueue_script( $this->plugin_name . '-js-cookie', plugin_dir_url( __FILE__ ) . 'js/js.cookie.min.js', array( 'jquery' ), $this->version, false );
    114         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/boostbox-public.js', array( 'jquery' ), $this->version, false );
     113        wp_enqueue_script( $this->plugin_name . '-js-cookie', plugin_dir_url( __FILE__ ) . 'js/js.cookie.min.js', [ 'jquery' ], $this->version, false );
     114        wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/boostbox-public.js', [ 'jquery' ], $this->version, false );
    115115        wp_localize_script( $this->plugin_name, 'boostbox_settings', $localize_args );
    116116    }
Note: See TracChangeset for help on using the changeset viewer.