Plugin Directory

Changeset 3031244


Ignore:
Timestamp:
02/04/2024 10:05:27 PM (2 years ago)
Author:
deviodigital
Message:

Releasing BoostBox v1.5.0

Location:
boostbox/trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • boostbox/trunk/README.txt

    r3027699 r3031244  
    44Tags: popup, lead-generation, marketing, popups, exit-intent
    55Requires at least: 3.0.1
    6 Tested up to: 6.4.2
    7 Stable tag: 1.4.0
     6Tested up to: 6.4.3
     7Stable tag: 1.5.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949
    5050== 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
    5159
    5260= 1.4.0 =
  • boostbox/trunk/admin/boostbox-admin-settings.php

    r3021397 r3031244  
    6565        );
    6666
     67        // Loop through the popups.
    6768        foreach ( $popups as $popup ) {
     69            // Update the otpions array.
    6870            $options[$popup->ID] = get_the_title( $popup->ID );
    6971        }
     72
     73        // Filter the options array.
     74        $options = apply_filters( 'boostbox_popup_settings_popups_options', $options );
    7075
    7176        // Section: General.
  • boostbox/trunk/admin/boostbox-custom-post-type.php

    r3027699 r3031244  
    9292 * @return void
    9393 */
    94 function restrict_boostbox_posts() {
     94function boostbox_restrict_posts() {
    9595    // Check if it's a single post.
    9696    if (is_single()) {
     
    100100        if ( $post->post_type === 'boostbox_popups' ) {
    101101            // 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?
    103103            exit();
    104104        }
    105105    }
    106106}
    107 add_action( 'template_redirect', 'restrict_boostbox_posts' );
     107add_action( 'template_redirect', 'boostbox_restrict_posts' );
    108108
    109109/**
  • boostbox/trunk/admin/class-boostbox-admin.php

    r3027699 r3031244  
    156156
    157157}
     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 */
     169function 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}
     177add_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 */
     185function 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}
     191add_action( 'save_post', 'save_boostbox_popups_block', 10, 2 );
  • boostbox/trunk/admin/class-boostbox-cpt-columns.php

    r3027699 r3031244  
    8585         * @param boolean $replace - (optional) replace or add
    8686         *
    87          * @since 4.3.0
     87         * @since 1.4.0
    8888         */
    8989        function __construct( $cpt = '', $replace = false ) {
     
    107107         * @param array $defaults
    108108         *
    109          * @since  4.3.0
     109         * @since  1.4.0
    110110         * @return array
    111111         */
     
    145145         * @param array $columns
    146146         *
    147          * @since  4.3.0
     147         * @since  1.4.0
    148148         * @return array         
    149149         */
     
    165165         * @param array $columns
    166166         *
    167          * @since  4.3.0
     167         * @since  1.4.0
    168168         * @return array
    169169         */
     
    186186         * @param int    $post_id     - post ID
    187187         *
    188          * @since  4.3.0
     188         * @since  1.4.0
    189189         * @return void
    190190         */
     
    204204         * @param string $column_name - column name
    205205         *
    206          * @since  4.3.0
     206         * @since  1.4.0
    207207         * @return void
    208208         */
     
    259259         * @param object $query
    260260         *
    261          * @since  4.3.0
     261         * @since  1.4.0
    262262         * @return void
    263263         */
     
    288288         * @param array  $args - column arguments
    289289         *
    290          * @since  4.3.0
     290         * @since  1.4.0
    291291         * @return void
    292292         */
     
    320320         * @param string $key - column key to be removed
    321321         *
    322          * @since  4.3.0
     322         * @since  1.4.0
    323323         * @return void
    324324         */
  • boostbox/trunk/boostbox.php

    r3027699 r3031244  
    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.4.0
     16 * Version:           1.5.0
    1717 * Author:            Devio Digital
    1818 * Author URI:        https://deviodigital.com
     
    2929
    3030// Current plugin version.
    31 define( 'BOOSTBOX_VERSION', '1.4.0' );
     31define( 'BOOSTBOX_VERSION', '1.5.0' );
    3232
    3333// Plugin basename.
  • boostbox/trunk/includes/boostbox-helper-functions.php

    r3027699 r3031244  
    1111 * @since      1.0.0
    1212 */
     13
     14// Exit if accessed directly.
     15if ( ! defined( 'ABSPATH' ) ) {
     16    exit;
     17}
    1318
    1419/**
     
    8994        // Parse the post content to get blocks
    9095        $blocks = parse_blocks( $post_content );
    91 
    9296
    9397        // Check if there are blocks
     
    200204    $formatted_percentage = number_format( $conversion_percentage, 2 ) . '%';
    201205
    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  
    7373    public function __construct() {
    7474        $this->plugin_name = 'boostbox';
    75         $this->version     = '1.4.0';
     75        $this->version     = '1.5.0';
    7676
    7777        if ( defined( 'BOOSTBOX_VERSION' ) ) {
Note: See TracChangeset for help on using the changeset viewer.