Plugin Directory

Changeset 1782977


Ignore:
Timestamp:
12/07/2017 10:43:11 PM (8 years ago)
Author:
d3wp
Message:

version 1.1.4

Location:
wp-snow-effect/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-snow-effect/trunk/README.txt

    r1780638 r1782977  
    66Tested up to: 4.9
    77Requires PHP: 5.4
    8 Stable tag: 1.1.3
     8Stable tag: 1.1.4
    99License:GPL2
    1010 
     
    1818This WP plugin uses jSnow JQuery plugin (2kb only) and no images.
    1919
     20
    2021*   [Upgrade to the WP Snow Effect Pro Version Now! »](http://www.wpmaniax.com/wp-snow-effect-pro/?utm_source=wordpress.org&utm_medium=link&utm_campaign=wp-snow-effect-pro-from-wordpress.org "WP Snow Effect Pro Version")
    2122*   For more information take a look at the [video preview](http://www.wpmaniax.com/wp-snow-effect-pro/?utm_source=wordpress.org&utm_medium=link&utm_campaign=wp-snow-effect-video-from-wordpress.org "WP Snow Effect Video Preview")
     23
    2224
    2325> <strong>WP Snow Effect PRO</strong><br>
     
    5759== Changelog ==
    5860
     61= 1.1.4 =
     62* box with review request added
     63
    5964= 1.1.3 =
    6065* minor changes in settings
     
    8590
    8691== Upgrade Notice ==
     92
     93= 1.1.4 =
     94* box with review request added
    8795
    8896= 1.1.3 =
     
    117125 
    118126== Feedback ==
    119 For more information and comments please visit the [WP Snow Effect WP plugin](http://www.wpmaniax.com/wp-snow-effect-pro/?utm_source=wordpress.org&utm_medium=link&utm_campaign=wp-snow-effect-bottom-video-from-wordpress.org "WP Snow Effect Video Preview") home
     127For more information and comments please visit the [WP Snow Effect WP plugin](http://www.wpmaniax.com/seasonal-plugins/) home
  • wp-snow-effect/trunk/admin/class-wp-snow-effect-admin.php

    r1308481 r1782977  
    3232     */
    3333    private $plugin_name;
     34    public $loader;
    3435
    3536    /**
     
    127128        }
    128129    }
     130
     131    public function wp_snow_effect_check_installation_date()
     132    {
     133        $nobug = "";
     134        $nobug = get_option('wpse_no_bug');
     135
     136        if (!$nobug) {
     137
     138            $install_date = get_option('wp_snow_effect_activation_date');
     139            $past_date = strtotime('-7 days');
     140
     141            if ($past_date >= $install_date) {
     142
     143                //add_action( 'admin_notices', 'wp_snow_effect_display_admin_notice' );
     144                //$this->loader->add_action('admin_notices', $this, 'wp_snow_effect_display_admin_notice');
     145                $reviewurl = 'https://wordpress.org/support/plugin/wp-snow-effect/reviews/#new-post';
     146                $nobugurl = get_admin_url() . '?wpsenobug=1';
     147
     148                $notices = get_option('wp_snow_effect_admin_notices', array());
     149                $str = "You have been using <b>WP Snow Effect</b> plugin for a week now, do you like it? If so, please leave us a review with your feedback! <a href=\"" . $reviewurl . "\" target=\"_blank\">Leave A Review</a> | <a href=\"" . $nobugurl . "\">Leave Me Alone</a>";
     150                if(!in_array($str,$notices)) $notices[] = $str;
     151                update_option('wp_snow_effect_admin_notices', $notices);
     152
     153            }
     154        }
     155    }
     156
     157    public function wp_snow_effect_set_no_bug() {
     158        $nobug = "";
     159
     160        if ( isset( $_GET['wpsenobug'] ) ) {
     161            $nobug = esc_attr( $_GET['wpsenobug'] );
     162        }
     163
     164        if ( 1 == $nobug ) {
     165
     166            update_option( 'wpse_no_bug', TRUE );
     167            $notices = get_option('wp_snow_effect_admin_notices');
     168
     169            $reviewurl = 'https://wordpress.org/support/plugin/wp-snow-effect/reviews/#new-post';
     170            $nobugurl = get_admin_url() . '?wpsenobug=1';
     171            $str = "You have been using <b>WP Snow Effect</b> plugin for a week now, do you like it? If so, please leave us a review with your feedback! <a href=\"" . $reviewurl . "\" target=\"_blank\">Leave A Review</a> | <a href=\"" . $nobugurl . "\">Leave Me Alone</a>";
     172            if(in_array($str,$notices)) {
     173                $notices = array_diff($notices,[$str]);
     174                update_option('wp_snow_effect_admin_notices', $notices);
     175            }
     176
     177        }
     178    }
     179
    129180}
  • wp-snow-effect/trunk/includes/class-wp-snow-effect-activator.php

    r1308481 r1782977  
    3636        $notices[]= "Please click <a href=\"".admin_url()."options-general.php?page=snoweffect-settings\"><b>here</b></a> to configure <b>WP Snow Effect</b>.";
    3737        update_option('wp_snow_effect_admin_notices', $notices);
     38
     39        $now = strtotime( "now" );
     40        update_option( 'wp_snow_effect_activation_date', $now );
    3841    }
    3942
  • wp-snow-effect/trunk/includes/class-wp-snow-effect.php

    r1308481 r1782977  
    163163        $plugin_admin = new Wp_Snow_Effect_Admin($this->get_plugin_name(), $this->get_version());
    164164        $plugin_admin->wpsf = $this->wpsf;
     165        $plugin_admin->loader = $this->loader;
    165166
    166167        $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
     
    168169        $this->loader->add_action('admin_menu', $plugin_admin, 'init_settings');
    169170        $this->loader->add_action('admin_notices', $plugin_admin, 'admin_notices');
     171        $this->loader->add_action('admin_init', $plugin_admin,'wp_snow_effect_set_no_bug',25);
     172        $this->loader->add_action('admin_init', $plugin_admin,'wp_snow_effect_check_installation_date',1);
    170173    }
    171174
  • wp-snow-effect/trunk/wp-snow-effect.php

    r1774205 r1782977  
    1717 * Plugin URI:        http://www.wpmaniax.com/seasonal-plugins
    1818 * Description:       Add nice looking animation effect of falling snow to your Wordpress site and enjoy winter.
    19  * Version:           1.1.3
     19 * Version:           1.1.4
    2020 * Author:            WPManiax
    2121 * Author URI:        http://www.wpmaniax.com
     
    5252register_deactivation_hook( __FILE__, 'deactivate_wp_snow_effect' );
    5353
     54
    5455/**
    5556 * The core plugin class that is used to define internationalization,
Note: See TracChangeset for help on using the changeset viewer.