Plugin Directory

Changeset 3125092


Ignore:
Timestamp:
07/25/2024 09:12:05 AM (17 months ago)
Author:
woodyhayday
Message:

pre-v2 release notifications and stable version update

Location:
project-pages
Files:
55 added
2 edited

Legend:

Unmodified
Added
Removed
  • project-pages/trunk/ProjectPages.php

    r3049219 r3125092  
    44Plugin URI: http://woodyhayday.com/projects/project-pages/
    55Description: Project Pages is the simplest way to share your projects beautifully.
    6 Version: 1.2.3
     6Version: 1.2.4
    77Author: <a href="http://woodyhayday.com">Woody Hayday</a>
    88*/
     
    709709
    710710    ?>
     711
     712        <div class="notice notice-info">
     713            <p><strong><?php _e('Project Pages v2.0 big launch release is imminent!', 'project-pages'); ?></strong></p>
     714            <p>Hold onto your hat, v2.0 of Project Pages will be released in the next two weeks, check out <a href="https://projectpages.io" target="_blank">ProjectPages.io</a> to see the full reboot details. <a href="https://projectpages.io/join/" target="_blank">Join the waitlist here</a>.</p>
     715        </div>
    711716   
    712717        <p id="sbDesc"><?php _e('Below you can choose global settings for ProjectPages.','projectpages'); ?></p>
     
    11411146}
    11421147
    1143 #================== / Useful Functions ?>
     1148#================== / Useful Functions
     1149
     1150
     1151
     1152
     1153// v2.0 announcement
     1154add_action('admin_notices', 'ppv2_admin_notification');
     1155
     1156function ppv2_admin_notification() {
     1157
     1158    // Check if the user has dismissed the notification
     1159    if (!get_user_meta(get_current_user_id(), 'ppv2_admin_notification_dismissed', true)) {
     1160        ?>
     1161        <div class="notice notice-warning is-dismissible">
     1162            <p><strong><?php _e('Project Pages v2.0 big launch release is imminent!', 'project-pages'); ?></strong></p>
     1163            <p>Hold onto your hat, v2.0 of Project Pages will be released in the next two weeks, check out <a href="https://projectpages.io" target="_blank">ProjectPages.io</a> to see the full reboot details. <a href="https://projectpages.io/join/" target="_blank">Join the waitlist here</a>.</p>
     1164        </div>
     1165        <?php
     1166    }
     1167
     1168}
     1169
     1170// Hook to handle the dismissal of the admin notice
     1171add_action('wp_ajax_dismiss_ppv2_admin_notification', 'dismiss_ppv2_admin_notification');
     1172
     1173function dismiss_ppv2_admin_notification() {
     1174    if (isset($_POST['dismiss']) && $_POST['dismiss'] === 'true') {
     1175        // Set a user meta to mark the notification as dismissed
     1176        update_user_meta(get_current_user_id(), 'ppv2_admin_notification_dismissed', true);
     1177    }
     1178    wp_die(); // This is required to terminate immediately and return a proper response
     1179}
     1180
     1181add_action('admin_enqueue_scripts', 'enqueue_ppv2_admin_notification_script');
     1182
     1183function enqueue_ppv2_admin_notification_script($hook) {
     1184    // Only enqueue on admin pages
     1185    wp_enqueue_script('ppv2-admin-notification', plugin_dir_url(__FILE__) . 'js/ppv2-admin-notification.js', array('jquery'), null, true);
     1186    wp_localize_script('ppv2-admin-notification', 'adminNotification', array(
     1187        'ajax_url' => admin_url('admin-ajax.php'),
     1188        'nonce'    => wp_create_nonce('dismiss_ppv2_admin_notification_nonce'),
     1189    ));
     1190}
     1191
  • project-pages/trunk/readme.txt

    r3049219 r3125092  
    55Requires at least: 3.0.1
    66Tested up to: 6.4.3
    7 Stable tag: trunk
     7Stable tag: 1.2.4
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1212
    1313== Description ==
     14
     15###v2.0 Release Imminent!
     16
     17Hold onto your hat, v2.0 of Project Pages will be released in the next two weeks, check out [ProjectPages.io](https://projectpages.io) to see the full reboot details.
     18
     19[Join the waitlist to get emailed when it's live!](https://projectpages.io/join/)
    1420
    1521###Project Pages are beautiful, no-nonsense portfolio pages for WordPress.
Note: See TracChangeset for help on using the changeset viewer.