-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathpiklist-custom-post-type.php
53 lines (53 loc) · 1.41 KB
/
piklist-custom-post-type.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Source: https://piklist.com/learn/doc/piklist_post_types/
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;
}