PluginProbe ʕ •ᴥ•ʔ
File Manager Pro – Filester / 1.8
File Manager Pro – Filester v1.8
2.1.1 trunk 1.6.1 1.7.6 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 2.0 2.0.1 2.0.2 2.1.0
filester / ninja-file-manager.php
filester Last commit date
assets 2 years ago i18n 2 years ago includes 2 years ago views 2 years ago index.php 2 years ago license.txt 2 years ago ninja-file-manager.php 2 years ago readme.txt 2 years ago uninstall.php 2 years ago
ninja-file-manager.php
78 lines
1 <?php
2 /**
3 * Plugin Name: Filester - File Manager Pro
4 * Plugin URI: https://ninjateam.org/filester
5 * Description: Made to help you focus on WordPress file management and avoid being distracted.
6 * Version: 1.8
7 * Author: Ninja Team
8 * Author URI: https://ninjateam.org
9 * Text Domain: filester
10 * Domain Path: /i18n/languages/
11 *
12 * @package BigPlugin
13 */
14
15 namespace NinjaFileManager;
16
17 if (file_exists(dirname(__FILE__) . '/includes/File_manager/lib/php/autoload.php')) {
18 require_once dirname(__FILE__) . '/includes/File_manager/lib/php/autoload.php';
19 }
20
21 if (file_exists(dirname(__FILE__) . '/includes/File_manager/FileManagerHelper.php')) {
22 require_once dirname(__FILE__) . '/includes/File_manager/FileManagerHelper.php';
23 }
24
25 if (file_exists(dirname(__FILE__) . '/includes/Recommended/Recommended.php')) {
26 require_once dirname(__FILE__) . '/includes/Recommended/Recommended.php';
27 }
28
29
30
31 defined('ABSPATH') || exit;
32
33 define('NJT_FS_BN_PREFIX', 'njt-fs');
34 define('NJT_FS_BN_VERSION', '1.8');
35 define('NJT_FS_BN_DOMAIN', 'filester');
36
37 define('NJT_FS_BN_PLUGIN_DIR', basename(__DIR__));
38 define('NJT_FS_BN_PLUGIN_URL', plugin_dir_url(__FILE__));
39 define('NJT_FS_BN_PLUGIN_PATH', plugin_dir_path(__FILE__));
40
41 spl_autoload_register(function ($class) {
42 $prefix = __NAMESPACE__; // project-specific namespace prefix
43 $base_dir = __DIR__ . '/includes'; // base directory for the namespace prefix
44
45 $len = strlen($prefix);
46 if (strncmp($prefix, $class, $len) !== 0) { // does the class use the namespace prefix?
47 return; // no, move to the next registered autoloader
48 }
49
50 $relative_class_name = substr($class, $len);
51
52 // replace the namespace prefix with the base directory, replace namespace
53 // separators with directory separators in the relative class name, append
54 // with .php
55 $file = $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
56
57 if (file_exists($file)) {
58 require $file;
59 }
60 });
61
62 // Add crossale for filebird
63 if (file_exists(dirname(__FILE__) . '/includes/cross.php')) {
64 require_once dirname(__FILE__) . '/includes/cross.php';
65 }
66
67 function init() {
68 Plugin::activate();
69 Plugin::getInstance();
70 I18n::getInstance();
71 File_manager\FileManager::getInstance();
72 }
73 add_action('plugins_loaded', 'NinjaFileManager\\init');
74
75 register_activation_hook(__FILE__, array('NinjaFileManager\\Plugin', 'activate'));
76 register_deactivation_hook(__FILE__, array('NinjaFileManager\\Plugin', 'deactivate'));
77
78