Last active
April 15, 2016 00:02
-
-
Save feliciaceballos/c279bd58d751731fac596d17ffebca8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Piklist Create Custom Post Types | |
Creates Portfolio Items, Clients and Prospects | |
*/ | |
add_filter('piklist_post_types', 'automaton_post_types'); | |
function automaton_post_types($post_types) | |
{ | |
$post_types = array_merge($post_types, array( | |
'portfolio' => array( | |
'labels' => piklist('post_type_labels', 'Portfolio Item') | |
,'title' => __('Enter a new Portfolio Item Title') | |
,'menu_icon' => 'dashicons-portfolio' | |
,'page_icon' => 'dashicons-portfolio' | |
,'supports' => array( | |
'title' | |
,'editor' | |
,'revisions' | |
) | |
,'public' => true | |
,'has_archive' => true | |
,'rewrite' => array( | |
'slug' => 'portfolio' | |
) | |
,'edit_columns' => array( | |
'title' => __('Project Name') | |
,'automaton_organization_about' => __('About') | |
,'author' => __('Completed by') | |
) | |
) | |
,'prospects' => array( | |
'labels' => piklist('post_type_labels', 'Prospects') | |
,'title' => __('Enter a new Prospect Title') | |
,'menu_icon' => 'dashicons-id' | |
,'page_icon' => 'dashicons-id' | |
,'exclude_from_search' => true | |
,'publicly_queryable' => false | |
,'supports' => array( | |
'title' | |
,'revisions' | |
) | |
,'public' => true | |
,'has_archive' => true | |
,'rewrite' => array( | |
'slug' => 'prospects' | |
) | |
,'edit_columns' => array( | |
'title' => __('Prospect Name') | |
,'author' => __('Assigned to') | |
) | |
) | |
,'clients' => array( | |
'labels' => piklist('post_type_labels', 'Clients') | |
,'title' => __('Enter a new Client Title') | |
,'menu_icon' => 'dashicons-id-alt' | |
,'page_icon' => 'dashicons-id-alt' | |
,'exclude_from_search' => true | |
,'publicly_queryable' => false | |
,'supports' => array( | |
'title' | |
,'revisions' | |
) | |
,'status' => array( | |
'draft' => array( | |
'label' => 'New Client' | |
) | |
,'current' => array( | |
'label' => 'Current Client' | |
) | |
,'archive' => array( | |
'label' => 'Aarchived Client' | |
) | |
) | |
,'public' => true | |
,'has_archive' => true | |
,'edit_columns' => array( | |
'title' => __('Client Name') | |
,'automaton_client_email' => __('Email') | |
,'author' => __('Assigned to') | |
) | |
,'rewrite' => array( | |
'slug' => 'clients' | |
) | |
) | |
)); | |
return $post_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment