Plugin Directory

Changeset 789132


Ignore:
Timestamp:
10/17/2013 06:36:33 AM (12 years ago)
Author:
titopandub
Message:

Add admin notice

Location:
evergreen-post-tweeter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • evergreen-post-tweeter

    • Property svn:ignore set to
      trunk/Rafa.game
  • evergreen-post-tweeter/trunk/ept-admin.php

    r761345 r789132  
    388388        //tweet now clicked
    389389        elseif (isset($_POST['tweet'])) {
    390             update_option('ept_opt_last_update',time() );
     390            update_option( 'ept_opt_last_update', current_time('timestamp', 0) );
    391391            $tweet_msg = ept_opt_tweet_old_post();
    392392            print('
  • evergreen-post-tweeter/trunk/evergreen.php

    r762001 r789132  
    55Description: Evergreen Post Tweeter enables you to automatically tweet out links to old posts based upon a tag or tags.
    66Author: Tom Ewer
    7 Version: 1.8.3
     7Version: 1.8.4
    88Author URI: http://www.leavingworkbehind.com/about-me/
    99*/ 
     
    160160    return $links;
    161161}
     162
     163/* Display a notice that can be dismissed */
     164add_action('admin_notices', 'ept_second_admin_notice');
     165function ept_second_admin_notice() {
     166    global $current_user ;
     167    $user_id = $current_user->ID;
     168    /* Check that the user hasn't already clicked to ignore the message */
     169    if ( ! get_user_meta($user_id, '_ept_lwb_plugin') ) {
     170        echo '<div class="updated"><p>';
     171        printf( __('Thank you for installing Evergreen Post Tweeter! It is the brainchild of Tom Ewer, the founder of') );
     172        printf( __(' <a href="%1$s">Leaving Work Behind</a> '), 'http://www.leavingworkbehind.com/?utm_source=plugins&utm_medium=banner&utm_campaign=plugins' );
     173        printf( __('-- a community for people who want to build successful online businesses.') );
     174        printf( __('<br/><br/><a class="button" href="%1$s">Dismiss</a> '), '?ept_lwb_dismiss=0' );
     175        echo "</p></div>";
     176    }
     177}
     178
     179add_action('admin_init', 'ept_lwb_dismiss');
     180function ept_lwb_dismiss() {
     181    global $current_user;
     182    $user_id = $current_user->ID;
     183    /* If user clicks to ignore the notice, add that to their user meta */
     184    if ( isset($_GET['ept_lwb_dismiss']) && '0' == $_GET['ept_lwb_dismiss'] ) {
     185        add_user_meta($user_id, '_ept_lwb_plugin', 'true', true);
     186    } else if ( isset($_GET['ept_lwb_dismiss']) && '1' == $_GET['ept_lwb_dismiss'] ) {
     187        delete_user_meta($user_id, '_ept_lwb_plugin');
     188    }
     189}
  • evergreen-post-tweeter/trunk/readme.txt

    r762001 r789132  
    66Requires at least: 3.5
    77Tested up to: 3.6
    8 Stable tag: 1.8.3
     8Stable tag: 1.8.4
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5353
    5454== Upgrade Notice ==
     55
     56= 1.8.4 =
     57* Add admin notice
    5558
    5659= 1.8.2 =
     
    104107== Changelog ==
    105108
     109= 1.8.4 =
     110* Add admin notice
     111
    106112= 1.8.2 =
    107113* Fix bug on new scheduling feature
Note: See TracChangeset for help on using the changeset viewer.