PluginProbe ʕ •ᴥ•ʔ
Custom Post Type Permalinks / 1.3.1
Custom Post Type Permalinks v1.3.1
1.2.0 1.3.0 1.3.1 1.4.0 1.5.1 1.5.2 1.5.4 2.0.0 2.0.1 2.0.2 2.1.1 2.1.2 2.1.3 2.2.0 3.0.0 3.0.1 3.1.0 3.1.1 3.1.3 3.1.4 3.1.5 3.2.0 3.2.1 3.2.2 3.3.0 3.3.1 3.3.4 3.3.5 3.4.0 3.4.0-rc.1 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.5.2 3.5.3 3.5.4 3.5.5 trunk 0.6 0.6.1 0.6.2 0.7 0.7.1 0.7.10 0.7.2 0.7.2.1 0.7.3 0.7.3.1 0.7.4 0.7.4.1 0.7.5 0.7.5.1 0.7.5.2 0.7.5.6 0.7.6 0.7.8 0.7.9 0.7.9.1 0.7.9.2 0.8 0.8.1 0.8.6 0.8.7 0.8.7.1 0.8.7.5 0.8.7.6 0.9 0.9.1 0.9.2.1 0.9.3.1 0.9.3.2 0.9.3.3 0.9.5 0.9.5.1 0.9.5.2 0.9.5.3 0.9.5.4 0.9.5.6 0.9.6 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0
custom-post-type-permalinks / CPTP.php
custom-post-type-permalinks Last commit date
CPTP 10 years ago language 10 years ago .svnignore 10 years ago CPTP.php 10 years ago custom-post-type-permalinks.php 10 years ago license.txt 12 years ago readme.md 10 years ago readme.txt 10 years ago screenshot-1.png 14 years ago
CPTP.php
77 lines
1 <?php
2
3 /**
4 * CPTP
5 *
6 * Facade.
7 *
8 * @package Custom_Post_Type_Permalinks
9 * @since 0.9.4
10 *
11 * */
12 class CPTP {
13
14 private static $_instance;
15
16 /** @var CPTP_Module[] */
17 public $modules;
18
19 private function __construct() {
20 $this->load_modules();
21 $this->init();
22 }
23
24 /**
25 * load_modules
26 *
27 * Load CPTP_Modules.
28 * @since 0.9.5
29 *
30 */
31 private function load_modules() {
32 $this->modules['setting'] = new CPTP_Module_Setting();
33 $this->modules['rewrite'] = new CPTP_Module_Rewrite();
34 $this->modules['admin'] = new CPTP_Module_Admin();
35 $this->modules['option'] = new CPTP_Module_Option();
36 $this->modules['permalink'] = new CPTP_Module_Permalink();
37 $this->modules['get_archives'] = new CPTP_Module_GetArchives();
38 $this->modules['flush_rules'] = new CPTP_Module_FlushRules();
39
40 do_action( 'CPTP_load_modules', $this );
41
42 foreach ( $this->modules as $module ) {
43 $module->register();
44 }
45
46 do_action( 'CPTP_registered_modules', $this );
47
48 }
49
50 /**
51 * init
52 *
53 * Fire Module::add_hook
54 *
55 * @since 0.9.5
56 *
57 */
58 private function init() {
59 do_action( 'CPTP_init' );
60 }
61
62 /**
63 * Singleton
64 * @static
65 */
66 public static function get_instance() {
67
68 if ( ! isset( self::$_instance ) ) {
69 self::$_instance = new CPTP;
70 }
71
72 return self::$_instance;
73 }
74
75
76 }
77