Changeset 3031244
- Timestamp:
- 02/04/2024 10:05:27 PM (2 years ago)
- Location:
- boostbox/trunk
- Files:
-
- 1 added
- 8 edited
-
README.txt (modified) (2 diffs)
-
admin/boostbox-admin-settings.php (modified) (1 diff)
-
admin/boostbox-custom-post-type.php (modified) (2 diffs)
-
admin/class-boostbox-admin.php (modified) (1 diff)
-
admin/class-boostbox-cpt-columns.php (modified) (9 diffs)
-
admin/js/boostbox-popups-block.js (added)
-
boostbox.php (modified) (2 diffs)
-
includes/boostbox-helper-functions.php (modified) (3 diffs)
-
includes/class-boostbox.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
boostbox/trunk/README.txt
r3027699 r3031244 4 4 Tags: popup, lead-generation, marketing, popups, exit-intent 5 5 Requires at least: 3.0.1 6 Tested up to: 6.4. 27 Stable tag: 1. 4.06 Tested up to: 6.4.3 7 Stable tag: 1.5.0 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.5.0 = 53 * Added 'BoostBox Popups' block in `admin/class-boostbox-admin.php` 54 * Added 'BoostBox Popups' block in `admin/js/boostbox-popups-block.js` 55 * Added 'boostbox_popup_settings_popups_options' filter in `admin/boostbox-admin-settings.php` 56 * Added 'boostbox_restrict_posts_redirect_url' filter in `admin/boostbox-custom-post-type.php` 57 * Added 'boostbox_popup_conversion_rate_formatted_percentage' filter in `includes/boostbox-helper-functions.php` 58 * General code cleanup throughout multiple files of the plugin 51 59 52 60 = 1.4.0 = -
boostbox/trunk/admin/boostbox-admin-settings.php
r3021397 r3031244 65 65 ); 66 66 67 // Loop through the popups. 67 68 foreach ( $popups as $popup ) { 69 // Update the otpions array. 68 70 $options[$popup->ID] = get_the_title( $popup->ID ); 69 71 } 72 73 // Filter the options array. 74 $options = apply_filters( 'boostbox_popup_settings_popups_options', $options ); 70 75 71 76 // Section: General. -
boostbox/trunk/admin/boostbox-custom-post-type.php
r3027699 r3031244 92 92 * @return void 93 93 */ 94 function restrict_boostbox_posts() {94 function boostbox_restrict_posts() { 95 95 // Check if it's a single post. 96 96 if (is_single()) { … … 100 100 if ( $post->post_type === 'boostbox_popups' ) { 101 101 // Redirect to the homepage or a custom URL. 102 wp_redirect( home_url() ); // @TODO make a filter?102 wp_redirect( apply_filters( 'boostbox_restrict_posts_redirect_url', home_url() ) ); // @TODO make a filter? 103 103 exit(); 104 104 } 105 105 } 106 106 } 107 add_action( 'template_redirect', ' restrict_boostbox_posts' );107 add_action( 'template_redirect', 'boostbox_restrict_posts' ); 108 108 109 109 /** -
boostbox/trunk/admin/class-boostbox-admin.php
r3027699 r3031244 156 156 157 157 } 158 159 /** 160 * Insert Popups Block 161 * 162 * This block will let users insert a popup directly into their post content 163 * 164 * @TODO figure out how to track metrics for times it's viewed in content and not the regular popup way 165 * 166 * @since 1.5.0 167 * @return void 168 */ 169 function boostbox_enqueue_boostbox_popups_block() { 170 wp_enqueue_script( 171 'boostbox-popups-block', 172 plugin_dir_url( __FILE__ ) . '/js/boostbox-popups-block.js', 173 array( 'wp-blocks', 'wp-components', 'wp-editor', 'wp-data' ), 174 BOOSTBOX_VERSION 175 ); 176 } 177 add_action( 'enqueue_block_editor_assets', 'boostbox_enqueue_boostbox_popups_block' ); 178 179 /** 180 * Run on save post 181 * 182 * @param int $post_id - the post ID. 183 * @param object $post - the post data. 184 */ 185 function save_boostbox_popups_block( $post_id, $post ) { 186 if ( $post->post_type === 'post' ) { 187 $selected_popup = isset( $_POST['attributes']['selectedPopup'] ) ? absint( $_POST['attributes']['selectedPopup'] ) : 0; 188 update_post_meta( $post_id, '_selected_popup', $selected_popup ); 189 } 190 } 191 add_action( 'save_post', 'save_boostbox_popups_block', 10, 2 ); -
boostbox/trunk/admin/class-boostbox-cpt-columns.php
r3027699 r3031244 85 85 * @param boolean $replace - (optional) replace or add 86 86 * 87 * @since 4.3.087 * @since 1.4.0 88 88 */ 89 89 function __construct( $cpt = '', $replace = false ) { … … 107 107 * @param array $defaults 108 108 * 109 * @since 4.3.0109 * @since 1.4.0 110 110 * @return array 111 111 */ … … 145 145 * @param array $columns 146 146 * 147 * @since 4.3.0147 * @since 1.4.0 148 148 * @return array 149 149 */ … … 165 165 * @param array $columns 166 166 * 167 * @since 4.3.0167 * @since 1.4.0 168 168 * @return array 169 169 */ … … 186 186 * @param int $post_id - post ID 187 187 * 188 * @since 4.3.0188 * @since 1.4.0 189 189 * @return void 190 190 */ … … 204 204 * @param string $column_name - column name 205 205 * 206 * @since 4.3.0206 * @since 1.4.0 207 207 * @return void 208 208 */ … … 259 259 * @param object $query 260 260 * 261 * @since 4.3.0261 * @since 1.4.0 262 262 * @return void 263 263 */ … … 288 288 * @param array $args - column arguments 289 289 * 290 * @since 4.3.0290 * @since 1.4.0 291 291 * @return void 292 292 */ … … 320 320 * @param string $key - column key to be removed 321 321 * 322 * @since 4.3.0322 * @since 1.4.0 323 323 * @return void 324 324 */ -
boostbox/trunk/boostbox.php
r3027699 r3031244 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. 4.016 * Version: 1.5.0 17 17 * Author: Devio Digital 18 18 * Author URI: https://deviodigital.com … … 29 29 30 30 // Current plugin version. 31 define( 'BOOSTBOX_VERSION', '1. 4.0' );31 define( 'BOOSTBOX_VERSION', '1.5.0' ); 32 32 33 33 // Plugin basename. -
boostbox/trunk/includes/boostbox-helper-functions.php
r3027699 r3031244 11 11 * @since 1.0.0 12 12 */ 13 14 // Exit if accessed directly. 15 if ( ! defined( 'ABSPATH' ) ) { 16 exit; 17 } 13 18 14 19 /** … … 89 94 // Parse the post content to get blocks 90 95 $blocks = parse_blocks( $post_content ); 91 92 96 93 97 // Check if there are blocks … … 200 204 $formatted_percentage = number_format( $conversion_percentage, 2 ) . '%'; 201 205 202 return $formatted_percentage;203 } 206 return apply_filters( 'boostbox_popup_conversion_rate_formatted_percentage', $formatted_percentage, $conversion_percentage ); 207 } -
boostbox/trunk/includes/class-boostbox.php
r3027699 r3031244 73 73 public function __construct() { 74 74 $this->plugin_name = 'boostbox'; 75 $this->version = '1. 4.0';75 $this->version = '1.5.0'; 76 76 77 77 if ( defined( 'BOOSTBOX_VERSION' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.