Skip to content

Commit 1505fd1

Browse files
committed
Minor CPT tweak to CPT example
1 parent a1153c8 commit 1505fd1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

app/PostTypes/Clients.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ public function __construct() {
2626
*/
2727
public function add_post_type_client() {
2828

29+
$labels = [ 'menu_name' => 'Client List' ];
30+
2931
$options = array(
3032
'supports' => array('title'),
31-
'labels' => array(
32-
'menu_name' => 'Client List'
33-
),
3433
'exclude_from_search' => true,
3534
'publicly_queryable' => true,
3635
'show_ui' => true,
@@ -46,7 +45,7 @@ public function add_post_type_client() {
4645
'singular' => 'Client',
4746
'plural' => 'Clients',
4847
'slug' => 'client'
49-
), $options
48+
), $options, $labels
5049
);
5150

5251
$cpt->icon('dashicons-star-filled');

0 commit comments

Comments
 (0)