Plugin Directory

Changeset 3392458


Ignore:
Timestamp:
11/09/2025 05:03:05 PM (5 weeks ago)
Author:
themefic
Message:

update 3.5.32

Location:
ultimate-addons-for-contact-form-7
Files:
1174 added
3 edited

Legend:

Unmodified
Added
Removed
  • ultimate-addons-for-contact-form-7/trunk/inc/class-promo-notice.php

    r3321570 r3392458  
    2828        'December'
    2929    ];
    30     private $plugins_existes = ['ins', 'tf', 'beaf', 'ebef'];
     30    private $plugins_existes = ['ins', 'tf', 'beaf', 'ebef', 'uawpf', 'hydra'];
    3131
    3232    public function __construct() {
     
    7878                $end_date = isset($promo_banner['end_date']) ? $promo_banner['end_date'] : '';
    7979                $enable_side = isset($promo_banner['enable_status']) ? $promo_banner['enable_status'] : false;
    80             } 
     80            }
    8181            if(is_array($this->uacf7_promo_option) && strtotime($end_date) > time() && strtotime($start_date) < time()  && $enable_side == true){
    8282               
     
    8585            }
    8686
     87            $tf_widget_exists = get_option('tf_promo_widget_exists');
     88            $dashboard_widget = isset($this->uacf7_promo_option['dashboard_widget']) ? $this->uacf7_promo_option['dashboard_widget'] : [];
     89            if (
     90                !in_array($tf_widget_exists, $this->plugins_existes) &&
     91                isset($dashboard_widget['enable_status']) &&
     92                $dashboard_widget['enable_status'] == true
     93            ) {
     94                // Mark that one Themefic widget already exists
     95                update_option('tf_promo_widget_exists', 'uacf7');
     96
     97                add_action('init', [$this, 'init_dashboard_notice_widget']);
     98                add_action('wp_ajax_uacf7_dashboard_widget_dismiss', [$this, 'ajax_dashboard_widget_dismiss']);
     99            }
    87100
    88101            register_deactivation_hook( UACF7_PATH . 'ultimate-addons-for-contact-form-7.php', array($this, 'uacf7_promo_notice_deactivation_hook') );
     
    92105       
    93106    }
     107
     108    public function init_dashboard_notice_widget() {
     109
     110        // Ensure we’re only loading it on Dashboard
     111        add_action('wp_dashboard_setup', [$this, 'register_dashboard_notice_widget']);
     112    }
     113   
     114    public function register_dashboard_notice_widget() {
     115
     116        $dashboard_banner = isset($this->uacf7_promo_option['dashboard_widget'])
     117        ? $this->uacf7_promo_option['dashboard_widget']
     118        : [];
     119
     120        // Use API title if available, otherwise fallback
     121        $widget_title = !empty($dashboard_banner['title'])
     122        ? esc_html($dashboard_banner['title'])
     123        : __('Themefic Deals & Services', 'ultimate-addons-cf7');
     124
     125
     126        wp_add_dashboard_widget(
     127            'uacf7_promo_dashboard_widget',
     128            $widget_title,
     129            [$this, 'render_dashboard_notice_widget'],
     130            null, null, 'side', 'high'
     131        );
     132    }
     133
     134    public function render_dashboard_notice_widget() {
     135        $dashboard_widget = isset($this->uacf7_promo_option['dashboard_widget']) ? $this->uacf7_promo_option['dashboard_widget'] : [];
     136
     137        if (empty($dashboard_widget) || empty($dashboard_widget['enable_status'])) {
     138            echo '<p>' . esc_html__('No active widget promotion.', 'ultimate-addons-cf7') . '</p>';
     139            return;
     140        }
     141
     142        $highlight = isset($dashboard_widget['highlight']) ? $dashboard_widget['highlight'] : [];
     143        $links     = isset($dashboard_widget['links']) ? $dashboard_widget['links'] : [];
     144        $footer    = isset($dashboard_widget['footer']) ? $dashboard_widget['footer'] : [];
     145
     146        ?>
     147        <div class="uacf7-dashboard-widget" style="position:relative;">
     148            <?php if (!empty($dashboard_widget['dismiss_status'])) : ?>
     149                <button type="button" class="notice-dismiss uacf7-dashboard-dismiss" style="position:absolute; top:10px; right:10px;"></button>
     150            <?php endif; ?>
     151
     152            <?php if (!empty($highlight)) : ?>
     153                <div class="highlight">
     154                    <?php if (!empty($highlight['before_image'])) : ?>
     155                        <img class="before-img" src="<?php echo esc_url($highlight['before_image']); ?>" style="max-width:100%; height:auto;" alt="">
     156                    <?php endif; ?>
     157                    <div class="content">
     158                        <?php if (!empty($highlight['title'])) : ?>
     159                        <p style="font-weight:600; margin:5px 0;"><?php echo esc_html($highlight['title']); ?></p>
     160                        <?php endif; ?>
     161                        <?php if (!empty($highlight['button_text']) && !empty($highlight['button_url'])) : ?>
     162                            <a href="<?php echo esc_url($highlight['button_url']); ?>" target="_blank" class="button button-primary"><?php echo esc_html($highlight['button_text']); ?></a>
     163                        <?php endif; ?>
     164                    </div>
     165                     <?php if (!empty($highlight['after_image'])) : ?>
     166                        <img class="after-img" src="<?php echo esc_url($highlight['after_image']); ?>" style="max-width:100%; height:auto;" alt="">
     167                    <?php endif; ?>
     168                </div>
     169            <?php endif; ?>
     170
     171            <?php if (!empty($links)) : ?>
     172                <ul>
     173                    <?php foreach ($links as $link) : ?>
     174                        <li>
     175                            <a href="<?php echo esc_url($link['url']); ?>" target="_blank">
     176                                <?php if (!empty($link['tag'])) echo ' <span class="new-tag">' . esc_html($link['tag']) . '</span>'; ?>
     177                                <?php echo esc_html($link['text']); ?>
     178                            </a>
     179                        </li>
     180                    <?php endforeach; ?>
     181                </ul>
     182            <?php endif; ?>
     183
     184            <?php if (!empty($footer)) : ?>
     185                <div class="footer" style="display:flex; justify-content:space-between; margin-top:15px; font-size:13px;">
     186                    <?php if (!empty($footer['left'])) : ?>
     187                        <a href="<?php echo esc_url($footer['left']['url']); ?>" target="_blank"><?php echo esc_html($footer['left']['text']); ?>
     188                        <svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
     189                            <path d="M12.5 0H6.66667V1.25H10.3667L5.39167 6.225L6.275 7.10833L11.25 2.13333V5.83333H12.5V0ZM1.66667 0.833333C1.22464 0.833333 0.800716 1.00893 0.488155 1.32149C0.175595 1.63405 0 2.05797 0 2.5V10.8333C0 11.2754 0.175595 11.6993 0.488155 12.0118C0.800716 12.3244 1.22464 12.5 1.66667 12.5H10C10.442 12.5 10.8659 12.3244 11.1785 12.0118C11.4911 11.6993 11.6667 11.2754 11.6667 10.8333V8.33333H10.4167V10.8333C10.4167 10.9438 10.3728 11.0498 10.2946 11.128C10.2165 11.2061 10.1105 11.25 10 11.25H1.66667C1.55616 11.25 1.45018 11.2061 1.37204 11.128C1.2939 11.0498 1.25 10.9438 1.25 10.8333V2.5C1.25 2.38949 1.2939 2.28351 1.37204 2.20537C1.45018 2.12723 1.55616 2.08333 1.66667 2.08333H4.16667V0.833333H1.66667Z" fill="#2271B1"/>
     190                        </svg>
     191                        </a>
     192                    <?php endif; ?>
     193                    <?php if (!empty($footer['right'])) : ?>
     194                        <a href="<?php echo esc_url($footer['right']['url']); ?>" target="_blank"><?php echo esc_html($footer['right']['text']); ?>
     195                        <svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
     196                            <path d="M12.5 0H6.66667V1.25H10.3667L5.39167 6.225L6.275 7.10833L11.25 2.13333V5.83333H12.5V0ZM1.66667 0.833333C1.22464 0.833333 0.800716 1.00893 0.488155 1.32149C0.175595 1.63405 0 2.05797 0 2.5V10.8333C0 11.2754 0.175595 11.6993 0.488155 12.0118C0.800716 12.3244 1.22464 12.5 1.66667 12.5H10C10.442 12.5 10.8659 12.3244 11.1785 12.0118C11.4911 11.6993 11.6667 11.2754 11.6667 10.8333V8.33333H10.4167V10.8333C10.4167 10.9438 10.3728 11.0498 10.2946 11.128C10.2165 11.2061 10.1105 11.25 10 11.25H1.66667C1.55616 11.25 1.45018 11.2061 1.37204 11.128C1.2939 11.0498 1.25 10.9438 1.25 10.8333V2.5C1.25 2.38949 1.2939 2.28351 1.37204 2.20537C1.45018 2.12723 1.55616 2.08333 1.66667 2.08333H4.16667V0.833333H1.66667Z" fill="#2271B1"/>
     197                        </svg>
     198                        </a>
     199                    <?php endif; ?>
     200                </div>
     201            <?php endif; ?>
     202        </div>
     203
     204        <style>
     205            .uacf7-dashboard-widget {
     206                background: #fff;
     207                border-radius: 4px;
     208                padding: 0;
     209                font-family: Arial, sans-serif;
     210                font-size: 13px;
     211                color: #23282d;
     212            }
     213
     214            .uacf7-dashboard-widget .header {
     215                display: flex;
     216                align-items: center;
     217                justify-content: space-between;
     218                background: #f8f9fa;
     219                padding: 14px;
     220                border-bottom: 1px solid #ddd;
     221            }
     222
     223            .uacf7-dashboard-widget .highlight {
     224                display: flex;
     225                align-items: center;
     226                justify-content: space-between;
     227                background-color: #fff;
     228                border-bottom:1px solid #ccd0d4;
     229                padding:12px 0px;
     230                margin-bottom:8px;
     231                text-align:left;
     232                gap: 10px;
     233                padding-top: 0px;
     234            }
     235
     236            .uacf7-dashboard-widget .highlight .before-img {
     237                width: 58px;
     238                height: 58px;
     239                flex: 0 0 58px;
     240            }
     241            .uacf7-dashboard-widget .highlight .after-img {
     242                width: 100px;
     243                height: 60px;
     244                flex: 1;
     245                width: 100%;
     246            }
     247            .uacf7-dashboard-widget .highlight .content {
     248                display: flex;
     249                justify-content: space-between;
     250                align-items: flex-start;
     251                flex-direction: column;
     252            }
     253            .uacf7-dashboard-widget .highlight .content p{
     254                color: #1D2327;
     255                font-family: "Roboto", sans-serif;
     256                font-size: 13px;
     257                font-weight: 500;
     258                line-height: 19.6px;
     259            }
     260            .uacf7-dashboard-widget .highlight .content .button{
     261                height: 30px;
     262                color: #FFF;
     263                font-family: "Roboto", sans-serif;
     264                font-size: 13px;
     265                font-weight: 500;
     266                border-radius: 3px;
     267                background: #2271B1;
     268            }
     269
     270            .uacf7-dashboard-widget ul li a {
     271                color: #2271B1;
     272                font-family: "Roboto", sans-serif;
     273                font-size: 13px;
     274                font-weight: 400;
     275                line-height: 120%;
     276            }
     277
     278            .uacf7-dashboard-widget .new-tag {
     279                padding: 3px 6px;
     280                border-radius: 3px;
     281                background-color: #0A875A;
     282                font-family: "Roboto", sans-serif;
     283                font-size: 10.5px;
     284                font-weight: 500;
     285                line-height: 12.6px;
     286                line-height: 12.6px;
     287                color: #fff;
     288                text-transform: uppercase;
     289            }
     290
     291            .uacf7-dashboard-widget .footer {
     292                display: flex;
     293                justify-content: space-between;
     294                align-items: center;
     295                border-top: 1px solid #ddd;
     296                padding: 10px 0px;
     297                background: #fff;
     298            }
     299
     300            .uacf7-dashboard-widget .footer a {
     301                text-decoration: none;
     302                font-weight: 500;
     303                color: #2271B1;
     304                font-family: "Roboto", sans-serif;
     305                font-size: 13px;
     306                font-weight: 400;
     307                line-height: 15.6px;
     308            }
     309
     310            .uacf7-dashboard-widget .footer a svg {
     311                padding-left: 4px;
     312            }
     313
     314        </style>
     315
     316        <script>
     317        jQuery(document).ready(function($){
     318            $(document).on('click', '.uacf7-dashboard-dismiss', function(){
     319                $(this).closest('.uacf7-dashboard-widget').fadeOut(300);
     320                $.post(ajaxurl, { action: 'uacf7_dashboard_widget_dismiss' });
     321            });
     322        });
     323        </script>
     324        <?php
     325    }
     326
     327
     328
     329    public function ajax_dashboard_widget_dismiss() {
     330        // Dismiss control - 7 days
     331        update_option('uacf7_dashboard_widget_dismissed', time() + (86400 * 7));
     332        wp_die();
     333    }
    94334
    95335    public function uacf7_get_api_response(){
     
    216456
    217457        $uacf7_promo_option = get_option( 'uacf7_promo__schudle_option' );
    218     $restart = isset($uacf7_promo_option['dashboard_banner']['restart']) && $uacf7_promo_option['dashboard_banner']['restart'] != false ? $uacf7_promo_option['dashboard_banner']['restart'] : false;
     458        $restart = isset($uacf7_promo_option['dashboard_banner']['restart']) && $uacf7_promo_option['dashboard_banner']['restart'] != false ? $uacf7_promo_option['dashboard_banner']['restart'] : false;
    219459        if($restart == false){
    220460            update_option( 'tf_dismiss_admin_notice', strtotime($uacf7_promo_option['end_date']) );
     
    302542        delete_option('tf_promo_notice_exists');
    303543        delete_option('uacf7_promo__schudle_start_from');
     544        delete_option('tf_promo_widget_exists');
    304545    }
    305546 
  • ultimate-addons-for-contact-form-7/trunk/readme.txt

    r3379639 r3392458  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 3.5.31
     7Stable tag: 3.5.32
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    1010
    11 50+ Essential Addons for Contact Form 7 - Conditional Fields, Multi Step Forms, Redirection, Templates, Columns, WooCommerce, Mailchimp & more
     1150+ Essential Addons for Contact Form 7 - Conditional Fields, Multi Step Forms, Redirection, Columns, WooCommerce, Mailchimp & more
    1212
    1313== Description ==
     
    482482== Changelog ==
    483483
     484= 3.5.32 - 09/11/2025 =
     485
     486- Updated: Information in readme.txt file.
     487- Improved: System stability and performance.
     488- Compatibility: Fully compatible with Contact Form 7 (v6.1.3).
     489
    484490= 3.5.31 - 16/10/2025 =
    485491
  • ultimate-addons-for-contact-form-7/trunk/ultimate-addons-for-contact-form-7.php

    r3379639 r3392458  
    44 * Plugin URI: https://cf7addons.com/
    55 * Description: 50+ Essential Addons for Contact Form 7 - Conditional Fields, Multi Step Forms, Redirection, Form Templates, Columns, WooCommerce, Mailchimp and more, all in one.
    6  * Version: 3.5.31
     6 * Version: 3.5.32
    77 * Author: Themefic
    88 * Author URI: https://themefic.com/
     
    3131        define( 'UACF7_PATH', plugin_dir_path( __FILE__ ) );
    3232
    33         define( 'UACF7_VERSION', '3.5.31' );
     33        define( 'UACF7_VERSION', '3.5.32' );
    3434
    3535        if ( ! class_exists( 'Appsero\Client' ) ) {
Note: See TracChangeset for help on using the changeset viewer.