Plugin Directory

Changeset 3402359


Ignore:
Timestamp:
11/25/2025 09:45:01 AM (3 months ago)
Author:
envothemes
Message:

v1.9.13

Location:
envo-extra/tags/1.9.13
Files:
15 deleted
62 copied

Legend:

Unmodified
Added
Removed
  • envo-extra/tags/1.9.13/envo-extra.php

    r3397032 r3402359  
    44 * Plugin URI: https://envothemes.com/
    55 * Description: Extra addon for EnvoThemes Themes
    6  * Version: 1.9.12
     6 * Version: 1.9.13
    77 * Author: EnvoThemes
    88 * Author URI: https://envothemes.com/
  • envo-extra/tags/1.9.13/lib/envothemes-demo-import/includes/notify/notify.php

    r3272327 r3402359  
    364364    printf( '<div class="error"><p>%1$s</p>%2$s</div>', $message, $button );
    365365}
     366
     367if ( ! defined( 'ABSPATH' ) ) {
     368    exit;
     369}
     370
     371/**
     372 * Display the dismissible admin notice.
     373 */
     374function envo_extra_admin_notice_promo() {
     375
     376    // Unique notice ID
     377    $notice_id = 'envo_extra_admin_notice_promo';
     378   
     379    // Set expiration time (end of 2025)
     380    $expire = strtotime('2025-12-31 23:59:59');
     381
     382    // Stop running after this date
     383    if ( time() > $expire ) {
     384        return;
     385    }
     386   
     387    if(
     388        (defined('ENVO_ROYAL_PRO_CURRENT_VERSION')) ||
     389        (defined('ENTR_PRO_CURRENT_VERSION')) ||
     390        (defined('ENVO_STOREFRONT_PRO_CURRENT_VERSION')) ||
     391        (defined('ENVO_SHOP_PRO_CURRENT_VERSION')) ||
     392        (defined('ENVO_ONLINE_STORE_PRO_CURRENT_VERSION')) ||
     393        (defined('ENVO_SHOPPER_PRO_CURRENT_VERSION')) ||
     394        (defined('ENVO_MARKETPLACE_PRO_CURRENT_VERSION')) ||
     395        (defined('ENWOO_PRO_CURRENT_VERSION')) ||
     396        (defined('ENVO_ECOMMERCE_PRO_CURRENT_VERSION')) ||
     397        (defined('ENVO_MAGAZINE_PRO_CURRENT_VERSION'))
     398    )   {return;}
     399
     400    // Get the dismissal timestamp
     401    $dismissed_timestamp = get_user_meta( get_current_user_id(), $notice_id, true );
     402
     403    // Only hide if dismissed within the last 2 days (172800 seconds)
     404    if ( $dismissed_timestamp && ( time() - intval( $dismissed_timestamp ) < 2 * DAY_IN_SECONDS ) ) {
     405        return;
     406    }
     407
     408    // Create dismissal URL with nonce
     409    $dismiss_url = wp_nonce_url(
     410        add_query_arg(
     411            array(
     412                'envo-extra-dismiss' => $notice_id,
     413            )
     414        ),
     415        'envo_extra_dismiss_' . $notice_id
     416    );
     417    ?>
     418    <div class="notice notice-info is-dismissible envo-extra-notice" data-dismiss-url="<?php echo esc_url( $dismiss_url ); ?>">
     419        <p><span class="dashicons dashicons-tag" style="color:red"></span>
     420            <?php
     421            echo sprintf(
     422                    esc_html__('Exclusive EnvoThemes SALE. %1$s Use discount coupon: %2$s', 'envothemes-demo-import'),
     423                    '<a href="https://envothemes.com/" target="_blank"><b>Upgrade Now and Save 20%.</b></a>',
     424                    '<b>Envo2025</b> <a href="https://envothemes.com/" target="_blank">Visit Site</a>')
     425            ?>
     426        </p>
     427    </div>
     428
     429    <script>
     430        (function($){
     431            $(document).on('click', '.envo-extra-notice .notice-dismiss', function () {
     432                var url = $(this).closest('.envo-extra-notice').data('dismiss-url');
     433                $.get(url);
     434            });
     435        })(jQuery);
     436    </script>
     437    <?php
     438}
     439add_action( 'admin_notices', 'envo_extra_admin_notice_promo' );
     440
     441
     442/**
     443 * Handle notice dismissal.
     444 */
     445function envo_extra_handle_dismiss() {
     446
     447    if ( ! isset( $_GET['envo-extra-dismiss'] ) ) {
     448        return;
     449    }
     450
     451    $notice_id = sanitize_key( $_GET['envo-extra-dismiss'] );
     452
     453    // Verify nonce
     454    if (
     455        ! isset( $_GET['_wpnonce'] ) ||
     456        ! wp_verify_nonce( $_GET['_wpnonce'], 'envo_extra_dismiss_' . $notice_id )
     457    ) {
     458        return;
     459    }
     460
     461    // Save current time as dismissal timestamp
     462    update_user_meta( get_current_user_id(), $notice_id, time() );
     463}
     464add_action( 'admin_init', 'envo_extra_handle_dismiss' );
  • envo-extra/tags/1.9.13/readme.txt

    r3397032 r3402359  
    55Requires at Least: 4.9
    66Tested Up To: 6.9
    7 Stable tag: 1.9.12
     7Stable tag: 1.9.13
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    3131
    3232== Changelog ==
     33
     34= 1.9.13 =
     35* Updated code
    3336
    3437= 1.9.12 =
Note: See TracChangeset for help on using the changeset viewer.