/** * Initialise the post type data * * @return $this */ protected function _initPostTypes() { if (!is_null(self::$_postTypes)) { return $this; } self::$_postTypes = false; $transportObject = new Varien_Object(array('post_types' => false)); Mage::dispatchEvent('wordpress_app_init_post_types', array('transport' => $transportObject, 'helper' => $this)); if ($transportObject->getPostTypes()) { self::$_postTypes = $transportObject->getPostTypes(); } else { self::$_postTypes = array('post' => Mage::getModel('wordpress/post_type')->setData(array('post_type' => 'post', 'rewrite' => array('slug' => $this->getWpOption('permalink_structure')), 'taxonomies' => array('category', 'post_tag'), '_builtin' => true)), 'page' => Mage::getModel('wordpress/post_type')->setData(array('post_type' => 'page', 'rewrite' => array('slug' => '%postname%/'), 'hierarchical' => true, 'taxonomies' => array(), '_builtin' => true))); } return $this; }