芝麻web文件管理V1.00
编辑当前文件:/var/www/italafricacentrale.com/wp-content/plugins/mapsvg/mapsvg.php
mapsvgPurchaseCode = Options::get('purchase_code'); if($this->mapsvgPurchaseCode){ require MAPSVG_PLUGIN_DIR . DIRECTORY_SEPARATOR . 'php/Vendor/plugin-update-checker/plugin-update-checker.php'; $myUpdateChecker = \Puc_v4_Factory::buildUpdateChecker( 'https://mapsvg.com/wp-updates/?action=info', __FILE__, //Full path to the main plugin file or functions.php. 'mapsvg' ); //Add the license key to query arguments. $myUpdateChecker->addQueryArgFilter(array($this, 'filterUpdateChecks')); } } function filterUpdateChecks($queryArgs){ $queryArgs['purchase_code'] = $this->mapsvgPurchaseCode; return $queryArgs; } public function run(){ if($this->isPhpVersionOk() && MAPSVG_DEBUG){ Logger::init(); } if (defined("PHP_VERSION_ERROR")){ add_action('admin_menu', array($this, 'addErrorPage')); return; } if(is_admin()){ $upgrader = new Upgrade(); $upgrader->updateDbCheck(); } $this->checkUpdates(); $router = new Router(); add_action('wp_head',array($this,'ajaxurl')); if (is_admin()) { /** Load Admin controller */ try { $admin = new Admin(); } catch (\Exception $e) { status_header($e->getCode()); $response = ['error' => $e->getMessage()]; } } else { /** Load Front-end controller */ $front = new Front(); } } /** * Add "ajaxurl" JavaScript global variable that contains URL of the admin-ajax.php file */ function ajaxurl() { $url = ''; if ( is_admin() ) $url = admin_url( 'admin-ajax.php' ); else $url = site_url( 'wp-admin/admin-ajax.php' ); ?> ".PHP_VERSION_ERROR."
"; } } $mapsvg = new MapSVG(); $mapsvg->run(); ?>