PluginProbe
WP MapIt / 1.2
WP MapIt v1.2
3.1.1 trunk 1.0 1.1 1.2 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.7.1 3.0 3.1.0
wp-mapit / wp_mapit / classes / class.wp_mapit.php

class.wp_mapit.php in WP MapIt 1.2, at wp_mapit/classes/class.wp_mapit.php

66 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 if( ! class_exists( 'wp_mapit' ) ) {
4
5 /**
6 * Base class of the plugin
7 */
8 class wp_mapit
9 {
10 /**
11 * @since 1.0
12 * @var wp_mapit the single instance of the class
13 */
14 protected static $instance = null;
15
16 /**
17 * Instantiates the plugin and include all the files needed for the plugin.
18 *
19 * @since 1.0
20 * @access public
21 */
22 function __construct() {
23 self::include_plugin_files();
24 }
25
26 /**
27 * Main WP MapIt Plugin instance
28 *
29 * Ensures only one instance of WP MapIt is loaded or can be loaded.
30 *
31 * @since 1.0
32 * @static
33 * @access public
34 * @return WP MapIt - Main instance
35 */
36 public static function instance() {
37 if ( is_null( self::$instance ) ) {
38 self::$instance = new self();
39 }
40
41 return self::$instance;
42 }
43
44 /**
45 * Include all the files needed for the plugin.
46 *
47 * @since 1.0
48 * @static
49 * @access private
50 */
51 private static function include_plugin_files() {
52 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_admin_settings.php' );
53 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_scripts.php' );
54 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_create_metabox.php' );
55 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_metabox.php' );
56 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_admin_ajax.php' );
57 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_functions.php' );
58 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_map.php' );
59 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_the_content.php' );
60 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_shortcode.php' );
61 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_gutenberg_block.php' );
62 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_contextual_map_widget.php' );
63 require_once( WP_MAPIT_DIR . 'classes/class.wp_mapit_widget.php' );
64 }
65 }
66 }