Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Changing labels, icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmbacon committed Jul 15, 2015
1 parent 9c1e98d commit 2c42c10
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions uc-people.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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 );
Expand All @@ -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');

Expand All @@ -169,4 +169,6 @@ function uc_people_settings_page(){

</div>
<?php
}
}
include 'acf-export.php';
?>

0 comments on commit 2c42c10

Please sign in to comment.