Changeset 840303
- Timestamp:
- 01/17/2014 12:56:15 PM (12 years ago)
- Location:
- cyklodev-wp-settings/trunk
- Files:
-
- 3 edited
-
index.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
views/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cyklodev-wp-settings/trunk/index.php
r839783 r840303 6 6 Description: Cyklodev Wordpress Settings 7 7 Author: Zephilou 8 Version: 1.1. 08 Version: 1.1.1 9 9 Author URI: http://www.cyklodev.com 10 10 */ … … 30 30 'cyklodev_settings_login_email' => 'Login with email', 31 31 'cyklodev_settings_update_notification' => 'Update notification', 32 'cyklodev_settings_update_auto' => 'Automatic update' ,32 'cyklodev_settings_update_auto' => 'Automatic update' 33 33 ); 34 34 … … 109 109 define (WP_AUTO_UPDATE_CORE,false); 110 110 } 111 112 113 114 111 ?> -
cyklodev-wp-settings/trunk/readme.txt
r839783 r840303 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.8 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 36 36 == Changelog == 37 37 38 = 1.1.1 = 39 * Add data validation to avoid unwanted entries in db 40 38 41 = 1.1.0 = 39 42 * Add automatic update enabler/disabler -
cyklodev-wp-settings/trunk/views/settings.php
r839783 r840303 4 4 5 5 $options_list = array ( 6 'cyklodev_settings_rss' => 'Rss',7 'cyklodev_settings_login_email' => 'Login with email',8 'cyklodev_settings_update_notification' => 'Update notification',9 'cyklodev_settings_update_auto' => 'Automatic update',6 'cyklodev_settings_rss' => 'Rss', 7 'cyklodev_settings_login_email' => 'Login with email', 8 'cyklodev_settings_update_notification' => 'Update notification', 9 'cyklodev_settings_update_auto' => 'Automatic update' 10 10 ); 11 11 12 12 foreach ($options_list as $k => $v) { 13 if (isset($_POST[$k])){ 14 update_option($k,$_POST[$k]); 15 echo '<div style="background-color:#00ff00;" align="center">Updated !</div>'; 16 @header(Location); 13 if (isset($_POST[$k])){ 14 if($_POST[$k] == 'enable' || $_POST[$k] == 'disable'){ 15 update_option($k,$_POST[$k]); 16 echo '<div style="background-color:#00ff00;" align="center">Updated !</div>'; 17 @header(Location); 18 } else { 19 echo '<div style="background-color:#ff0000;" align="center">Nice try but data not allowed !</div>'; 20 } 17 21 } 18 22 }
Note: See TracChangeset
for help on using the changeset viewer.