| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPIDE - File Manager & Code Editor |
| 4 |
* |
| 5 |
* @author XplodedThemes |
| 6 |
* @copyright 2018 XplodedThemes |
| 7 |
* @license GPL-2.0+ |
| 8 |
* |
| 9 |
* @wordpress-plugin |
| 10 |
* Plugin Name: WPIDE - File Manager & Code Editor |
| 11 |
* Plugin URI: https://wpide.com |
| 12 |
* Description: WordPress file manager with an advanced code editor / file editor featuring auto-completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup, image editor & much more! |
| 13 |
* Version: 3.5.0 |
| 14 |
* Requires PHP: 7.4.0 |
| 15 |
* Requires at least: 5.0 |
| 16 |
* Author: XplodedThemes |
| 17 |
* Author URI: https://xplodedthemes.com |
| 18 |
* Text Domain: wpide |
| 19 |
* Domain Path: /languages/ |
| 20 |
* License: GPL-2.0+ |
| 21 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 22 |
* |
| 23 |
*/ |
| 24 |
namespace WPIDE; |
| 25 |
|
| 26 |
use WPIDE\App\App; |
| 27 |
use WPIDE\App\Classes\Freemius; |
| 28 |
|
| 29 |
defined( 'ABSPATH' ) || exit; |
| 30 |
|
| 31 |
$required_php_version = '7.4.0'; |
| 32 |
|
| 33 |
if (version_compare(PHP_VERSION, $required_php_version, '<')) { |
| 34 |
|
| 35 |
$class = 'notice notice-error'; |
| 36 |
|
| 37 |
$message = sprintf( |
| 38 |
__('%s minimum PHP version requirement is %s. The current PHP version is: %s. Either update the PHP version, or use %s %s or below.', 'wpide'), |
| 39 |
'<strong>WPIDE</strong>', |
| 40 |
'<strong>v' . $required_php_version . '</strong>', |
| 41 |
'<strong>v' . PHP_VERSION . '</strong>', |
| 42 |
'<strong>WPIDE</strong>', |
| 43 |
'<strong>v2.6</strong>' |
| 44 |
); |
| 45 |
|
| 46 |
add_action('admin_notices', function () use ($message, $class) { |
| 47 |
echo sprintf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), $message); |
| 48 |
|
| 49 |
deactivate_plugins( __FILE__ ); |
| 50 |
}); |
| 51 |
|
| 52 |
}else { |
| 53 |
|
| 54 |
define('WPIDE_FILE', __FILE__); |
| 55 |
define('WPIDE_DIR', __DIR__); |
| 56 |
|
| 57 |
global $wpide_fs; |
| 58 |
|
| 59 |
if (!empty($wpide_fs)) { |
| 60 |
|
| 61 |
$wpide_fs->set_basename(true, __FILE__); |
| 62 |
|
| 63 |
} else { |
| 64 |
|
| 65 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 66 |
|
| 67 |
Freemius::init(); |
| 68 |
App::instance(); |
| 69 |
} |
| 70 |
} |
| 71 |
|