private function registerTaxonomy(Taxonomy $taxonomy)
    {
        $labelParser = new LabelParser($taxonomy);
        $labelParser->parse();
        $singular   = $labelParser->singular();
        $plural     = $labelParser->plural();

        $key = $this->model->getWordpressKey() . "_" . $taxonomy->getWordpressKey();

        $customizedOptions = $taxonomy->getConfiguration() + array(
            'hierarchical'               => false,
            'public'                     => true,
            'show_ui'                    => true,
            'show_admin_column'          => true,
            'update_count_callback'     => '_update_post_term_count',
            'query_var'                 =>  $key,
            'show_in_nav_menus'          => false,
            'show_tagcloud'              => false,
            'rewrite' => array(),
            'capabilities' => array(),
            'labels'=> array()
        );

        $customizedOptions['capabilities'] += array(
            'manage_terms' => 'read',
            'edit_terms'   => 'read',
            'delete_terms' => 'read',
            'assign_terms' => 'read',
        );

        $customizedOptions['rewrite'] += array(
            'with_front' => true,
            'slug' => $key
        );

        $customizedOptions['labels'] += array(
            'name'                => _x($plural, 'Post Type General Name', 'strata'),
            'singular_name'       => _x($singular, 'Post Type Singular Name', 'strata'),
            'menu_name'           => __($plural, 'strata'),
            'parent_item_colon'   => __($singular. ' Item:', 'strata'),
            'all_items'           => __('All ' . $plural, 'strata'),
            'view_item'           => __('View ' . $singular. ' Item', 'strata'),
            'add_new_item'        => __('Add New', 'strata'),
            'add_new'             => __('Add New', 'strata'),
            'edit_item'           => __('Edit ' . $singular, 'strata'),
            'update_item'         => __('Update ' . $singular, 'strata'),
            'search_items'        => __('Search ' . $plural, 'strata'),
            'not_found'           => __('Not found', 'strata'),
            'not_found_in_trash'  => __('Not found in Trash', 'strata'),
        );

        $wordpressKey = $taxonomy->getWordpressKey();
        Strata::app()->setConfig("runtime.taxonomy.query_vars.$wordpressKey", $customizedOptions['query_var']);

        return register_taxonomy($wordpressKey, array($this->model->getWordpressKey()), $customizedOptions);
    }
private function registerTaxonomy(Taxonomy $taxonomy)
    {
        $labelParser = new LabelParser($taxonomy);
        $labelParser->parse();
        $singular   = $labelParser->singular();
        $plural     = $labelParser->plural();

        $key = $this->model->getWordpressKey() . "_" . $taxonomy->getWordpressKey();

        $customizedOptions = $taxonomy->getConfiguration() + array(
            'hierarchical'               => false,
            'public'                     => true,
            'show_ui'                    => true,
            'show_admin_column'          => true,
            'update_count_callback'     => '_update_post_term_count',
            'query_var'                 =>  $key,
            'show_in_nav_menus'          => false,
            'show_tagcloud'              => false,
            'rewrite' => array(),
            'capabilities' => array(),
            'labels'=> array()
        );

        $customizedOptions['capabilities'] += array(
            'manage_terms' => 'read',
            'edit_terms'   => 'read',
            'delete_terms' => 'read',
            'assign_terms' => 'read',
        );

        $customizedOptions['rewrite'] += array(
            'with_front' => true,
            'slug' => $key
        );

        $customizedOptions['labels'] += array(
            'name'                => _x($plural, 'Post Type General Name', 'strata'),
            'singular_name'       => _x($singular, 'Post Type Singular Name', 'strata'),
            'menu_name'           => __($plural, 'strata'),
            'parent_item_colon'   => __($singular. ' Item:', 'strata'),
            'all_items'           => __('All ' . $plural, 'strata'),
            'view_item'           => __('View ' . $singular. ' Item', 'strata'),
            'add_new_item'        => __('Add New', 'strata'),
            'add_new'             => __('Add New', 'strata'),
            'edit_item'           => __('Edit ' . $singular, 'strata'),
            'update_item'         => __('Update ' . $singular, 'strata'),
            'search_items'        => __('Search ' . $plural, 'strata'),
            'not_found'           => __('Not found', 'strata'),
            'not_found_in_trash'  => __('Not found in Trash', 'strata'),
        );

        $wordpressKey = $taxonomy->getWordpressKey();
        Strata::app()->setConfig("runtime.taxonomy.query_vars.$wordpressKey", $customizedOptions['query_var']);

        return register_taxonomy($wordpressKey, array($this->model->getWordpressKey()), $customizedOptions);
    }
private function registerTaxonomy ( Taxonomy $ taxonomy ) { $ labelParser = new LabelParser ( $ taxonomy ) ; $ labelParser -> parse ( ) ; $ singular = $ labelParser -> singular ( ) ; $ plural = $ labelParser -> plural ( ) ; $ key = $ this -> model -> getWordpressKey ( ) . "_" . $ taxonomy -> getWordpressKey ( ) ; $ customizedOptions = $ taxonomy -> getConfiguration ( ) + array ( 'hierarchical' => false , 'public' => true , 'show_ui' => true , 'show_admin_column' => true , 'update_count_callback' => '_update_post_term_count' , 'query_var' => $ key , 'show_in_nav_menus' => false , 'show_tagcloud' => false , 'rewrite' => array ( ) , 'capabilities' => array ( ) , 'labels' => array ( ) ) ; $ customizedOptions [ 'capabilities' ] += array ( 'manage_terms' => 'read' , 'edit_terms' => 'read' , 'delete_terms' => 'read' , 'assign_terms' => 'read' , ) ; $ customizedOptions [ 'rewrite' ] += array ( 'with_front' => true , 'slug' => $ key ) ; $ customizedOptions [ 'labels' ] += array ( 'name' => _x ( $ plural , 'Post Type General Name' , 'strata' ) , 'singular_name' => _x ( $ singular , 'Post Type Singular Name' , 'strata' ) , 'menu_name' => __ ( $ plural , 'strata' ) , 'parent_item_colon' => __ ( $ singular . ' Item:' , 'strata' ) , 'all_items' => __ ( 'All ' . $ plural , 'strata' ) , 'view_item' => __ ( 'View ' . $ singular . ' Item' , 'strata' ) , 'add_new_item' => __ ( 'Add New' , 'strata' ) , 'add_new' => __ ( 'Add New' , 'strata' ) , 'edit_item' => __ ( 'Edit ' . $ singular , 'strata' ) , 'update_item' => __ ( 'Update ' . $ singular , 'strata' ) , 'search_items' => __ ( 'Search ' . $ plural , 'strata' ) , 'not_found' => __ ( 'Not found' , 'strata' ) , 'not_found_in_trash' => __ ( 'Not found in Trash' , 'strata' ) , ) ; $ wordpressKey = $ taxonomy -> getWordpressKey ( ) ; Strata :: app ( ) -> setConfig ( "runtime.taxonomy.query_vars.$wordpressKey" , $ customizedOptions [ 'query_var' ] ) ; return register_taxonomy ( $ wordpressKey , array ( $ this -> model -> getWordpressKey ( ) ) , $ customizedOptions ) ; }
Registers a taxonomy
@param  Taxonomy $taxonomy The taxonomy model
@return object What is being returned by register_taxonomy
Registers a taxonomy