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

120 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: 5.4.4
7 * Author: Ninja Team
8 * Author URI: https://ninjateam.org
9 * Text Domain: filebird
10 * Domain Path: /i18n/languages/
11 *
12 * @package FileBirdPlugin
13 */
14 namespace FileBird;
15
16 defined( 'ABSPATH' ) || exit;
17
18 if ( function_exists( 'FileBird\\init' ) ) {
19 require_once plugin_dir_path( __FILE__ ) . 'includes/Fallback.php';
20 if ( isset( $_GET['activate'] ) ) { // phpcs:ignore
21 unset( $_GET['activate'] ); // phpcs:ignore
22 }
23 add_action(
24 'admin_init',
25 function() {
26 deactivate_plugins( plugin_basename( __FILE__ ) );
27 }
28 );
29 return;
30 }
31
32 if ( ! defined( 'NJFB_PREFIX' ) ) {
33 define( 'NJFB_PREFIX', 'filebird' );
34 }
35
36 if ( ! defined( 'NJFB_VERSION' ) ) {
37 define( 'NJFB_VERSION', '5.4.4' );
38 }
39
40 if ( ! defined( 'NJFB_PLUGIN_FILE' ) ) {
41 define( 'NJFB_PLUGIN_FILE', __FILE__ );
42 }
43
44 if ( ! defined( 'NJFB_PLUGIN_URL' ) ) {
45 define( 'NJFB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
46 }
47
48 if ( ! defined( 'NJFB_PLUGIN_PATH' ) ) {
49 define( 'NJFB_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
50 }
51
52 if ( ! defined( 'NJFB_PLUGIN_BASE_NAME' ) ) {
53 define( 'NJFB_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
54 }
55
56 if ( ! defined( 'NJFB_REST_URL' ) ) {
57 define( 'NJFB_REST_URL', 'filebird/v1' );
58 }
59
60 if ( ! defined( 'NJFB_REST_PUBLIC_URL' ) ) {
61 define( 'NJFB_REST_PUBLIC_URL', 'filebird/public/v1' );
62 }
63
64 if ( ! defined( 'NJFB_UPLOAD_DIR' ) ) {
65 define( 'NJFB_UPLOAD_DIR', 'filebird-uploads' );
66 }
67
68
69 spl_autoload_register(
70 function ( $class ) {
71 $prefix = __NAMESPACE__; // project-specific namespace prefix
72 $base_dir = __DIR__ . '/includes'; // base directory for the namespace prefix
73
74 $len = strlen( $prefix );
75 if ( strncmp( $prefix, $class, $len ) !== 0 ) { // does the class use the namespace prefix?
76 return; // no, move to the next registered autoloader
77 }
78
79 $relative_class_name = substr( $class, $len );
80
81 // replace the namespace prefix with the base directory, replace namespace
82 // separators with directory separators in the relative class name, append
83 // with .php
84 $file = $base_dir . str_replace( '\\', '/', $relative_class_name ) . '.php';
85
86 if ( file_exists( $file ) ) {
87 require $file;
88 }
89 }
90 );
91
92 if ( ! function_exists( 'FileBird\\init' ) ) {
93 function init() {
94 Plugin::prepareRun();
95 I18n::loadPluginTextdomain();
96
97 new Classes\Feedback();
98 new Classes\Review();
99 Page\Settings::getInstance();
100
101 Classes\Convert::getInstance();
102 Controller\Folder::getInstance();
103
104 new Support\SupportController();
105 new Classes\Schedule();
106 new Blocks\BlockController();
107
108 if ( function_exists( 'register_block_type' ) ) {
109 require plugin_dir_path( __FILE__ ) . 'blocks/filebird-gallery/dist/init.php';
110 }
111
112 require_once plugin_dir_path( __FILE__ ) . 'includes/YC.php';
113 require_once plugin_dir_path( __FILE__ ) . 'includes/Recommended/Recommended.php';
114 }
115 }
116 add_action( 'plugins_loaded', 'FileBird\\init' );
117
118 register_activation_hook( __FILE__, array( 'FileBird\\Plugin', 'activate' ) );
119 register_deactivation_hook( __FILE__, array( 'FileBird\\Plugin', 'deactivate' ) );
120