]> _ Git - miranui.git/commitdiff
wip #7254 @4:00 init, elementor, widget, theme
authorsoufiane <soufiane@cubedesigners.com>
Wed, 23 Apr 2025 16:59:54 +0000 (18:59 +0200)
committersoufiane <soufiane@cubedesigners.com>
Wed, 23 Apr 2025 16:59:54 +0000 (18:59 +0200)
wp-content/mu-plugins/0-worker.php [new file with mode: 0644]
wp-content/mu-plugins/cube-loader.php [new file with mode: 0644]
wp-content/mu-plugins/cube/composer.json [new file with mode: 0644]

diff --git a/wp-content/mu-plugins/0-worker.php b/wp-content/mu-plugins/0-worker.php
new file mode 100644 (file)
index 0000000..ee87f30
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+/*
+Plugin Name: ManageWP - Worker Loader
+Plugin URI: https://managewp.com
+Description: This is automatically generated by the ManageWP Worker plugin to increase performance and reliability. It is automatically disabled when disabling the main plugin.
+Author: GoDaddy
+Version: 1.0.0
+Author URI: https://godaddy.com
+License: GPL2
+Network: true
+*/
+
+if (!function_exists('untrailingslashit') || !defined('WP_PLUGIN_DIR')) {
+    // WordPress is probably not bootstrapped.
+    exit;
+}
+
+if (file_exists(untrailingslashit(WP_PLUGIN_DIR).'/worker/init.php')) {
+    if (in_array('worker/init.php', (array) get_option('active_plugins')) ||
+        (function_exists('get_site_option') && array_key_exists('worker/init.php', (array) get_site_option('active_sitewide_plugins')))) {
+        $GLOBALS['mwp_is_mu'] = true;
+        include_once untrailingslashit(WP_PLUGIN_DIR).'/worker/init.php';
+    }
+}
diff --git a/wp-content/mu-plugins/cube-loader.php b/wp-content/mu-plugins/cube-loader.php
new file mode 100644 (file)
index 0000000..5a44074
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Plugin Name: Custom theme features
+ * Description: Loads all custom functionality such as new post types and taxonomies.
+ * Version:  1.0
+ * Author: Cubedesigners
+ * Author URI: https://www.cubedesigners.com
+ */
+
+namespace Cube;
+
+defined('ABSPATH') or die('Direct access blocked');
+
+$plugin_dir = 'cube';
+$autoloader = __DIR__ . "/$plugin_dir/vendor/autoload.php";
+
+// Namespaced constants for easier path and URL references
+define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); // Namespace shortcut: NS
+define(NS . 'PLUGIN_PATH', trailingslashit(plugin_dir_path(__FILE__) . $plugin_dir));
+define(NS . 'PLUGIN_URL', trailingslashit(plugin_dir_url(__FILE__) . $plugin_dir));
+
+if (file_exists($autoloader)) {
+    require_once $autoloader;
+}
+
+if( class_exists(NS.'Init') ) {
+    Init::register();
+}
\ No newline at end of file
diff --git a/wp-content/mu-plugins/cube/composer.json b/wp-content/mu-plugins/cube/composer.json
new file mode 100644 (file)
index 0000000..63a0c37
--- /dev/null
@@ -0,0 +1,7 @@
+{
+  "autoload": {
+    "psr-4": {
+      "Cube\\": "."
+    }
+  }
+}
\ No newline at end of file