mage-eventpress/inc/mep_tax.php

80 lines
3.8 KiB
PHP
Raw Normal View History

<?php
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
function mep_cpt_tax(){
$labels = array(
2018-10-31 05:30:00 -04:00
'name' => _x( 'Event Category','mepevent' ),
'singular_name' => _x( 'Event Category','mepevent' ),
'menu_name' => __( 'Category', 'mepevent' ),
'all_items' => __( 'All Event Category', 'mepevent' ),
'parent_item' => __( 'Parent Category', 'mepevent' ),
'parent_item_colon' => __( 'Parent Category:', 'mepevent' ),
'new_item_name' => __( 'New Category Name', 'mepevent' ),
'add_new_item' => __( 'Add New Category', 'mepevent' ),
'edit_item' => __( 'Edit Category', 'mepevent' ),
'update_item' => __( 'Update Category', 'mepevent' ),
'view_item' => __( 'View Category', 'mepevent' ),
'separate_items_with_commas' => __( 'Separate Category with commas', 'mepevent' ),
'add_or_remove_items' => __( 'Add or remove Category', 'mepevent' ),
'choose_from_most_used' => __( 'Choose from the most used', 'mepevent' ),
'popular_items' => __( 'Popular Category', 'mepevent' ),
'search_items' => __( 'Search Category', 'mepevent' ),
'not_found' => __( 'Not Found', 'mepevent' ),
'no_terms' => __( 'No Category', 'mepevent' ),
'items_list' => __( 'Category list', 'mepevent' ),
'items_list_navigation' => __( 'Category list navigation', 'mepevent' ),
);
$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(
2018-10-31 05:30:00 -04:00
'name' => _x( 'Event Organizer','mepevent' ),
'singular_name' => _x( 'Event Organizer','mepevent' ),
'menu_name' => __( 'Organizer', 'mepevent' ),
'all_items' => __( 'All Event Organizer', 'mepevent' ),
'parent_item' => __( 'Parent Organizer', 'mepevent' ),
'parent_item_colon' => __( 'Parent Organizer:', 'mepevent' ),
'new_item_name' => __( 'New Organizer Name', 'mepevent' ),
'add_new_item' => __( 'Add New Organizer', 'mepevent' ),
'edit_item' => __( 'Edit Organizer', 'mepevent' ),
'update_item' => __( 'Update Organizer', 'mepevent' ),
'view_item' => __( 'View Organizer', 'mepevent' ),
'separate_items_with_commas' => __( 'Separate Organizer with commas', 'mepevent' ),
'add_or_remove_items' => __( 'Add or remove Organizer', 'mepevent' ),
'choose_from_most_used' => __( 'Choose from the most used', 'mepevent' ),
'popular_items' => __( 'Popular Organizer', 'mepevent' ),
'search_items' => __( 'Search Organizer', 'mepevent' ),
'not_found' => __( 'Not Found', 'mepevent' ),
'no_terms' => __( 'No Organizer', 'mepevent' ),
'items_list' => __( 'Organizer list', 'mepevent' ),
'items_list_navigation' => __( 'Organizer list navigation', 'mepevent' ),
);
$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);