Changeset 2260981
- Timestamp:
- 03/14/2020 09:08:15 AM (6 years ago)
- Location:
- do-that-task
- Files:
-
- 4 edited
-
tags/1.4.6/includes/class-common-functions.php (modified) (2 diffs)
-
tags/1.4.6/includes/class-dothattask.php (modified) (1 diff)
-
trunk/includes/class-common-functions.php (modified) (2 diffs)
-
trunk/includes/class-dothattask.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
do-that-task/tags/1.4.6/includes/class-common-functions.php
r2260518 r2260981 14 14 public $_auditToken = ''; 15 15 public $_addTaskBtnForAudit = false; 16 public $_settings = []; 16 17 17 18 /** … … 23 24 public function __construct(){ 24 25 $this->__iconUrl = DTT_API_URL. 'images/icon.png'; 26 27 } 28 29 public function getSettings(){ 30 $this->__defaultMethod = "GET"; 31 $this->_settings = json_decode($this->postUrlUsingCurl($this->webServiceUrl("settings")),true); 25 32 } 26 33 -
do-that-task/tags/1.4.6/includes/class-dothattask.php
r2260533 r2260981 117 117 } 118 118 } 119 } 119 $this->checkStableVersion(); 120 } 121 //Check plugin version is stable or not , if not then redirect on upgrade page. 122 private function checkStableVersion(){ 123 $page = sanitize_text_field(isset($_REQUEST['page'])) ? sanitize_text_field($_REQUEST['page']) : ''; 124 if(in_array($page,$this->_page)){ 125 $this->functionClass->getSettings(); 126 if($this->functionClass->_settings['stable_version'] > DTT_VERSION){ 127 exit( wp_redirect('admin.php?page=dtt_plugin_upgrade&version='.$this->functionClass->_settings['stable_version'])); 128 } 129 } 130 } 131 120 132 protected function init_hooks(){ 121 133 -
do-that-task/trunk/includes/class-common-functions.php
r2247604 r2260981 14 14 public $_auditToken = ''; 15 15 public $_addTaskBtnForAudit = false; 16 public $_settings = []; 16 17 17 18 /** … … 23 24 public function __construct(){ 24 25 $this->__iconUrl = DTT_API_URL. 'images/icon.png'; 26 27 } 28 29 public function getSettings(){ 30 $this->__defaultMethod = "GET"; 31 $this->_settings = json_decode($this->postUrlUsingCurl($this->webServiceUrl("settings")),true); 25 32 } 26 33 -
do-that-task/trunk/includes/class-dothattask.php
r2260533 r2260981 117 117 } 118 118 } 119 } 119 $this->checkStableVersion(); 120 } 121 //Check plugin version is stable or not , if not then redirect on upgrade page. 122 private function checkStableVersion(){ 123 $page = sanitize_text_field(isset($_REQUEST['page'])) ? sanitize_text_field($_REQUEST['page']) : ''; 124 if(in_array($page,$this->_page)){ 125 $this->functionClass->getSettings(); 126 if($this->functionClass->_settings['stable_version'] > DTT_VERSION){ 127 exit( wp_redirect('admin.php?page=dtt_plugin_upgrade&version='.$this->functionClass->_settings['stable_version'])); 128 } 129 } 130 } 131 120 132 protected function init_hooks(){ 121 133
Note: See TracChangeset
for help on using the changeset viewer.