PluginProbe
FileBird – WordPress Media Library Folders & File Manager / 6.5.8
FileBird – WordPress Media Library Folders & File Manager v6.5.8
6.5.8 6.5.7 6.5.5 6.5.4 trunk 4.3.1 5.1.6 5.3 5.3.2 5.4.3 5.4.4 5.4.5 5.5 5.5.3 5.5.5 5.5.8 5.5.8.1 5.6 5.6.1 5.6.2 5.6.3 5.6.4 6.2.3 6.2.5 6.3 All 36 releases
filebird / filebird.php

filebird.php in FileBird – WordPress Media Library Folders & File Manager 6.5.8, at filebird.php

131 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: FileBird Lite
4 * Plugin URI: https://ninjateam.org/wordpress-media-library-folders/
5 * Description: Organize thousands of WordPress media files into folders/ categories at ease.
6 * Version: 6.5.8
7 * Author: Ninja Team
8 * Author URI: https://ninjateam.org
9 * Text Domain: filebird
10 * Domain Path: /i18n/languages/
11 */
12
13 namespace FileBird;
14
15 defined( 'ABSPATH' ) || exit;
16
17 $php_version_valid = \version_compare( phpversion(), '7.4', '>=' );
18
19 if ( function_exists( 'FileBird\\init' ) ) {
20 require_once plugin_dir_path( __FILE__ ) . 'includes/Fallback.php';
21 add_action(
22 'admin_init',
23 function() {
24 deactivate_plugins( plugin_basename( __FILE__ ) );
25 }
26 );
27 return;
28 }
29
30 if ( ! defined( 'NJFB_PREFIX' ) ) {
31 define( 'NJFB_PREFIX', 'filebird' );
32 }
33
34 if ( ! defined( 'NJFB_VERSION' ) ) {
35 define( 'NJFB_VERSION', '6.5.8' );
36 }
37
38 if ( ! defined( 'NJFB_PLUGIN_FILE' ) ) {
39 define( 'NJFB_PLUGIN_FILE', __FILE__ );
40 }
41
42 if ( ! defined( 'NJFB_PLUGIN_URL' ) ) {
43 define( 'NJFB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
44 }
45
46 if ( ! defined( 'NJFB_PLUGIN_PATH' ) ) {
47 define( 'NJFB_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
48 }
49
50 if ( ! defined( 'NJFB_PLUGIN_BASE_NAME' ) ) {
51 define( 'NJFB_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
52 }
53
54 if ( ! defined( 'NJFB_REST_URL' ) ) {
55 define( 'NJFB_REST_URL', 'filebird/v1' );
56 }
57
58 if ( ! defined( 'NJFB_REST_PUBLIC_URL' ) ) {
59 define( 'NJFB_REST_PUBLIC_URL', 'filebird/public/v1' );
60 }
61
62 if ( ! defined( 'NJFB_UPLOAD_DIR' ) ) {
63 define( 'NJFB_UPLOAD_DIR', 'filebird-uploads' );
64 }
65
66 if ( file_exists( NJFB_PLUGIN_PATH . '/vendor/autoload.php' ) && $php_version_valid ) {
67 require_once NJFB_PLUGIN_PATH . '/vendor/autoload.php';
68 }
69
70 if ( ! defined( 'NJFB_DEVELOPMENT' ) ) {
71 define( 'NJFB_DEVELOPMENT', false );
72 }
73
74 spl_autoload_register(
75 function ( $class ) {
76 $prefix = __NAMESPACE__;
77 $base_dir = __DIR__ . '/includes';
78
79 $len = strlen( $prefix );
80 if ( strncmp( $prefix, $class, $len ) !== 0 ) {
81 return;
82 }
83
84 $relative_class_name = substr( $class, $len );
85 $file = $base_dir . str_replace( '\\', '/', $relative_class_name ) . '.php';
86 if ( file_exists( $file ) ) {
87 require $file;
88 }
89 }
90 );
91
92 if ( file_exists( __DIR__ . '/recommended-modules/loader.php' ) ) {
93 require_once __DIR__ . '/recommended-modules/loader.php';
94 }
95
96
97 if ( ! function_exists( 'FileBird\\init' ) ) {
98 function init() {
99 Plugin::getInstance();
100 new I18n();
101 new Classes\Feedback();
102 new Classes\Review();
103 new Classes\ActivePro();
104
105 Admin\Settings::getInstance();
106 Classes\Convert::getInstance();
107 Classes\Core::getInstance();
108 Rest\RestApi::getInstance();
109 Addons\PostType\Init::getInstance();
110
111 // Support 3rd plugins
112 new Support\SupportController();
113
114 // Import from 3rd plugins
115 new Controller\Import\ImportController();
116
117 // Schedule
118 new Classes\Schedule();
119
120 // Gutenberg Blocks
121 new Blocks\BlockController();
122
123 if ( function_exists( 'register_block_type' ) ) {
124 require plugin_dir_path( __FILE__ ) . 'blocks/filebird-gallery/init.php';
125 }
126 }
127 }
128 add_action( 'plugins_loaded', 'FileBird\\init' );
129
130 register_activation_hook( __FILE__, array( 'FileBird\\Plugin', 'activate' ) );
131 register_deactivation_hook( __FILE__, array( 'FileBird\\Plugin', 'deactivate' ) );