diff --git a/uc-people.php b/uc-people.php index 13b9746..92a39b9 100644 --- a/uc-people.php +++ b/uc-people.php @@ -13,47 +13,47 @@ function create_custom_custom_post_type(){ $labels = array( - 'name' => 'Contacts', - 'singular_name' => 'Contact', - 'add_new' => 'New Contact', - 'add_new_item' => 'Add New Contact', - 'edit_item' => 'Edit Contact', - 'view_item' => 'View Contact', - 'search_items' => 'Search Contacts' + 'name' => 'People', + 'singular_name' => 'Person', + 'add_new' => 'New Person', + 'add_new_item' => 'Add New Person', + 'edit_item' => 'Edit Person', + 'view_item' => 'View Person', + 'search_items' => 'Search People' ); $args = array( - 'label' => 'Contacts', + 'label' => 'People', 'labels' => $labels, 'description' => '', 'public' => true, - 'menu_position' => 5, - 'menu_icon' => null, + 'menu_position' => 35, + 'menu_icon' => 'dashicons-groups', 'supports' => array( 'tags', 'thumbnail', 'revisions', 'page-attributes' ), 'has_archive' => true ); - register_post_type( 'contact', $args ); + register_post_type( 'person', $args ); - register_taxonomy( 'team', 'contact', + register_taxonomy( 'team', 'person', array( - 'label' => 'Teams', + 'label' => 'Groups', 'labels' => array( - 'name' => 'Teams', - 'singular_name' => 'Team', - 'search_items' => 'Search Teams', - 'edit_item' => 'Edit ', - 'view_item' => 'Team.viewitem', - 'update_item' => 'Update Team', - 'add_new_item' => 'Add new Team', - 'new_item_name' => 'Team.newitemname' + 'name' => 'Groups', + 'singular_name' => 'Group', + 'search_items' => 'Search Groups', + 'edit_item' => 'Edit Group', + 'view_item' => 'View Group', + 'update_item' => 'Update Group', + 'add_new_item' => 'Add new Group', + 'new_item_name' => 'New Group' ), 'public' => true, 'hierarchical' => true, 'rewrite' => array('hierarchical' => true ) ) ); - register_taxonomy( 'tag', 'contact', + register_taxonomy( 'tag', 'person', array( 'label' => 'Tags', 'labels' => array( @@ -130,7 +130,7 @@ function importFile(){ 'post_title' => $title, 'post_name' => 'testing-contact', 'post_status' => 'publish', - 'post_type' => 'contact', + 'post_type' => 'person', 'menu_order' => ( !empty($v['Order']) ? $v['Order'] : 0 ), ); $id = wp_insert_post( $args, true ); @@ -148,7 +148,7 @@ function importFile(){ } function uc_people_settings_page_menu(){ - add_users_page( 'Import People', 'Import People', 'manage_options', 'uc-import-people', 'uc_people_settings_page' ); + add_submenu_page('tools.php', 'Import People', 'Import People', 'manage_options', 'uc-import-people', 'uc_people_settings_page' ); } add_action('admin_menu', 'uc_people_settings_page_menu'); @@ -169,4 +169,6 @@ function uc_people_settings_page(){ \ No newline at end of file