PluginProbe
CatFolders – WordPress Media Library Folders & Categories / trunk
CatFolders – WordPress Media Library Folders & Categories vtrunk
2.5.6 2.5.5 trunk 1.6.1 1.8 1.9 2.0 2.2 2.3.1 2.3.2 2.4.4 2.4.7 2.4.8 2.4.9 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4
catfolders / catfolders.php

catfolders.php in CatFolders – WordPress Media Library Folders & Categories trunk, at catfolders.php

107 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: CatFolders Lite - WP Media Folders
4 * Plugin URI: https://wpmediafolders.com/
5 * Description: Organize and manage your files with WordPress media library folders. Unlimitedly fast, flexible, and professional.
6 * Version: 2.5.6
7 * Author: CatFolders
8 * Author URI: https://wpmediafolders.com/
9 * Text Domain: catfolders
10 * Domain Path: /languages
11 *
12 * @package CatFolders Plugin
13 */
14 namespace CatFolders;
15
16 defined( 'ABSPATH' ) || exit;
17
18 global $wp_version;
19
20 if ( function_exists( 'CatFolders\\init' ) ) {
21 require_once plugin_dir_path( __FILE__ ) . 'includes/Views/fallback-exists.php';
22 add_action(
23 'admin_init',
24 function() {
25 deactivate_plugins( plugin_basename( __FILE__ ) );
26 }
27 );
28 return;
29 }
30
31 if ( ! \version_compare( phpversion(), '7.2', '>=' ) ) {
32 require_once plugin_dir_path( __FILE__ ) . 'includes/Views/fallback-minimum-php.php';
33 add_action(
34 'admin_init',
35 function() {
36 deactivate_plugins( plugin_basename( __FILE__ ) );
37 }
38 );
39 return;
40 };
41
42 if ( ! \version_compare( $wp_version, '5.2', '>=' ) ) {
43 require_once plugin_dir_path( __FILE__ ) . 'includes/Views/fallback-minimum-wp.php';
44 add_action(
45 'admin_init',
46 function() {
47 deactivate_plugins( plugin_basename( __FILE__ ) );
48 }
49 );
50 return;
51 }
52
53 if ( ! defined( 'CATF_PREFIX' ) ) {
54 define( 'CATF_PREFIX', 'catf' );
55 }
56
57 if ( ! defined( 'CATF_VERSION' ) ) {
58 define( 'CATF_VERSION', '2.5.6' );
59 }
60
61 if ( ! defined( 'CATF_PLUGIN_FILE' ) ) {
62 define( 'CATF_PLUGIN_FILE', __FILE__ );
63 }
64
65 if ( ! defined( 'CATF_PLUGIN_URL' ) ) {
66 define( 'CATF_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
67 }
68
69 if ( ! defined( 'CATF_PLUGIN_PATH' ) ) {
70 define( 'CATF_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
71 }
72
73 if ( ! defined( 'CATF_PLUGIN_BASE_NAME' ) ) {
74 define( 'CATF_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
75 }
76
77 if ( ! defined( 'CATF_ROUTE_NAMESPACE' ) ) {
78 define( 'CATF_ROUTE_NAMESPACE', 'CatFolders/v1' );
79 }
80
81 if ( ! defined( 'CATF_LICENSE_API_URL' ) ) {
82 define( 'CATF_LICENSE_API_URL', 'https://catfolders.com/' );
83 }
84
85 if ( ! defined( 'CATF_LICENSE_API_ITEM_ID' ) ) {
86 define( 'CATF_LICENSE_API_ITEM_ID', 10 );
87 }
88
89 if ( ! defined( 'CATF_IS_DEVELOPMENT' ) ) {
90 define( 'CATF_IS_DEVELOPMENT', false );
91 }
92
93 if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
94 require_once dirname( __FILE__ ) . '/vendor/autoload.php';
95 }
96
97 if ( ! function_exists( 'CatFolders\\init' ) ) {
98 function init() {
99 new \CatFolders\Classes\Svg();
100 new \CatFolders\Core\Initialize();
101 }
102 }
103 add_action( 'plugins_loaded', 'CatFolders\\init' );
104
105 register_activation_hook( __FILE__, array( 'CatFolders\\Plugin', 'activate' ) );
106 register_deactivation_hook( __FILE__, array( 'CatFolders\\Plugin', 'deactivate' ) );
107