Created
June 13, 2016 23:28
-
-
Save feliciaceballos/9d5e599d80e4ff50988f4d3c99adec1b to your computer and use it in GitHub Desktop.
Registering Custom Post Type in Piklist
This file contains 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
<?php | |
add_filter('piklist_post_types', 'piklist_demo_post_types'); | |
function piklist_demo_post_types($post_types) | |
{ | |
$post_types['piklist_demo'] = array( | |
'labels' => piklist('post_type_labels', 'Piklist Demo') | |
,'title' => __('Enter Custom Title') | |
,'public' => true | |
,'rewrite' => array( | |
'slug' => 'piklist-demo' | |
) | |
,'capability_type' => 'post' | |
,'edit_columns' => array( | |
'title' => __('Order Number') | |
,'author' => __('customer') | |
) | |
,'hide_post_row_actions' => array( | |
'trash' | |
,'edit' | |
,'quick-edit' | |
) | |
,'hide_meta_box' => array( | |
'slug' | |
,'author' | |
) | |
,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png') | |
,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png') | |
,'admin_body_class' => array ( | |
'piklist-demonstration' | |
,'piklist-sample' | |
) | |
,'status' => array( | |
'draft' => array( | |
'label' => 'New Order' | |
) | |
,'estimate' => array( | |
'label' => 'Request for Estimate' | |
) | |
,'quoted' => array( | |
'label' => 'Quoted' | |
) | |
) | |
); | |
return $post_types; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment