PluginProbe
FileBird – WordPress Media Library Folders & File Manager / 6.3.4
FileBird – WordPress Media Library Folders & File Manager v6.3.4
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.3.4, at filebird.php

125 lines 3.0 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.3.4
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.3.4' );
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 ( ! function_exists( 'FileBird\\init' ) ) {
93 function init() {
94 Plugin::getInstance();
95 new I18n();
96 new Classes\Feedback();
97 new Classes\Review();
98 new Classes\ActivePro();
99
100 Admin\Settings::getInstance();
101 Classes\Convert::getInstance();
102 Classes\Core::getInstance();
103 Rest\RestApi::getInstance();
104
105 // Support 3rd plugins
106 new Support\SupportController();
107
108 // Import from 3rd plugins
109 new Controller\Import\ImportController();
110
111 // Schedule
112 new Classes\Schedule();
113
114 // Gutenberg Blocks
115 new Blocks\BlockController();
116
117 if ( function_exists( 'register_block_type' ) ) {
118 require plugin_dir_path( __FILE__ ) . 'blocks/filebird-gallery/dist/init.php';
119 }
120 }
121 }
122 add_action( 'plugins_loaded', 'FileBird\\init' );
123
124 register_activation_hook( __FILE__, array( 'FileBird\\Plugin', 'activate' ) );
125 register_deactivation_hook( __FILE__, array( 'FileBird\\Plugin', 'deactivate' ) );