@@ -49,24 +49,24 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function labels() { |
51 | 51 | |
52 | - $labels = array( |
|
53 | - 'name' => _x( '', 'Post Type General Name', 'textdomain' ), |
|
54 | - 'singular_name' => _x( '', 'Post Type Singular Name', 'textdomain' ), |
|
55 | - 'menu_name' => __( '', 'textdomain' ), |
|
56 | - 'parent_item_colon' => __( '', 'textdomain' ), |
|
57 | - 'all_items' => __( '', 'textdomain' ), |
|
58 | - 'view_item' => __( '', 'textdomain' ), |
|
59 | - 'add_new_item' => __( '', 'textdomain' ), |
|
60 | - 'add_new' => __( '', 'textdomain' ), |
|
61 | - 'edit_item' => __( '', 'textdomain' ), |
|
62 | - 'update_item' => __( '', 'textdomain' ), |
|
63 | - 'search_items' => __( '', 'textdomain' ), |
|
64 | - 'not_found' => __( '', 'textdomain' ), |
|
65 | - 'not_found_in_trash' => __( '', 'textdomain' ), |
|
66 | - ); |
|
67 | - |
|
68 | - return $labels; |
|
69 | - } |
|
52 | + $labels = array( |
|
53 | + 'name' => _x( '', 'Post Type General Name', 'textdomain' ), |
|
54 | + 'singular_name' => _x( '', 'Post Type Singular Name', 'textdomain' ), |
|
55 | + 'menu_name' => __( '', 'textdomain' ), |
|
56 | + 'parent_item_colon' => __( '', 'textdomain' ), |
|
57 | + 'all_items' => __( '', 'textdomain' ), |
|
58 | + 'view_item' => __( '', 'textdomain' ), |
|
59 | + 'add_new_item' => __( '', 'textdomain' ), |
|
60 | + 'add_new' => __( '', 'textdomain' ), |
|
61 | + 'edit_item' => __( '', 'textdomain' ), |
|
62 | + 'update_item' => __( '', 'textdomain' ), |
|
63 | + 'search_items' => __( '', 'textdomain' ), |
|
64 | + 'not_found' => __( '', 'textdomain' ), |
|
65 | + 'not_found_in_trash' => __( '', 'textdomain' ), |
|
66 | + ); |
|
67 | + |
|
68 | + return $labels; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | 72 | /** |
@@ -76,42 +76,42 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @return Array |
78 | 78 | */ |
79 | - public function args( $labels ) { |
|
80 | - |
|
81 | - $args = array( |
|
82 | - 'label' => __( '', 'textdomain' ), |
|
83 | - 'description' => __( '', 'textdomain' ), |
|
84 | - 'labels' => $labels, |
|
85 | - 'supports' => array( 'title', 'editor', 'thumbnail' ), |
|
86 | - 'taxonomies' => array( 'topics', 'post_tag' ), |
|
87 | - 'hierarchical' => true, |
|
88 | - 'public' => true, |
|
79 | + public function args( $labels ) { |
|
80 | + |
|
81 | + $args = array( |
|
82 | + 'label' => __( '', 'textdomain' ), |
|
83 | + 'description' => __( '', 'textdomain' ), |
|
84 | + 'labels' => $labels, |
|
85 | + 'supports' => array( 'title', 'editor', 'thumbnail' ), |
|
86 | + 'taxonomies' => array( 'topics', 'post_tag' ), |
|
87 | + 'hierarchical' => true, |
|
88 | + 'public' => true, |
|
89 | 89 | 'rewrite' => array( 'slug' => 'slug_name' ), |
90 | - 'show_ui' => true, |
|
91 | - 'show_in_menu' => true, |
|
90 | + 'show_ui' => true, |
|
91 | + 'show_in_menu' => true, |
|
92 | 92 | 'menu_icon' => 'data:image/svg+xml;base64,' . self::$menu_svg, |
93 | - 'show_in_nav_menus' => true, |
|
94 | - 'show_in_admin_bar' => true, |
|
95 | - 'menu_position' => 5, |
|
96 | - 'can_export' => true, |
|
97 | - 'has_archive' => true, |
|
98 | - 'exclude_from_search' => false, |
|
99 | - 'publicly_queryable' => true, |
|
100 | - 'capability_type' => 'post', |
|
101 | - 'show_in_rest' => true, |
|
102 | - ); |
|
103 | - |
|
104 | - return $args; |
|
105 | - } |
|
93 | + 'show_in_nav_menus' => true, |
|
94 | + 'show_in_admin_bar' => true, |
|
95 | + 'menu_position' => 5, |
|
96 | + 'can_export' => true, |
|
97 | + 'has_archive' => true, |
|
98 | + 'exclude_from_search' => false, |
|
99 | + 'publicly_queryable' => true, |
|
100 | + 'capability_type' => 'post', |
|
101 | + 'show_in_rest' => true, |
|
102 | + ); |
|
103 | + |
|
104 | + return $args; |
|
105 | + } |
|
106 | 106 | |
107 | 107 | |
108 | 108 | /** |
109 | - * Modify the cpt messages |
|
109 | + * Modify the cpt messages |
|
110 | 110 | * |
111 | 111 | * @param Array $messages |
112 | 112 | * |
113 | 113 | * @return Array |
114 | - */ |
|
114 | + */ |
|
115 | 115 | public function cpt_updated_messages( $messages ) { |
116 | 116 | |
117 | 117 | global $post, $post_ID; |