Plugin Directory

Changeset 2327791


Ignore:
Timestamp:
06/20/2020 12:44:22 AM (6 years ago)
Author:
hahncgdev
Message:

Update to version 5.3.0 - Optimized options and constants

Location:
wp-translate
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wp-translate/branches/0.7/admin/overview.php

    r2161108 r2327791  
    22if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
    33   
    4 $wpTranslateOptions = get_option("wpTranslateOptions");
     4$wpTranslateOptions = get_option(WP_Translate::WPTOPTIONS);
    55ob_start();
    66?>
  • wp-translate/branches/0.7/readme.txt

    r2284607 r2327791  
    66Tested up to: 5.4
    77Requires PHP: 5.6
    8 Stable tag: 5.2.9
     8Stable tag: 5.3.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
    100 **v5.7.9**
     100**v5.3.0**
     101
     102* Optimized options and constants
     103
     104**v5.2.9**
    101105
    102106* Added missing i18n translation code to admin content.
    103107
    104 **v5.7.8**
     108**v5.2.8**
    105109
    106110* Fixed options variable naming error.
  • wp-translate/branches/0.7/wp-translate.php

    r2161108 r2327791  
    77Text Domain: wp-translate
    88Domain Path: /languages
    9 Version: 5.2.9
     9Version: 5.3.0
    1010Author URI: https://plugingarden.com
    1111*/
     
    1313if (!class_exists("WP_Translate")) {
    1414    class WP_Translate {
     15       
     16        const WPTOPTIONS = "wpTranslateOptions";
     17       
    1518        public function __construct() {
    1619            $this->plugin_name = plugin_basename(__FILE__);
    17             $this->current_version = '5.2.9';
     20            $this->current_version = '5.3.0';
    1821           
    1922            register_activation_hook( __FILE__,  array(&$this, 'wpTranslate_install') );
     
    4043            }
    4144           
    42             if(!get_option("wpTranslateOptions")) {
     45            if(!get_option(self::WPTOPTIONS)) {
    4346                $d = strtotime('+7 Days');
    4447                $wpTranslateOptions = array(
     
    5457                                );
    5558   
    56                 add_option("wpTranslateOptions", $wpTranslateOptions);
     59                add_option(self::WPTOPTIONS, $wpTranslateOptions);
    5760            }
    5861            else {
    59                 $wpTranlsateOptions = get_option("wpTranslateOptions");
     62                $wpTranlsateOptions = get_option(self::WPTOPTIONS);
    6063                $keys = array_keys($wpTranlsateOptions);       
    6164       
     
    8992                }
    9093       
    91                 update_option("wpTranslateOptions", $wpTranlsateOptions);
     94                update_option(self::WPTOPTIONS, $wpTranlsateOptions);
    9295            }
    9396        }
     
    98101
    99102        public function translate_Init() {
    100             $wpTranslateOptions = get_option("wpTranslateOptions");
     103            $wpTranslateOptions = get_option(self::WPTOPTIONS);
    101104            $doTranslate = true;
    102105            if ($wpTranslateOptions["exclude_mobile"]) {       
     
    156159       
    157160        public function wpt_upgrade_notice() {
    158             $wpTranlsateOptions = get_option("wpTranslateOptions");
     161            $wpTranlsateOptions = get_option(self::WPTOPTIONS);
    159162            $upgradeObject = $wpTranlsateOptions['upgrade_notice'];
    160163            $today = strtotime(date('Y-m-d'));
     
    194197            $wpTranslateOptions['tracking_enabled'] = filter_var($_POST["trackingEnabled"], FILTER_VALIDATE_BOOLEAN);
    195198   
    196             update_option(WPTRANSLATEOPTIONS, $wpTranslateOptions);
     199            update_option(self::WPTOPTIONS, $wpTranslateOptions);
    197200   
    198201            $message = "WP Translate settings have been saved.";
     
    257260            check_ajax_referer( 'wp_translate', 'security' );
    258261   
    259             $wpTranslateOptions = get_option("wpTranslateOptions");
     262            $wpTranslateOptions = get_option(self::WPTOPTIONS);
    260263   
    261264            $upgradeObject = $wpTranslateOptions['upgrade_notice'];
     
    266269            $wpTranslateOptions['upgrade_notice'] = $upgradeObject;
    267270   
    268             update_option("wpTranslateOptions", $wpTranslateOptions);
     271            update_option(self::WPTOPTIONS, $wpTranslateOptions);
    269272
    270273            wp_die(); // this is required to terminate immediately and return a proper response
  • wp-translate/trunk/admin/overview.php

    r2161108 r2327791  
    22if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
    33   
    4 $wpTranslateOptions = get_option("wpTranslateOptions");
     4$wpTranslateOptions = get_option(WP_Translate::WPTOPTIONS);
    55ob_start();
    66?>
  • wp-translate/trunk/readme.txt

    r2284607 r2327791  
    66Tested up to: 5.4
    77Requires PHP: 5.6
    8 Stable tag: 5.2.9
     8Stable tag: 5.3.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9898== Changelog ==
    9999
    100 **v5.7.9**
     100**v5.3.0**
     101
     102* Optimized options and constants
     103
     104**v5.2.9**
    101105
    102106* Added missing i18n translation code to admin content.
    103107
    104 **v5.7.8**
     108**v5.2.8**
    105109
    106110* Fixed options variable naming error.
  • wp-translate/trunk/wp-translate.php

    r2161108 r2327791  
    77Text Domain: wp-translate
    88Domain Path: /languages
    9 Version: 5.2.9
     9Version: 5.3.0
    1010Author URI: https://plugingarden.com
    1111*/
     
    1313if (!class_exists("WP_Translate")) {
    1414    class WP_Translate {
     15       
     16        const WPTOPTIONS = "wpTranslateOptions";
     17       
    1518        public function __construct() {
    1619            $this->plugin_name = plugin_basename(__FILE__);
    17             $this->current_version = '5.2.9';
     20            $this->current_version = '5.3.0';
    1821           
    1922            register_activation_hook( __FILE__,  array(&$this, 'wpTranslate_install') );
     
    4043            }
    4144           
    42             if(!get_option("wpTranslateOptions")) {
     45            if(!get_option(self::WPTOPTIONS)) {
    4346                $d = strtotime('+7 Days');
    4447                $wpTranslateOptions = array(
     
    5457                                );
    5558   
    56                 add_option("wpTranslateOptions", $wpTranslateOptions);
     59                add_option(self::WPTOPTIONS, $wpTranslateOptions);
    5760            }
    5861            else {
    59                 $wpTranlsateOptions = get_option("wpTranslateOptions");
     62                $wpTranlsateOptions = get_option(self::WPTOPTIONS);
    6063                $keys = array_keys($wpTranlsateOptions);       
    6164       
     
    8992                }
    9093       
    91                 update_option("wpTranslateOptions", $wpTranlsateOptions);
     94                update_option(self::WPTOPTIONS, $wpTranlsateOptions);
    9295            }
    9396        }
     
    98101
    99102        public function translate_Init() {
    100             $wpTranslateOptions = get_option("wpTranslateOptions");
     103            $wpTranslateOptions = get_option(self::WPTOPTIONS);
    101104            $doTranslate = true;
    102105            if ($wpTranslateOptions["exclude_mobile"]) {       
     
    156159       
    157160        public function wpt_upgrade_notice() {
    158             $wpTranlsateOptions = get_option("wpTranslateOptions");
     161            $wpTranlsateOptions = get_option(self::WPTOPTIONS);
    159162            $upgradeObject = $wpTranlsateOptions['upgrade_notice'];
    160163            $today = strtotime(date('Y-m-d'));
     
    194197            $wpTranslateOptions['tracking_enabled'] = filter_var($_POST["trackingEnabled"], FILTER_VALIDATE_BOOLEAN);
    195198   
    196             update_option(WPTRANSLATEOPTIONS, $wpTranslateOptions);
     199            update_option(self::WPTOPTIONS, $wpTranslateOptions);
    197200   
    198201            $message = "WP Translate settings have been saved.";
     
    257260            check_ajax_referer( 'wp_translate', 'security' );
    258261   
    259             $wpTranslateOptions = get_option("wpTranslateOptions");
     262            $wpTranslateOptions = get_option(self::WPTOPTIONS);
    260263   
    261264            $upgradeObject = $wpTranslateOptions['upgrade_notice'];
     
    266269            $wpTranslateOptions['upgrade_notice'] = $upgradeObject;
    267270   
    268             update_option("wpTranslateOptions", $wpTranslateOptions);
     271            update_option(self::WPTOPTIONS, $wpTranslateOptions);
    269272
    270273            wp_die(); // this is required to terminate immediately and return a proper response
Note: See TracChangeset for help on using the changeset viewer.