WordPress.org

Plugin Directory

Changeset 1240469


Ignore:
Timestamp:
09/08/15 09:38:53 (17 months ago)
Author:
lucymtc
Message:

Moved function that updates plugin version number in DB from activation hook

Location:
simple-follow-me-social-buttons-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • simple-follow-me-social-buttons-widget/trunk/readme.txt

    r1240450 r1240469  
    55Requires at least: 3.8 
    66Tested up to: 4.3 
    7 Stable tag: 3.3.2 
     7Stable tag: 3.3.3 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    121121== Changelog == 
    122122 
     123= 3.3.3 = 
     124* Moved function that updates plugin version number in DB from activation hook. 
     125 
    123126= 3.3.2 = 
    124127* Checked compatibility with WordPress 4.3 
  • simple-follow-me-social-buttons-widget/trunk/simple-follow-me-social-buttons-widget.php

    r1240450 r1240469  
    33Plugin Name: Simple Follow Me Social Buttons Widget 
    44Description: Widget to add some of the most popular follow me social buttons. Retina ready. 
    5 Version:     3.3.2 
     5Version:     3.3.3 
    66Author:      Lucy Tomás 
    77Author URI:  https://wordpress.org/support/profile/lucymtc 
     
    4141     
    4242        public $default_options = array(); 
     43        public $plugin_vesion   = null; 
     44 
    4345         
    4446        /** 
     
    5961                self::$instance->load_textdomain(); 
    6062                self::$instance->variables(); 
     63                self::$instance->set_plugin_version(); 
    6164            } 
    6265             
     
    7275         private function __construct () { 
    7376 
    74             register_activation_hook( __FILE__, array($this, 'activation') ); 
    75           
    76             $this->default_options = array(); 
     77            $this->default_options = array(); 
    7778             
    7879            add_action( 'widgets_init', array('Sfmsb_Widget', 'register_widgets') ); 
     
    103104 
    104105        /** 
    105           * activation 
     106          * set_plugin_version 
    106107          *  
    107           * @since 3.3.2 
    108           */ 
    109  
    110          public function activation() { 
    111  
    112             $installed_version = get_option( 'sfmsb_version' ); 
     108          * @since 3.3.3 
     109          */ 
     110 
     111         public function set_plugin_version() { 
     112 
     113            $this->plugin_vesion = get_option( 'sfmsb_version' ); 
    113114 
    114115             
    115             if( $installed_version == false || $installed_version < '3.3.2' ) { 
     116            if( $this->plugin_vesion == false || $this->plugin_vesion < '3.3.2' ) { 
    116117                delete_option('sfmsb_specificfeeds_viewed_notice'); 
    117118            } 
    118119 
    119             if( $installed_version != SFMSB_PLUGIN_VERSION ) { 
     120            if( $this->plugin_vesion != SFMSB_PLUGIN_VERSION ) { 
     121 
    120122                update_option( 'sfmsb_version', SFMSB_PLUGIN_VERSION ); 
     123                $this->plugin_vesion = SFMSB_PLUGIN_VERSION; 
     124 
    121125            } 
    122126     
     
    134138            if( !defined('SFMSB_PLUGIN_URL') )      { define('SFMSB_PLUGIN_URL', plugin_dir_url( __FILE__ ));  } 
    135139            if( !defined('SFMSB_PLUGIN_FILE') )     { define('SFMSB_PLUGIN_FILE',  __FILE__ );  } 
    136             if( !defined('SFMSB_PLUGIN_VERSION') )  { define('SFMSB_PLUGIN_VERSION', '3.3.2');  }  
     140            if( !defined('SFMSB_PLUGIN_VERSION') )  { define('SFMSB_PLUGIN_VERSION', '3.3.3');  }  
    137141             
    138142          } 
Note: See TracChangeset for help on using the changeset viewer.