<?php
if ( !defined( 'ABSPATH' ) ) exit;

//
// Sidebars Register
// 
function vr_register_post_sidebars() {

	register_post_type( 'vr_sidebars',
	array( 
		'menu_icon' 	=> 'dashicons-editor-justify',
		'supports' 		=> array( 'title', 'author' ),
		'public' 		=> true,
		'show_ui' 		=> true,		
		'labels'        => array( 
			'name'                	=> __( 'Sidebars', PLUGIN_NAME ),
			'singular_name'       	=> __( 'Sidebar', PLUGIN_NAME ),
			'add_new'             	=> __( 'Add New Sidebar', PLUGIN_NAME ),	
			'add_new_item'        	=> __( 'Add New Sidebar', PLUGIN_NAME ),		
			'menu_name'           	=> __( 'Sidebars', PLUGIN_NAME ),
			'parent_item_colon'   	=> __( 'Parent Sidebar', PLUGIN_NAME ),
			'all_items'           	=> __( 'All Sidebars', PLUGIN_NAME ),
			'view_item'           	=> __( 'View Sidebar', PLUGIN_NAME ),
			'edit_item'           	=> __( 'Edit Sidebar', PLUGIN_NAME ),
			'update_item'         	=> __( 'Update Sidebar', PLUGIN_NAME ),
			'search_items'        	=> __( 'Search Sidebar', PLUGIN_NAME ),
			'not_found' 			=> __(  'No Sidebar found', PLUGIN_NAME ),
			'not_found_in_trash'	=> __(  'No Sidebar found in Trash', PLUGIN_NAME ),
			'parent' 				=> __(  'Parent Sidebar', PLUGIN_NAME ),
		)
	) );

	register_taxonomy(
		'vr_sidebars_categories',
		'vr_sidebars',
		array(
			'labels' => array( 
				'name' 				=> __( 'Sidebars Categories', PLUGIN_NAME ),
				'singular_name' 	=> __( 'Category', PLUGIN_NAME ),
				'search_items'  	=> __( 'Search Categories', PLUGIN_NAME ),
				'all_items' 		=> __( 'All Categories', PLUGIN_NAME ),
				'parent_item' 		=> __( 'Parent Category', PLUGIN_NAME ),
				'parent_item_colon' => __( 'Parent Category:', PLUGIN_NAME ),
				'edit_item' 		=> __( 'Edit Category', PLUGIN_NAME ),
				'update_item' 		=> __( 'Update Category', PLUGIN_NAME ),
				'add_new_item' 		=> __( 'Add New Category', PLUGIN_NAME ),
				'new_item_name'		=> __( 'New Category Name', PLUGIN_NAME ),
				'menu_name' 		=> __( 'Categories', PLUGIN_NAME ),
			),
			'hierarchical' => true, 
			'public' => true, 
			'rewrite' => true
		)
	);

	register_taxonomy(
		'vr_sidebars_tags',
		'vr_sidebars',
		array(
			'labels' => array( 
				'name' 				=> __( 'Sidebars Tags', PLUGIN_NAME ),
				'singular_name' 	=> __( 'Tag', PLUGIN_NAME ),
				'search_items'  	=> __( 'Search Tags', PLUGIN_NAME ),
				'all_items' 		=> __( 'All Tags', PLUGIN_NAME ),
				'parent_item' 		=> __( 'Parent Tag', PLUGIN_NAME ),
				'parent_item_colon'	=> __( 'Parent Tag:', PLUGIN_NAME ),
				'edit_item' 		=> __( 'Edit Tag', PLUGIN_NAME ),
				'update_item' 		=> __( 'Update Tag', PLUGIN_NAME ),
				'add_new_item' 		=> __( 'Add New Tag', PLUGIN_NAME ),
				'new_item_name' 	=> __( 'New Tag Name', PLUGIN_NAME ),
				'menu_name' 		=> __( 'Tags', PLUGIN_NAME ),
			),
			'hierarchical' => false, 
			'public' => true,
			'rewrite' => true
		)
	);
	
}
add_action( 'init', 'vr_register_post_sidebars' );
$vr_sidebars_metabox = new VP_Metabox( plugin_dir_path( __FILE__ ) . 'sidebars_metabox.php' );

/*
 * EOF
 */