Changeset 3148388
- Timestamp:
- 09/09/2024 04:45:57 AM (19 months ago)
- Location:
- boostbox/trunk
- Files:
-
- 15 edited
-
README.txt (modified) (2 diffs)
-
admin/boostbox-admin-settings.php (modified) (8 diffs)
-
admin/boostbox-custom-post-type.php (modified) (4 diffs)
-
admin/class-boostbox-admin-settings.php (modified) (12 diffs)
-
admin/class-boostbox-admin.php (modified) (9 diffs)
-
admin/class-boostbox-cpt-columns.php (modified) (10 diffs)
-
admin/metaboxes/boostbox-display-settings.php (modified) (10 diffs)
-
admin/metaboxes/boostbox-popup-settings.php (modified) (3 diffs)
-
boostbox.php (modified) (2 diffs)
-
includes/boostbox-helper-functions.php (modified) (1 diff)
-
includes/class-boostbox-loader.php (modified) (4 diffs)
-
includes/class-boostbox.php (modified) (1 diff)
-
languages/boostbox.pot (modified) (2 diffs)
-
public/boostbox-popups.php (modified) (2 diffs)
-
public/class-boostbox-public.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boostbox/trunk/README.txt
r3041592 r3148388 4 4 Tags: popup, lead-generation, marketing, popups, exit-intent 5 5 Requires at least: 3.0.1 6 Tested up to: 6. 4.37 Stable tag: 1.6. 16 Tested up to: 6.6.2 7 Stable tag: 1.6.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 50 50 == 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 51 56 52 57 = 1.6.1 = -
boostbox/trunk/admin/boostbox-admin-settings.php
r3035929 r3148388 38 38 39 39 // Args for popups. 40 $args = array(40 $args = [ 41 41 'hierarchical' => 1, 42 42 'exclude' => '', … … 54 54 'orderby' => 'title', 55 55 'order' => 'ASC' 56 );56 ]; 57 57 58 58 $args = apply_filters( 'boostbox_popup_settings_args', $args ); … … 61 61 $popups = get_posts( $args ); 62 62 63 $options = array(63 $options = [ 64 64 '' => esc_attr__( '--', 'boostbox' ) 65 );65 ]; 66 66 67 67 // Loop through the popups. … … 76 76 // Section: General. 77 77 $boostbox_obj->add_section( 78 array(78 [ 79 79 'id' => 'boostbox_general', 80 80 'title' => esc_attr__( 'General Settings', 'boostbox' ), 81 )81 ] 82 82 ); 83 83 … … 85 85 $boostbox_obj->add_field( 86 86 'boostbox_general', 87 array(87 [ 88 88 'id' => 'boostbox_global_popup', 89 89 'type' => 'select', … … 91 91 'desc' => esc_attr__( 'Select the popup used whenever the global option is set on posts/pages', 'boostbox' ), 92 92 'options' => $options, 93 )93 ] 94 94 ); 95 95 // Field: Cookie days. 96 96 $boostbox_obj->add_field( 97 97 'boostbox_general', 98 array(98 [ 99 99 'id' => 'boostbox_cookie_days', 100 100 'type' => 'number', … … 102 102 'desc' => esc_attr__( 'Set the days a cookie is stored after the user closes a popup', 'boostbox' ), 103 103 'placeholder' => '', 104 )104 ] 105 105 ); 106 106 … … 108 108 $boostbox_obj->add_field( 109 109 'boostbox_general', 110 array(110 [ 111 111 'id' => 'boostbox_privacy_disable_analytics', 112 112 'type' => 'checkbox', 113 113 'name' => esc_attr__( 'Disable Tracking', 'boostbox' ), 114 114 'desc' => esc_attr__( 'Turn off the impression and conversion tracking', 'boostbox' ), 115 )115 ] 116 116 ); 117 117 } -
boostbox/trunk/admin/boostbox-custom-post-type.php
r3035929 r3148388 21 21 function boostbox_popups() { 22 22 23 $labels = array(23 $labels = [ 24 24 'name' => _x( 'Popups', 'Post Type General Name', 'boostbox' ), 25 25 'singular_name' => _x( 'Popup', 'Post Type Singular Name', 'boostbox' ), … … 49 49 'items_list_navigation' => esc_html__( 'Popups list navigation', 'boostbox' ), 50 50 'filter_items_list' => esc_html__( 'Filter popups list', 'boostbox' ), 51 );52 $rewrite = array(51 ]; 52 $rewrite = [ 53 53 'slug' => 'boostbox', 54 54 'with_front' => true, 55 55 'pages' => true, 56 56 'feeds' => true, 57 );58 $args = array(57 ]; 58 $args = [ 59 59 'label' => esc_html__( 'BoostBox Popups', 'boostbox' ), 60 60 'description' => esc_html__( 'Build popups with the core editor', 'boostbox' ), 61 61 'labels' => $labels, 62 'supports' => array( 'title', 'editor', 'thumbnail' ),63 'taxonomies' => array(),62 'supports' => [ 'title', 'editor', 'thumbnail' ], 63 'taxonomies' => [], 64 64 'hierarchical' => false, 65 65 'public' => true, … … 79 79 'show_in_rest' => true, 80 80 'rest_base' => 'popups', 81 );81 ]; 82 82 register_post_type( 'boostbox_popups', $args ); 83 83 … … 122 122 // Add impressions column. 123 123 $boostbox_columns->add_column( 'impressions', 124 array(124 [ 125 125 'label' => esc_html__( 'Impressions', 'boostbox' ), 126 126 'type' => 'custom_html', 127 127 'order' => '2', 128 128 'html' => '' // pass empty to utilize filter below 129 )129 ] 130 130 ); 131 131 132 132 // Add conversions column. 133 133 $boostbox_columns->add_column( 'conversions', 134 array(134 [ 135 135 'label' => esc_html__( 'Conversions', 'boostbox' ), 136 136 'type' => 'custom_html', 137 137 'order' => '3', 138 138 'html' => '' // pass empty to utilize filter below 139 )139 ] 140 140 ); 141 141 142 142 // Add conversion rate column. 143 143 $boostbox_columns->add_column( 'conversion_rate', 144 array(144 [ 145 145 'label' => esc_html__( 'Conversion rate', 'boostbox' ), 146 146 'type' => 'custom_html', 147 147 'order' => '4', 148 148 'html' => '' // pass empty to utilize filter below 149 )149 ] 150 150 ); 151 151 } -
boostbox/trunk/admin/class-boostbox-admin-settings.php
r3027699 r3148388 39 39 * @since 1.0.0 40 40 */ 41 private $ _sections_array = array();41 private $sections_array = []; 42 42 43 43 /** … … 47 47 * @since 1.0.0 48 48 */ 49 private $ _fields_array = array();49 private $fields_array = []; 50 50 51 51 /** … … 56 56 public function __construct() { 57 57 // Enqueue the admin scripts. 58 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ));58 add_action( 'admin_enqueue_scripts', [ $this, 'admin_scripts' ] ); 59 59 60 60 // Hook it up. 61 add_action( 'admin_init', array( $this, 'admin_init' ));61 add_action( 'admin_init', [ $this, 'admin_init' ] ); 62 62 63 63 // Menu. 64 add_action( 'admin_menu', array( $this, 'admin_menu' ));64 add_action( 'admin_menu', [ $this, 'admin_menu' ] ); 65 65 66 66 } … … 79 79 'iris', 80 80 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' ], 82 82 false, 83 83 1 … … 153 153 public function add_field( $section, $field_array ) { 154 154 // Set the defaults 155 $defaults = array(155 $defaults = [ 156 156 'id' => '', 157 157 'name' => '', 158 158 'desc' => '', 159 159 'type' => 'text', 160 );160 ]; 161 161 162 162 // Combine the defaults with user's arguements. … … 288 288 $sanitize_callback = isset( $field['sanitize_callback'] ) ? $field['sanitize_callback'] : ''; 289 289 290 $args = array(290 $args = [ 291 291 'id' => $the_id, 292 292 'type' => $type, … … 300 300 'placeholder' => $placeholder, 301 301 'sanitize_callback' => $sanitize_callback, 302 );302 ]; 303 303 304 304 /** … … 310 310 * @param string $page 311 311 * @param string $section = 'default' 312 * @param array $args = array()312 * @param array $args = [] 313 313 * @since 1.0.0 314 314 */ … … 320 320 $field_id, 321 321 $name, 322 array( $this, 'callback_' . $type ),322 [ $this, 'callback_' . $type ], 323 323 $section, 324 324 $section, … … 338 338 * @since 1.0.0 339 339 */ 340 register_setting( $section['id'], $section['id'], array( $this, 'sanitize_fields' ));340 register_setting( $section['id'], $section['id'], [ $this, 'sanitize_fields' ] ); 341 341 } // foreach ended. 342 342 … … 582 582 echo wp_kses_post( '<div style="max-width: ' . esc_attr( $size ) . ';">' ); 583 583 584 $editor_settings = array(584 $editor_settings = [ 585 585 'teeny' => true, 586 586 'textarea_name' => $args['section'] . '[' . $args['id'] . ']', 587 587 'textarea_rows' => 10, 588 );588 ]; 589 589 590 590 if ( isset( $args['options'] ) && is_array( $args['options'] ) ) { … … 729 729 'manage_options', 730 730 'settings', 731 array( $this, 'plugin_page' )731 [ $this, 'plugin_page' ] 732 732 ); 733 733 } -
boostbox/trunk/admin/class-boostbox-admin.php
r3035929 r3148388 39 39 * @var string $_plugin_name - The ID of this plugin. 40 40 */ 41 private $ _plugin_name;41 private $plugin_name; 42 42 43 43 /** … … 48 48 * @var string $_version - The current version of this plugin. 49 49 */ 50 private $ _version;50 private $version; 51 51 52 52 /** … … 74 74 // Check if you're on the edit screen for BoostBox popups. 75 75 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' ] ) || 77 77 ( 'post' === $current_screen->base && 'post-new.php' === $current_screen->id ) 78 78 ) ) { 79 79 // 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' ); 81 81 } 82 82 // 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' ); 84 84 } 85 85 … … 95 95 96 96 // Args for popups. 97 $args = array(97 $args = [ 98 98 'hierarchical' => 1, 99 99 'exclude' => '', … … 111 111 'orderby' => 'title', 112 112 'order' => 'ASC' 113 );113 ]; 114 114 115 // Filter the args. 115 116 $args = apply_filters( 'boostbox_popup_settings_args', $args ); 116 117 … … 119 120 120 121 // Generate empty arrays. 121 $popup_conversions = array();122 $popup_impressions = array();122 $popup_conversions = []; 123 $popup_impressions = []; 123 124 // Initialize total counters. 124 125 $total_impressions = 0; … … 136 137 } 137 138 // 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', [ 140 141 'total_impressions' => $total_impressions, 141 142 'total_conversions' => $total_conversions, 142 143 'popup_impressions' => $popup_impressions, 143 144 'popup_conversions' => $popup_conversions 144 ));145 ] ); 145 146 // Check if you're on the edit screen for the "boostbox_popups" Custom Post Type 146 147 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' ] ) || 148 149 ( 'post' === $current_screen->base && 'post-new.php' === $current_screen->id ) 149 150 ) ) { 150 151 // 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 ); 152 153 } 153 154 // 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', [ 156 157 'stylesheet_url' => get_stylesheet_directory_uri(), 157 158 'popup_id' => json_encode( get_the_ID() ), 158 159 'metrics_reset_nonce' => wp_create_nonce( 'boostbox_metrics_reset_nonce' ), 159 ));160 ] ); 160 161 } 161 162 … … 176 177 'boostbox-popups-block', 177 178 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' ], 179 180 BOOSTBOX_VERSION 180 181 ); … … 185 186 * Run on save post 186 187 * 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. 189 190 */ 190 191 function save_boostbox_popups_block( $post_id, $post ) { -
boostbox/trunk/admin/class-boostbox-cpt-columns.php
r3031244 r3148388 41 41 * @var array 42 42 */ 43 public $columns = array();43 public $columns = []; 44 44 45 45 /** … … 50 50 * @var array 51 51 */ 52 public $remove_columns = array();52 public $remove_columns = []; 53 53 54 54 /** … … 59 59 * @var array 60 60 */ 61 public $sortable_columns = array();61 public $sortable_columns = []; 62 62 63 63 /** … … 91 91 $this->replace = $replace; 92 92 // add columns. 93 add_filter( "manage_{$cpt}_posts_columns", array( $this,'_columns' ), 50 );93 add_filter( "manage_{$cpt}_posts_columns", [ $this,'_columns' ], 50 ); 94 94 // 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 ); 96 96 // 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 ); 98 98 // 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 ); 100 100 // sort order. 101 add_filter( 'pre_get_posts', array( $this, '_column_orderby' ), 50 );101 add_filter( 'pre_get_posts', [ $this, '_column_orderby' ], 50 ); 102 102 } 103 103 … … 113 113 global $typenow; 114 114 if ( $this->name == $typenow ) { 115 $tmp = array();115 $tmp = []; 116 116 if ( $this->replace ) { 117 117 foreach ( $this->columns as $key => $args ) { … … 130 130 $defaults = array_merge( $defaults, $tmp ); 131 131 } 132 $tmp = array();132 $tmp = []; 133 133 } 134 134 } … … 208 208 */ 209 209 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' ] ) ) { 211 211 echo $column['prefix']; 212 212 } … … 247 247 } 248 248 // 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' ] ) ) { 250 250 echo $column['suffix']; 251 251 } … … 292 292 */ 293 293 function add_column( $key, $args ) { 294 $def = array(294 $def = [ 295 295 'label' => esc_html__( 'Column label', 'boostbox' ), 296 'size' => array( '80', '80' ),296 'size' => [ '80', '80' ], 297 297 'taxonomy' => '', 298 298 'meta_key' => '', … … 304 304 'suffix' => '', 305 305 'std' => '', 306 );306 ]; 307 307 308 308 $this->columns[$key] = array_merge( $def, $args ); -
boostbox/trunk/admin/metaboxes/boostbox-display-settings.php
r3035929 r3148388 80 80 <div class="panels"> 81 81 <div id="first-panel" class="panel active animated slideInRight">'; 82 $locations = array( 82 // Create an array of locations. 83 $locations = [ 83 84 'top-left' => esc_attr__( 'Top Left', 'boostbox' ), 84 85 'top-center' => esc_attr__( 'Top Center', 'boostbox' ), … … 90 91 'bottom-center' => esc_attr__( 'Bottom Center', 'boostbox' ), 91 92 'bottom-right' => esc_attr__( 'Bottom Right', 'boostbox' ), 92 ); 93 93 ]; 94 95 // Filter the locations. 94 96 $locations = apply_filters( 'boostbox_display_location_locations', $locations ); 95 97 … … 108 110 if ( ! empty( $locations ) ) { 109 111 foreach ( $locations as $location => $value ) { 112 $selected = ''; 110 113 if ( $location == $display_location ) { 111 114 $selected = 'selected="selected"'; 112 } else {113 $selected = '';114 115 } 115 116 $field .= '<option value="' . esc_attr( $location ) . '" '. $selected .'>' . esc_html( $value ) . '</option>'; … … 146 147 147 148 <div id="second-panel" class="panel animated slideInRight">', boostbox_allowed_tags() ); 148 149 $animations = array(149 // Create an array of animations. 150 $animations = [ 150 151 '' => esc_attr__( '--', 'boostbox' ), 151 152 'fade-in' => esc_attr__( 'Fade in', 'boostbox' ), … … 156 157 'pop-swirl' => esc_attr__( 'Pop swirl', 'boostbox' ), 157 158 'anvil' => esc_attr__( 'Anvil', 'boostbox' ), 158 ); 159 159 ]; 160 161 // Filter the animations. 160 162 $animations = apply_filters( 'boostbox_animation_type_animations', $animations ); 161 163 … … 170 172 if ( ! empty( $animations ) ) { 171 173 foreach ( $animations as $animation => $value ) { 174 $selected = ''; 172 175 if ( $animation == $popup_animation ) { 173 176 $selected = 'selected="selected"'; 174 } else {175 $selected = '';176 177 } 177 178 $field .= '<option value="' . esc_attr( $animation ) . '" '. $selected .'>' . esc_html( $value ) . '</option>'; … … 197 198 198 199 <div id="third-panel" class="panel animated slideInRight">', boostbox_allowed_tags() ); 199 200 $triggers = array(200 // Create an array of triggers. 201 $triggers = [ 201 202 'auto-open' => esc_attr__( 'Auto open', 'boostbox' ), 202 203 'on-scroll' => esc_attr__( 'On Scroll', 'boostbox' ), 203 204 'time' => esc_attr__( 'Time', 'boostbox' ), 204 ); 205 205 ]; 206 207 // Filter the triggers. 206 208 $triggers = apply_filters( 'boostbox_trigger_type_triggers', $triggers ); 207 209 … … 216 218 if ( ! empty( $triggers ) ) { 217 219 foreach ( $triggers as $trigger => $value ) { 220 $selected = ''; 218 221 if ( $trigger == $trigger_type ) { 219 222 $selected = 'selected="selected"'; 220 } else {221 $selected = '';222 223 } 223 224 $field .= '<option value="' . esc_attr( $trigger ) . '" '. $selected .'>' . esc_html( $value ) . '</option>'; … … 254 255 255 256 <div id="fourth-panel" class="panel animated slideInRight">', boostbox_allowed_tags() ); 256 $placements = array( 257 // Create an array of placements. 258 $placements = [ 257 259 'outside' => esc_attr__( 'Outside', 'boostbox' ), 258 260 'inside' => esc_attr__( 'Inside', 'boostbox' ), 259 261 'hidden' => esc_attr__( 'Hidden', 'boostbox' ) 260 );262 ]; 261 263 264 // Filter the placement. 262 265 $close_icon_placement = apply_filters( 'boostbox_close_icon_placements', $placements ); 263 266 … … 272 275 if ( ! empty( $close_icon_placement ) ) { 273 276 foreach ( $close_icon_placement as $placement => $value ) { 277 $selected = ''; 274 278 if ( $placement == $icon_placement ) { 275 279 $selected = 'selected="selected"'; 276 } else {277 $selected = '';278 280 } 279 281 $field .= '<option value="' . esc_attr( $placement ) . '" '. $selected .'>' . esc_html( $value ) . '</option>'; -
boostbox/trunk/admin/metaboxes/boostbox-popup-settings.php
r3035929 r3148388 34 34 $post_types = get_post_types(); 35 35 // 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' ] ); 37 37 // 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' ] ); 39 39 // Loop through the post types. 40 40 foreach ( $post_types as $post_type ) { … … 65 65 66 66 // Args for popups. 67 $args = array(67 $args = [ 68 68 'hierarchical' => 1, 69 69 'exclude' => '', … … 81 81 'orderby' => 'title', 82 82 'order' => 'ASC' 83 );83 ]; 84 84 85 85 $args = apply_filters( 'boostbox_popup_settings_args', $args ); -
boostbox/trunk/boostbox.php
r3061151 r3148388 14 14 * Plugin URI: https://deviodigital.com/boostbox-lead-generation-plugin 15 15 * Description: Build popups for lead generation, content promotion and more using the core editor. 16 * Version: 1.6. 116 * Version: 1.6.2 17 17 * Author: Devio Digital 18 18 * Author URI: https://deviodigital.com … … 29 29 30 30 // Current plugin version. 31 define( 'BOOSTBOX_VERSION', '1.6. 1' );31 define( 'BOOSTBOX_VERSION', '1.6.2' ); 32 32 33 33 // Plugin basename. -
boostbox/trunk/includes/boostbox-helper-functions.php
r3035929 r3148388 30 30 $my_allowed = wp_kses_allowed_html( 'post' ); 31 31 // 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 ]; 39 39 // 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 ]; 48 48 // 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 ]; 56 56 // select options 57 $my_allowed['option'] = array(58 'selected' => array(),59 'value' => array(),60 );57 $my_allowed['option'] = [ 58 'selected' => [], 59 'value' => [], 60 ]; 61 61 // style 62 $my_allowed['style'] = array(63 'types' => array(),64 );62 $my_allowed['style'] = [ 63 'types' => [], 64 ]; 65 65 // 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 ]; 79 79 return $my_allowed; 80 80 } -
boostbox/trunk/includes/class-boostbox-loader.php
r3035929 r3148388 59 59 public function __construct() { 60 60 61 $this->actions = array();62 $this->filters = array();61 $this->actions = []; 62 $this->filters = []; 63 63 64 64 } … … 113 113 private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { 114 114 115 $hooks[] = array(115 $hooks[] = [ 116 116 'hook' => $hook, 117 117 'component' => $component, … … 119 119 'priority' => $priority, 120 120 'accepted_args' => $accepted_args 121 );121 ]; 122 122 123 123 return $hooks; … … 134 134 135 135 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'] ); 137 137 } 138 138 139 139 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'] ); 141 141 } 142 142 -
boostbox/trunk/includes/class-boostbox.php
r3041592 r3148388 78 78 public function __construct() { 79 79 $this->plugin_name = 'boostbox'; 80 $this->version = '1.6. 1';80 $this->version = '1.6.2'; 81 81 82 82 if ( defined( 'BOOSTBOX_VERSION' ) ) { -
boostbox/trunk/languages/boostbox.pot
r3035929 r3148388 3 3 msgstr "" 4 4 "Project-Id-Version: BoostBox\n" 5 "POT-Creation-Date: 2024-0 2-14 17:59-0500\n"5 "POT-Creation-Date: 2024-03-28 19:01-0400\n" 6 6 "PO-Revision-Date: 2024-02-14 17:59-0500\n" 7 7 "Last-Translator: \n" … … 17 17 "X-Poedit-SourceCharset: UTF-8\n" 18 18 "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 "_n x_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" 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 "X-Poedit-SearchPathExcluded-0: *.min.js\n" -
boostbox/trunk/public/boostbox-popups.php
r3041592 r3148388 73 73 <?php 74 74 // Query args. 75 $args = array(75 $args = [ 76 76 'post_type' => 'boostbox_popups', 77 77 'post_status' => 'publish', … … 79 79 'no_found_rows' => true, 80 80 'ignore_sticky_posts' => true 81 );81 ]; 82 82 83 83 // Filter the args. -
boostbox/trunk/public/class-boostbox-public.php
r3035929 r3148388 37 37 * @since 1.0.0 38 38 * @access private 39 * @var string $ _plugin_name - The ID of this plugin.39 * @var string $plugin_name - The ID of this plugin. 40 40 */ 41 private $ _plugin_name;41 private $plugin_name; 42 42 43 43 /** … … 46 46 * @since 1.0.0 47 47 * @access private 48 * @var string $ _version - The current version of this plugin.48 * @var string $version - The current version of this plugin. 49 49 */ 50 private $ _version;50 private $version; 51 51 52 52 /** … … 74 74 public function enqueue_styles() { 75 75 // 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' ); 77 77 } 78 78 … … 97 97 } 98 98 // Create localize script args. 99 $localize_args = array(99 $localize_args = [ 100 100 'popup_id' => $popup_id, 101 101 'milliseconds' => $milliseconds, … … 107 107 'nonce' => wp_create_nonce( 'boostbox_nonce' ), 108 108 'disable_analytics' => boostbox_settings_disable_analytics() 109 );109 ]; 110 110 // Filter the args. 111 111 $localize_args = apply_filters( 'boostbox_localize_scripts_args', $localize_args ); 112 112 // 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 ); 115 115 wp_localize_script( $this->plugin_name, 'boostbox_settings', $localize_args ); 116 116 }
Note: See TracChangeset
for help on using the changeset viewer.