Plugin Directory

Changeset 2507851


Ignore:
Timestamp:
04/02/2021 06:19:17 AM (5 years ago)
Author:
Halloween Blog
Message:

Halloween

File:
1 edited

Legend:

Unmodified
Added
Removed
  • halloween-countdown/trunk/halloween-countdown.php

    r2507847 r2507851  
    66Author: Halloween Blog
    77Author URI: https://halloweenlove.com/
    8 Version: 2021
     8Version: 2021.1
    99Requires at least: 5.0
    1010License: https://www.gnu.org/licenses/gpl.html
     
    1414    http_response_code( 404 );
    1515    die();
     16}
     17
     18add_action( 'admin_notices', 'hcount_admin_notice' );
     19function hcount_admin_notice() {
     20    $user_id = get_current_user_id();
     21    if ( !get_user_meta( $user_id, 'hcount_notice_dismissed_1' ) && current_user_can( 'manage_options' ) )
     22        echo '<div class="notice notice-info"><p>' . __( '<big><strong>🎃 Happy Halloween!</strong></big> Help support us by <a href="https://halloweenlove.com/donate" class="button-primary" target="_blank">Making a Donation</a>', 'hcount' ) . '<a href="?notice-dismiss" class="alignright">Dismiss</a></p></div>';
     23}
     24
     25add_action( 'admin_init', 'hcount_notice_dismissed' );
     26function hcount_notice_dismissed() {
     27    $user_id = get_current_user_id();
     28    if ( isset( $_GET['notice-dismiss'] ) )
     29        add_user_meta( $user_id, 'hcount_notice_dismissed_1', 'true', true );
    1630}
    1731
Note: See TracChangeset for help on using the changeset viewer.