PluginProbe
My WP Customize Admin/Frontend / 1.5.4
My WP Customize Admin/Frontend v1.5.4
1.27.4 1.27.3 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.10 1.10.1 1.10.2 1.11 1.12 1.12.1 1.12.2 1.13 1.13.1 1.13.2 1.14 1.15.0 1.16 1.17.0 All 76 releases
my-wp / controller / controller.init.php

controller.init.php in My WP Customize Admin/Frontend 1.5.4, at controller/controller.init.php

91 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 if ( ! class_exists( 'MywpControllerInit' ) ) :
8
9 final class MywpControllerInit {
10
11 private static $instance;
12
13 private function __construct() {}
14
15 public static function get_instance() {
16
17 if ( !isset( self::$instance ) ) {
18
19 self::$instance = new self();
20
21 }
22
23 return self::$instance;
24
25 }
26
27 private function __clone() {}
28
29 private function __wakeup() {}
30
31 public static function init() {
32
33 add_action( 'mywp_plugins_loaded' , array( __CLASS__ , 'plugins_loaded_include_modules' ) , 20 );
34 add_action( 'mywp_after_setup_theme' , array( __CLASS__ , 'after_setup_theme_include_modules' ) , 20 );
35
36 add_action( 'mywp_request_admin' , array( __CLASS__ , 'controller_cache' ) );
37 add_action( 'mywp_request_frontend' , array( __CLASS__ , 'controller_cache' ) );
38
39 }
40
41 public static function plugins_loaded_include_modules() {
42
43 $dir = MYWP_PLUGIN_PATH . 'controller/modules/';
44
45 $includes = array(
46 'admin_dashboard' => $dir . 'mywp.controller.module.admin.dashboard.php',
47 'admin_general' => $dir . 'mywp.controller.module.admin.general.php',
48 'admin_nav_menu' => $dir . 'mywp.controller.module.admin.nav-menu.php',
49 'admin_post_edit' => $dir . 'mywp.controller.module.admin.post.edit.php',
50 'admin_posts' => $dir . 'mywp.controller.module.admin.posts.php',
51 'admin_regist_metaboxes' => $dir . 'mywp.controller.module.admin.regist.metaboxes.php',
52 'admin_sidebar' => $dir . 'mywp.controller.module.admin.sidebar.php',
53 'admin_toolbar' => $dir . 'mywp.controller.module.admin.toolbar.php',
54 'admin_user_edit' => $dir . 'mywp.controller.module.admin.user-edit.php',
55 'admin_users' => $dir . 'mywp.controller.module.admin.users.php',
56 'debug_general' => $dir . 'mywp.controller.module.debug.general.php',
57 'frontend_author_archive' => $dir . 'mywp.controller.module.frontend.author-archive.php',
58 'frontend_date_archive' => $dir . 'mywp.controller.module.frontend.date-archive.php',
59 'frontend_taxonomy_archive' => $dir . 'mywp.controller.module.frontend.taxonomy-archive.php',
60 'frontend_general' => $dir . 'mywp.controller.module.frontend.general.php',
61 'main_general' => $dir . 'mywp.controller.module.main.general.php',
62 'site_general' => $dir . 'mywp.controller.module.site.general.php',
63 'site_post_type' => $dir . 'mywp.controller.module.site.post-type.php',
64 );
65
66 $includes = apply_filters( 'mywp_controller_plugins_loaded_include_modules' , $includes );
67
68 MywpApi::require_files( $includes );
69
70 }
71
72 public static function after_setup_theme_include_modules() {
73
74 $includes = array();
75
76 $includes = apply_filters( 'mywp_controller_after_setup_theme_include_modules' , $includes );
77
78 MywpApi::require_files( $includes );
79
80 }
81
82 public static function controller_cache() {
83
84 MywpController::set_controllers();
85
86 }
87
88 }
89
90 endif;
91