public static function activation()
 {
     Linker_Main::instance()->cpt->register_post_type();
     flush_rewrite_rules();
 }
示例#2
0
 public function test_getinstance()
 {
     $this->assertInstanceOf('Linker_Main', Linker_Main::instance());
 }
示例#3
0
    }
    /**
     * Disable unserializing of the class
     *
     * @since 1.0.0
     * @return void
     */
    public function __wakeup()
    {
        // Unserializing instances of the class is forbidden
        _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?', 'linker'), '1.0.0');
    }
    /**
     * @since 1.0.0
     * @return Linker_Main
     */
    public static function instance()
    {
        if (is_null(self::$_instance)) {
            self::$_instance = new Linker_Main();
        }
        return self::$_instance;
    }
    private function __construct()
    {
        $this->cpt = new Linker_CPT();
        add_action('plugins_loaded', array(&$this, 'load_textdomain'));
    }
}
Linker_Main::instance();
// EOF