Last active
November 17, 2016 02:59
-
-
Save sbruner/ea33171ae4af0db7d914 to your computer and use it in GitHub Desktop.
Piklist: Registering Post Types
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
<?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 a new Demo Title') | |
,'menu_icon' => piklist('url', 'piklist') . '/parts/img/piklist-menu-icon.svg' | |
,'page_icon' => piklist('url', 'piklist') . '/parts/img/piklist-page-icon-32.png' | |
,'supports' => array( | |
'title' | |
,'post-formats' | |
) | |
,'public' => true | |
,'admin_body_class' => array( | |
'custom-body-class' | |
) | |
,'has_archive' => true | |
,'rewrite' => array( | |
'slug' => 'piklist-demo' | |
) | |
,'capability_type' => 'post' | |
,'edit_columns' => array( | |
'title' => __('Demo') | |
,'author' => __('Assigned to') | |
) | |
,'hide_meta_box' => array( | |
'author' | |
) | |
,'status' => array( | |
'new' => array( | |
'label' => 'New' | |
,'public' => false | |
) | |
,'pending' => array( | |
'label' => 'Pending Review' | |
,'public' => false | |
) | |
,'demo' => array( | |
'label' => 'Demo' | |
,'public' => true | |
,'exclude_from_search' => true | |
,'show_in_admin_all_list' => true | |
,'show_in_admin_status_list' => true | |
) | |
,'lock' => array( | |
'label' => 'Lock' | |
,'public' => true | |
) | |
) | |
); | |
return $post_types; | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there's an extra comma on line 30
,'author'