PluginProbe ʕ •ᴥ•ʔ
File Manager Pro – Filester / trunk
File Manager Pro – Filester vtrunk
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 9 months ago i18n 6 years ago includes 1 month ago views 1 month ago index.php 5 years ago license.txt 1 year ago ninja-file-manager.php 1 month ago readme.txt 1 month ago uninstall.php 6 years ago
ninja-file-manager.php
81 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: 2.1.1
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 if (file_exists(dirname(__FILE__) . '/includes/functions.php')) {
30 require_once dirname(__FILE__) . '/includes/functions.php';
31 }
32
33
34
35 defined('ABSPATH') || exit;
36
37 define('NJT_FS_BN_PREFIX', 'njt-fs');
38 define('NJT_FS_BN_VERSION', '2.1.1');
39 define('NJT_FS_BN_DOMAIN', 'filester');
40
41 define('NJT_FS_BN_PLUGIN_DIR', basename(__DIR__));
42 define('NJT_FS_BN_PLUGIN_URL', plugin_dir_url(__FILE__));
43 define('NJT_FS_BN_PLUGIN_PATH', plugin_dir_path(__FILE__));
44
45 spl_autoload_register(function ($class) {
46 $prefix = __NAMESPACE__; // project-specific namespace prefix
47 $base_dir = __DIR__ . '/includes'; // base directory for the namespace prefix
48
49 $len = strlen($prefix);
50 if (strncmp($prefix, $class, $len) !== 0) { // does the class use the namespace prefix?
51 return; // no, move to the next registered autoloader
52 }
53
54 $relative_class_name = substr($class, $len);
55
56 // replace the namespace prefix with the base directory, replace namespace
57 // separators with directory separators in the relative class name, append
58 // with .php
59 $file = $base_dir . str_replace('\\', '/', $relative_class_name) . '.php';
60
61 if (file_exists($file)) {
62 require $file;
63 }
64 });
65
66 // Add crossale for filebird
67 if (file_exists(dirname(__FILE__) . '/includes/cross.php')) {
68 require_once dirname(__FILE__) . '/includes/cross.php';
69 }
70
71 function init() {
72 Plugin::getInstance();
73 I18n::getInstance();
74 File_manager\FileManager::getInstance();
75 }
76 add_action('plugins_loaded', 'NinjaFileManager\\init');
77
78 register_activation_hook(__FILE__, array('NinjaFileManager\\Plugin', 'activate'));
79 register_deactivation_hook(__FILE__, array('NinjaFileManager\\Plugin', 'deactivate'));
80
81