public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     // end if
     return self::$instance;
 }
Exemple #2
0
/**
 * Plugin Name: MJJ FAQ
 * Version: 0.1-alpha
 * Description: A simple plugin using the WP-API and React to make faqs
 * Author: JJ Jay
 * Text Domain: mjj-faq
 * Domain Path: /languages
 * @package mjj-faq
 */
require_once plugin_dir_path(__FILE__) . 'class-mjj-faq-cpt.php';
require_once plugin_dir_path(__FILE__) . 'class-mjj-faq-metaboxes.php';
require_once plugin_dir_path(__FILE__) . 'class-mjj-faq-api.php';
MJJ_FAQ::get_instance();
MJJ_FAQ_CPT::get_instance();
MJJ_FAQ_Metaboxes::get_instance();
MJJ_FAQ_API::get_instance();
class MJJ_FAQ
{
    protected static $instance = null;
    public static function get_instance()
    {
        // If the single instance hasn't been set, set it now.
        if (null == self::$instance) {
            self::$instance = new self();
        }
        // end if
        return self::$instance;
    }
    // end get_instance
    private function __construct()