Changeset 2507851
- Timestamp:
- 04/02/2021 06:19:17 AM (5 years ago)
- File:
-
- 1 edited
-
halloween-countdown/trunk/halloween-countdown.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
halloween-countdown/trunk/halloween-countdown.php
r2507847 r2507851 6 6 Author: Halloween Blog 7 7 Author URI: https://halloweenlove.com/ 8 Version: 2021 8 Version: 2021.1 9 9 Requires at least: 5.0 10 10 License: https://www.gnu.org/licenses/gpl.html … … 14 14 http_response_code( 404 ); 15 15 die(); 16 } 17 18 add_action( 'admin_notices', 'hcount_admin_notice' ); 19 function 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 25 add_action( 'admin_init', 'hcount_notice_dismissed' ); 26 function 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 ); 16 30 } 17 31
Note: See TracChangeset
for help on using the changeset viewer.