Changeset 654925
- Timestamp:
- 01/18/2013 03:50:44 PM (13 years ago)
- Location:
- wpdevtool/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wpdevtool.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpdevtool/trunk/readme.txt
r654882 r654925 7 7 Requires at least: 3.0.1 8 8 Tested up to: 3.5 9 Stable tag: 0.0. 39 Stable tag: 0.0.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 54 54 == Changelog == 55 55 56 = 0.0.4 = 57 * Fix bug "updating plugin" cause maintenance message and email missing error 58 56 59 = 0.0.3 = 57 60 * Fix console showing 1 error with no errors bug -
wpdevtool/trunk/wpdevtool.php
r654882 r654925 4 4 Plugin URI: https://github.com/micc83/WpDevTool 5 5 Description: A simple tool to develop on WordPress platform... 6 Version: 0.0. 36 Version: 0.0.4 7 7 Author: Alessandro Benoit 8 8 Author URI: http://codeb.it … … 45 45 46 46 /** 47 * Set default option values on plugin activation47 * Set default option values on first install / version change 48 48 * 49 49 * @since 0.0.2 … … 51 51 function wpdevtool_set_default_options_value() { 52 52 53 if ( false === get_option( 'wpdevtool_version' ) ) { 54 update_option( 'wpdevtool_version', plugin_get_version() ); 55 } elseif ( version_compare( plugin_get_version(), get_option( 'wpdevtool_version' ), '<=' ) ) { 56 return; 57 } else { 58 update_option( 'wpdevtool_version', plugin_get_version() ); 59 } 60 61 // The code from here on is executed only on activation and version change: 62 53 63 if ( !get_option( 'wpdevtool_maintenance_message' ) ) 54 64 update_option( 'wpdevtool_maintenance_message', sprintf( __( '%s is under maintenance at the moment. Contact us at %s', 'wpdevtool' ), '[name]', '[email]' ) ); … … 60 70 61 71 } 62 register_activation_hook( __FILE__, 'wpdevtool_set_default_options_value' );72 add_action( 'admin_init', 'wpdevtool_set_default_options_value' ); 63 73 64 74 /**
Note: See TracChangeset
for help on using the changeset viewer.