Changeset 2327791
- Timestamp:
- 06/20/2020 12:44:22 AM (6 years ago)
- Location:
- wp-translate
- Files:
-
- 6 edited
-
branches/0.7/admin/overview.php (modified) (1 diff)
-
branches/0.7/readme.txt (modified) (2 diffs)
-
branches/0.7/wp-translate.php (modified) (10 diffs)
-
trunk/admin/overview.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp-translate.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-translate/branches/0.7/admin/overview.php
r2161108 r2327791 2 2 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } 3 3 4 $wpTranslateOptions = get_option( "wpTranslateOptions");4 $wpTranslateOptions = get_option(WP_Translate::WPTOPTIONS); 5 5 ob_start(); 6 6 ?> -
wp-translate/branches/0.7/readme.txt
r2284607 r2327791 6 6 Tested up to: 5.4 7 7 Requires PHP: 5.6 8 Stable tag: 5. 2.98 Stable tag: 5.3.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 **v5.7.9** 100 **v5.3.0** 101 102 * Optimized options and constants 103 104 **v5.2.9** 101 105 102 106 * Added missing i18n translation code to admin content. 103 107 104 **v5. 7.8**108 **v5.2.8** 105 109 106 110 * Fixed options variable naming error. -
wp-translate/branches/0.7/wp-translate.php
r2161108 r2327791 7 7 Text Domain: wp-translate 8 8 Domain Path: /languages 9 Version: 5. 2.99 Version: 5.3.0 10 10 Author URI: https://plugingarden.com 11 11 */ … … 13 13 if (!class_exists("WP_Translate")) { 14 14 class WP_Translate { 15 16 const WPTOPTIONS = "wpTranslateOptions"; 17 15 18 public function __construct() { 16 19 $this->plugin_name = plugin_basename(__FILE__); 17 $this->current_version = '5. 2.9';20 $this->current_version = '5.3.0'; 18 21 19 22 register_activation_hook( __FILE__, array(&$this, 'wpTranslate_install') ); … … 40 43 } 41 44 42 if(!get_option( "wpTranslateOptions")) {45 if(!get_option(self::WPTOPTIONS)) { 43 46 $d = strtotime('+7 Days'); 44 47 $wpTranslateOptions = array( … … 54 57 ); 55 58 56 add_option( "wpTranslateOptions", $wpTranslateOptions);59 add_option(self::WPTOPTIONS, $wpTranslateOptions); 57 60 } 58 61 else { 59 $wpTranlsateOptions = get_option( "wpTranslateOptions");62 $wpTranlsateOptions = get_option(self::WPTOPTIONS); 60 63 $keys = array_keys($wpTranlsateOptions); 61 64 … … 89 92 } 90 93 91 update_option( "wpTranslateOptions", $wpTranlsateOptions);94 update_option(self::WPTOPTIONS, $wpTranlsateOptions); 92 95 } 93 96 } … … 98 101 99 102 public function translate_Init() { 100 $wpTranslateOptions = get_option( "wpTranslateOptions");103 $wpTranslateOptions = get_option(self::WPTOPTIONS); 101 104 $doTranslate = true; 102 105 if ($wpTranslateOptions["exclude_mobile"]) { … … 156 159 157 160 public function wpt_upgrade_notice() { 158 $wpTranlsateOptions = get_option( "wpTranslateOptions");161 $wpTranlsateOptions = get_option(self::WPTOPTIONS); 159 162 $upgradeObject = $wpTranlsateOptions['upgrade_notice']; 160 163 $today = strtotime(date('Y-m-d')); … … 194 197 $wpTranslateOptions['tracking_enabled'] = filter_var($_POST["trackingEnabled"], FILTER_VALIDATE_BOOLEAN); 195 198 196 update_option( WPTRANSLATEOPTIONS, $wpTranslateOptions);199 update_option(self::WPTOPTIONS, $wpTranslateOptions); 197 200 198 201 $message = "WP Translate settings have been saved."; … … 257 260 check_ajax_referer( 'wp_translate', 'security' ); 258 261 259 $wpTranslateOptions = get_option( "wpTranslateOptions");262 $wpTranslateOptions = get_option(self::WPTOPTIONS); 260 263 261 264 $upgradeObject = $wpTranslateOptions['upgrade_notice']; … … 266 269 $wpTranslateOptions['upgrade_notice'] = $upgradeObject; 267 270 268 update_option( "wpTranslateOptions", $wpTranslateOptions);271 update_option(self::WPTOPTIONS, $wpTranslateOptions); 269 272 270 273 wp_die(); // this is required to terminate immediately and return a proper response -
wp-translate/trunk/admin/overview.php
r2161108 r2327791 2 2 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } 3 3 4 $wpTranslateOptions = get_option( "wpTranslateOptions");4 $wpTranslateOptions = get_option(WP_Translate::WPTOPTIONS); 5 5 ob_start(); 6 6 ?> -
wp-translate/trunk/readme.txt
r2284607 r2327791 6 6 Tested up to: 5.4 7 7 Requires PHP: 5.6 8 Stable tag: 5. 2.98 Stable tag: 5.3.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 98 98 == Changelog == 99 99 100 **v5.7.9** 100 **v5.3.0** 101 102 * Optimized options and constants 103 104 **v5.2.9** 101 105 102 106 * Added missing i18n translation code to admin content. 103 107 104 **v5. 7.8**108 **v5.2.8** 105 109 106 110 * Fixed options variable naming error. -
wp-translate/trunk/wp-translate.php
r2161108 r2327791 7 7 Text Domain: wp-translate 8 8 Domain Path: /languages 9 Version: 5. 2.99 Version: 5.3.0 10 10 Author URI: https://plugingarden.com 11 11 */ … … 13 13 if (!class_exists("WP_Translate")) { 14 14 class WP_Translate { 15 16 const WPTOPTIONS = "wpTranslateOptions"; 17 15 18 public function __construct() { 16 19 $this->plugin_name = plugin_basename(__FILE__); 17 $this->current_version = '5. 2.9';20 $this->current_version = '5.3.0'; 18 21 19 22 register_activation_hook( __FILE__, array(&$this, 'wpTranslate_install') ); … … 40 43 } 41 44 42 if(!get_option( "wpTranslateOptions")) {45 if(!get_option(self::WPTOPTIONS)) { 43 46 $d = strtotime('+7 Days'); 44 47 $wpTranslateOptions = array( … … 54 57 ); 55 58 56 add_option( "wpTranslateOptions", $wpTranslateOptions);59 add_option(self::WPTOPTIONS, $wpTranslateOptions); 57 60 } 58 61 else { 59 $wpTranlsateOptions = get_option( "wpTranslateOptions");62 $wpTranlsateOptions = get_option(self::WPTOPTIONS); 60 63 $keys = array_keys($wpTranlsateOptions); 61 64 … … 89 92 } 90 93 91 update_option( "wpTranslateOptions", $wpTranlsateOptions);94 update_option(self::WPTOPTIONS, $wpTranlsateOptions); 92 95 } 93 96 } … … 98 101 99 102 public function translate_Init() { 100 $wpTranslateOptions = get_option( "wpTranslateOptions");103 $wpTranslateOptions = get_option(self::WPTOPTIONS); 101 104 $doTranslate = true; 102 105 if ($wpTranslateOptions["exclude_mobile"]) { … … 156 159 157 160 public function wpt_upgrade_notice() { 158 $wpTranlsateOptions = get_option( "wpTranslateOptions");161 $wpTranlsateOptions = get_option(self::WPTOPTIONS); 159 162 $upgradeObject = $wpTranlsateOptions['upgrade_notice']; 160 163 $today = strtotime(date('Y-m-d')); … … 194 197 $wpTranslateOptions['tracking_enabled'] = filter_var($_POST["trackingEnabled"], FILTER_VALIDATE_BOOLEAN); 195 198 196 update_option( WPTRANSLATEOPTIONS, $wpTranslateOptions);199 update_option(self::WPTOPTIONS, $wpTranslateOptions); 197 200 198 201 $message = "WP Translate settings have been saved."; … … 257 260 check_ajax_referer( 'wp_translate', 'security' ); 258 261 259 $wpTranslateOptions = get_option( "wpTranslateOptions");262 $wpTranslateOptions = get_option(self::WPTOPTIONS); 260 263 261 264 $upgradeObject = $wpTranslateOptions['upgrade_notice']; … … 266 269 $wpTranslateOptions['upgrade_notice'] = $upgradeObject; 267 270 268 update_option( "wpTranslateOptions", $wpTranslateOptions);271 update_option(self::WPTOPTIONS, $wpTranslateOptions); 269 272 270 273 wp_die(); // this is required to terminate immediately and return a proper response
Note: See TracChangeset
for help on using the changeset viewer.