public static function get_instance() { //if the instance is not set, let us create it if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
/** * PHP 5 constructor * * @package Custom Community * @since 1.8.3 */ function __construct() { global $bp; // Load predefined constants first thing add_action('cc_init', array($this, 'load_constants'), 2); // Includes necessary files add_action('cc_init', array($this, 'includes'), 100, 4); // Includes the necessary js add_action('wp_enqueue_scripts', array($this, 'enqueue_script'), 2); // Let plugins know that Custom Community has started loading $this->init_hook(); // Let other plugins know that Custom Community has finished initializing $this->loaded(); if (function_exists('bp_is_active')) { BPUnifiedsearch::get_instance(); } if (!is_admin()) { $Theme_Generator = new CC_Theme_Generator(); } }