-
Notifications
You must be signed in to change notification settings - Fork 1
/
external-files-in-media-library.php
42 lines (34 loc) · 1.07 KB
/
external-files-in-media-library.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Plugin Name: External files in Media Library
* Description: Enables the Media Library to use external files.
* Requires at least: 6.2
* Requires PHP: 8.0
* Version: @@VersionNumber@@
* Author: Thomas Zwirner
* Author URI: https://www.thomaszwirner.de
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: external-files-in-media-library
*
* @package external-files-in-media-library
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// do nothing if PHP-version is not 8.0 or newer.
if ( version_compare( PHP_VERSION, '8.0', '<' ) ) {
return;
}
use ExternalFilesInMediaLibrary\Plugin\Init;
// get plugin-path.
const EFML_PLUGIN = __FILE__;
// get plugin-version.
const EFML_PLUGIN_VERSION = '@@VersionNumber@@';
// get autoloader generated by composer.
require_once __DIR__ . '/vendor/autoload.php';
// include necessary file.
require_once __DIR__ . '/inc/constants.php';
// initialize plugin.
Init::get_instance()->init();