PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / trunk
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager vtrunk
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 trunk, at easy-code-manager.php

71 lines 1.9 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.56
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.56');
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 if (strpos($class, 'FluentSnippets\\') !== 0) {
46 return;
47 }
48
49 $file = str_replace(
50 ['FluentSnippets', '\\', '/App/'],
51 ['', DIRECTORY_SEPARATOR, 'app/'],
52 $class
53 );
54
55 require(FLUENT_SNIPPETS_PLUGIN_PATH . trim($file, '/') . '.php');
56 });
57
58 add_action('plugins_loaded', function () {
59 add_action('rest_api_init', function () {
60 require_once FLUENT_SNIPPETS_PLUGIN_PATH . 'app/Http/routes.php';
61 });
62 });
63
64 require_once FLUENT_SNIPPETS_PLUGIN_PATH . 'app/Hooks/hooks.php';
65
66 register_deactivation_hook(__FILE__, [\FluentSnippets\App\Helpers\Helper::class, 'handleDeactivate']);
67 }
68 }
69
70 (new FluentCodeSnippetsBoot())->boot();
71