From 2c42c101bc561a4d655a21b65182f69bf9f31614 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 15 Jul 2015 10:21:30 -0400 Subject: [PATCH 1/3] Changing labels, icons. --- uc-people.php | 52 ++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) 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 From 07e3a51ef272941a21517de9ca8a3a4e3cf611f0 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 15 Jul 2015 10:33:04 -0400 Subject: [PATCH 2/3] Adding help text. --- uc-people.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/uc-people.php b/uc-people.php index 92a39b9..1e1cb6b 100644 --- a/uc-people.php +++ b/uc-people.php @@ -155,7 +155,15 @@ function uc_people_settings_page_menu(){ function uc_people_settings_page(){ ?>
-

Import People

+

Import People from Users CSV

+

This tool is to help people with the initial setup of "People" in their site.

+

New Site Setup

+

For new sites, use the "Export Users" tool to generate a template. Open that in a spreadsheet program, and fill out *all* of the information you'll want on your site, and then import that .csv here.

+

Converting UUP Users to "People"

+

For sites that were using the University User Profiles plugin, use the "Export Users" tool and then import that full list here.

+
+

One Time Use

+

This tool can not be used to update information about each Person. If you upload the same .csv twice, you will end up with two records for each person.

From 2c9afc8f55d74862d20edbd3980493f9d34ce946 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 15 Jul 2015 10:37:47 -0400 Subject: [PATCH 3/3] More help text --- uc-people.php | 1 + 1 file changed, 1 insertion(+) diff --git a/uc-people.php b/uc-people.php index 1e1cb6b..04a108f 100644 --- a/uc-people.php +++ b/uc-people.php @@ -164,6 +164,7 @@ function uc_people_settings_page(){

One Time Use

This tool can not be used to update information about each Person. If you upload the same .csv twice, you will end up with two records for each person.

+

Choose .csv in the "export users" specific format.