PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / 10.53
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager v10.53
10.56 1.2.1 10 10.1 10.2 10.3 10.31 10.32 10.33 10.34 10.50 10.51 10.52 10.53 10.55 9.0 9.0.1 9.4 trunk 1.0.0 1.1 1.2
easy-code-manager / easy-code-manager.php

easy-code-manager.php in FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager 10.53, at easy-code-manager.php

75 lines 2.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: Fluent Snippets
4 * Plugin URI: https://fluentsnippets.com
5 * Description: Super Fast File Based Native Code Snippets (header / footer codes) Manager for WordPress
6 * Author: Fluent Snippets
7 * Author URI: https://fluentsnippets.com
8 * License: GPL-2.0-or-later
9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
10 * Text Domain: easy-code-manager
11 * Version: 10.53
12 * Requires PHP: 7.3
13 * Requires at least: 6.0
14 * Domain Path: /language
15 */
16
17 // Exit if accessed directly.
18 if (!defined('ABSPATH')) {
19 return;
20 }
21
22 if (defined('FLUENT_SNIPPETS_PLUGIN_PATH')) {
23 return;
24 }
25
26 define('FLUENT_SNIPPETS_PLUGIN_PATH', plugin_dir_path(__FILE__));
27 define('FLUENT_SNIPPETS_PLUGIN_URL', plugin_dir_url(__FILE__));
28 define('FLUENT_SNIPPETS_PLUGIN_VERSION', '10.53');
29
30 class FluentCodeSnippetsBoot
31 {
32 public function boot()
33 {
34 $this->autoLoad();
35
36 add_action('init', function () {
37 load_plugin_textdomain('easy-code-manager', false, 'fluent-snippets/language');
38 });
39 }
40
41 private function autoLoad()
42 {
43
44 spl_autoload_register(function ($class) {
45 $match = 'FluentSnippets';
46
47 if (!preg_match("/\b{$match}\b/", $class)) {
48 return;
49 }
50
51 $path = plugin_dir_path(__FILE__);
52
53 $file = str_replace(
54 ['FluentSnippets', '\\', '/App/'],
55 ['', DIRECTORY_SEPARATOR, 'app/'],
56 $class
57 );
58
59 require(trailingslashit($path) . trim($file, '/') . '.php');
60 });
61
62 add_action('plugins_loaded', function () {
63 add_action('rest_api_init', function () {
64 require_once FLUENT_SNIPPETS_PLUGIN_PATH . 'app/Http/routes.php';
65 });
66 });
67
68 require_once FLUENT_SNIPPETS_PLUGIN_PATH . 'app/Hooks/hooks.php';
69
70 register_deactivation_hook(__FILE__, [\FluentSnippets\App\Helpers\Helper::class, 'handleDeactivate']);
71 }
72 }
73
74 (new FluentCodeSnippetsBoot())->boot();
75