Plugin Directory

Changeset 2260981


Ignore:
Timestamp:
03/14/2020 09:08:15 AM (6 years ago)
Author:
dothattask
Message:

commit in last version

Location:
do-that-task
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • do-that-task/tags/1.4.6/includes/class-common-functions.php

    r2260518 r2260981  
    1414    public $_auditToken = '';
    1515    public $_addTaskBtnForAudit     = false;
     16    public $_settings               = [];
    1617
    1718    /**
     
    2324    public function __construct(){
    2425        $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);
    2532    }
    2633
  • do-that-task/tags/1.4.6/includes/class-dothattask.php

    r2260533 r2260981  
    117117                }
    118118            }
    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
    120132        protected function init_hooks(){
    121133           
  • do-that-task/trunk/includes/class-common-functions.php

    r2247604 r2260981  
    1414    public $_auditToken = '';
    1515    public $_addTaskBtnForAudit     = false;
     16    public $_settings               = [];
    1617
    1718    /**
     
    2324    public function __construct(){
    2425        $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);
    2532    }
    2633
  • do-that-task/trunk/includes/class-dothattask.php

    r2260533 r2260981  
    117117                }
    118118            }
    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
    120132        protected function init_hooks(){
    121133           
Note: See TracChangeset for help on using the changeset viewer.