mage-eventpress/inc/mep_tax.php

80 lines
3.6 KiB
PHP

<?php
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
function mep_cpt_tax(){
$labels = array(
'name' => _x( 'Event Category','mep' ),
'singular_name' => _x( 'Event Category','mep' ),
'menu_name' => __( 'Category', 'mep' ),
'all_items' => __( 'All Event Category', 'mep' ),
'parent_item' => __( 'Parent Category', 'mep' ),
'parent_item_colon' => __( 'Parent Category:', 'mep' ),
'new_item_name' => __( 'New Category Name', 'mep' ),
'add_new_item' => __( 'Add New Category', 'mep' ),
'edit_item' => __( 'Edit Category', 'mep' ),
'update_item' => __( 'Update Category', 'mep' ),
'view_item' => __( 'View Category', 'mep' ),
'separate_items_with_commas' => __( 'Separate Category with commas', 'mep' ),
'add_or_remove_items' => __( 'Add or remove Category', 'mep' ),
'choose_from_most_used' => __( 'Choose from the most used', 'mep' ),
'popular_items' => __( 'Popular Category', 'mep' ),
'search_items' => __( 'Search Category', 'mep' ),
'not_found' => __( 'Not Found', 'mep' ),
'no_terms' => __( 'No Category', 'mep' ),
'items_list' => __( 'Category list', 'mep' ),
'items_list_navigation' => __( 'Category list navigation', 'mep' ),
);
$args = array(
'hierarchical' => true,
"public" => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => true,
'rewrite' => array( 'slug' => 'event-category' ),
);
register_taxonomy('mep_cat', 'mep_events', $args);
$labelso = array(
'name' => _x( 'Event Organizer','mep' ),
'singular_name' => _x( 'Event Organizer','mep' ),
'menu_name' => __( 'Organizer', 'mep' ),
'all_items' => __( 'All Event Organizer', 'mep' ),
'parent_item' => __( 'Parent Organizer', 'mep' ),
'parent_item_colon' => __( 'Parent Organizer:', 'mep' ),
'new_item_name' => __( 'New Organizer Name', 'mep' ),
'add_new_item' => __( 'Add New Organizer', 'mep' ),
'edit_item' => __( 'Edit Organizer', 'mep' ),
'update_item' => __( 'Update Organizer', 'mep' ),
'view_item' => __( 'View Organizer', 'mep' ),
'separate_items_with_commas' => __( 'Separate Organizer with commas', 'mep' ),
'add_or_remove_items' => __( 'Add or remove Organizer', 'mep' ),
'choose_from_most_used' => __( 'Choose from the most used', 'mep' ),
'popular_items' => __( 'Popular Organizer', 'mep' ),
'search_items' => __( 'Search Organizer', 'mep' ),
'not_found' => __( 'Not Found', 'mep' ),
'no_terms' => __( 'No Organizer', 'mep' ),
'items_list' => __( 'Organizer list', 'mep' ),
'items_list_navigation' => __( 'Organizer list navigation', 'mep' ),
);
$argso = array(
'hierarchical' => true,
"public" => true,
'labels' => $labelso,
'show_ui' => true,
'show_admin_column' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => true,
'rewrite' => array( 'slug' => 'event-organizer' ),
);
register_taxonomy('mep_org', 'mep_events', $argso);
}
add_action("init","mep_cpt_tax",10);