/** * Return an instance of this class. * * @since 1.0.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
function setUp() { parent::setUp(); $this->main_class = Builtin_Taxos_CPT::get_instance(); $args = array('public' => true, 'label' => 'Books', 'taxonomies' => array('post_tag')); register_post_type('book', $args); $args = array('public' => true, 'label' => 'Paper'); register_post_type('paper', $args); $args = array('public' => false, 'label' => 'Pen', 'taxonomies' => array('post_tag')); register_post_type('pen', $args); }