Plugin Directory

Changeset 3812428


Ignore:
Timestamp:
11/19/2026 08:29:55 PM (12 hours ago)
Author:
getbookivoapp
Message:

Release 1.3.5: adds a dismissible review invitation notice for admins (shown on plugin screens after 3 days with at least one booking)

Location:
slotvexa-course-booking-calendar/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • slotvexa-course-booking-calendar/trunk/readme.txt

    r3790637 r3812428  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.3.4
     7Stable tag: 1.3.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    108108== Changelog ==
    109109
     110= 1.3.5 =
     111* Added a one-time, dismissible review invitation on the plugin's own admin screens, shown only after the plugin is in real use (3+ days and at least one booking).
     112
    110113= 1.3.4 =
    111114* Short description refresh - leads with appointments and events.
    … …  
    148151== Upgrade Notice ==
    149152
     153= 1.3.5 =
     154Adds a one-time, dismissible review invitation in the plugin admin. No booking behaviour changes.
     155
    150156= 1.3.4 =
    151157Short description refresh only.
  • slotvexa-course-booking-calendar/trunk/slotvexa-course-booking-calendar.php

    r3790637 r3812428  
    33 * Plugin Name: Slotvexa Booking Calendar
    44 * Description: Smart Appointments, Events Booking & Scheduling Calendar Solution. Booking calendar for courses, classes, appointments and events, with category-based booking forms (Business / Individuals / Children), live seat availability, sold-out waitlist, configurable GST/tax, and manual PayNow QR payment with pending-verification bookings.
    5  * Version: 1.3.4
     5 * Version: 1.3.5
    66 * Author: Junaid Javaid
    77 * License: GPL-2.0-or-later
    … …  
    1414if (!defined('ABSPATH')) { exit; }
    1515
    16 define('SLOTVEXA_VERSION', '1.3.4');
     16define('SLOTVEXA_VERSION', '1.3.5');
    1717define('SLOTVEXA_URL', plugin_dir_url(__FILE__));
    1818
    … …  
    223223register_deactivation_hook(__FILE__, function () { wp_clear_scheduled_hook('slotvexa_release_holds'); });
    224224
     225/* v1.3.5: one-time, dismissible review invitation. Shows ONLY on Slotvexa's own
     226   admin screens, only after real use (installed 3+ days AND at least one booking),
     227   and never again once dismissed. HELD BACK from release until the plugin reaches
     228   10+ active installs on WordPress.org (site owner's instruction, 2026-11-11). */
     229add_action('admin_notices', function () {
     230    if (!current_user_can('manage_options')) { return; }
     231    if (get_option('slotvexa_review_notice_dismissed')) { return; }
     232    $page = isset($_GET['page']) ? sanitize_key(wp_unslash($_GET['page'])) : '';
     233    if (strpos($page, 'slotvexa-') !== 0) { return; }
     234    $installed = (int) get_option('slotvexa_installed_at', 0);
     235    if (!$installed) { update_option('slotvexa_installed_at', time()); return; }
     236    if (time() - $installed < 3 * DAY_IN_SECONDS) { return; }
     237    global $wpdb;
     238    $count = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}slotvexa_bookings");
     239    if ($count < 1) { return; }
     240    $dismiss = wp_nonce_url(admin_url('admin-post.php?action=slotvexa_dismiss_review_notice'), 'slotvexa_dismiss_review_notice');
     241    echo '<div class="notice notice-info"><p><strong>Slotvexa Booking Calendar:</strong> glad it is working for you. A quick 5-star review helps other site owners find it and keeps development going. '
     242        . '<a href="https://wordpress.org/support/plugin/slotvexa-course-booking-calendar/reviews/#new-topic" target="_blank" rel="noopener">Leave a review</a> &nbsp;·&nbsp; '
     243        . '<a href="' . esc_url($dismiss) . '">Dismiss</a></p></div>';
     244});
     245add_action('admin_post_slotvexa_dismiss_review_notice', function () {
     246    if (!current_user_can('manage_options')) { wp_die('Not allowed'); }
     247    check_admin_referer('slotvexa_dismiss_review_notice');
     248    update_option('slotvexa_review_notice_dismissed', 1);
     249    wp_safe_redirect(wp_get_referer() ?: admin_url('admin.php?page=slotvexa-bookings'));
     250    exit;
     251});
     252
    225253/* v1.2: run the table builder again when the stored DB version is behind (adds new tables/columns on update) */
    226254add_action('plugins_loaded', function () {
Note: See TracChangeset for help on using the changeset viewer.