@@ -43,6 +43,13 @@ public static function register_taxonomies() {
4343 $ preacher_label = ( \SermonManager::getOption ( 'preacher_label ' ) ? strtolower ( \SermonManager::getOption ( 'preacher_label ' ) ) : __ ( 'Preacher ' , 'sermon-manager-for-wordpress ' ) );
4444 $ preacher_label_plural = $ preacher_label . 's ' ;
4545
46+ $ capabilities = array (
47+ 'manage_terms ' => 'manage_wpfc_categories ' ,
48+ 'edit_terms ' => 'manage_wpfc_categories ' ,
49+ 'delete_terms ' => 'manage_wpfc_categories ' ,
50+ 'assign_terms ' => 'manage_wpfc_categories '
51+ );
52+
4653 register_taxonomy ( 'wpfc_preacher ' ,
4754 apply_filters ( 'sm_taxonomy_objects_wpfc_preacher ' , array ( 'wpfc_sermon ' ) ),
4855 apply_filters ( 'sm_taxonomy_args_wpfc_preacher ' , array (
@@ -76,6 +83,7 @@ public static function register_taxonomies() {
7683 'slug ' => $ permalinks ['wpfc_preacher ' ],
7784 'with_front ' => false ,
7885 ),
86+ 'capabilities ' => $ capabilities ,
7987 ) )
8088 );
8189
@@ -105,6 +113,7 @@ public static function register_taxonomies() {
105113 'slug ' => $ permalinks ['wpfc_sermon_series ' ],
106114 'with_front ' => false ,
107115 ),
116+ 'capabilities ' => $ capabilities ,
108117 ) )
109118 );
110119
@@ -134,6 +143,7 @@ public static function register_taxonomies() {
134143 'slug ' => $ permalinks ['wpfc_sermon_topics ' ],
135144 'with_front ' => false ,
136145 ),
146+ 'capabilities ' => $ capabilities ,
137147 ) )
138148 );
139149
@@ -163,6 +173,7 @@ public static function register_taxonomies() {
163173 'slug ' => $ permalinks ['wpfc_bible_book ' ],
164174 'with_front ' => false ,
165175 ),
176+ 'capabilities ' => $ capabilities ,
166177 ) )
167178 );
168179
@@ -192,6 +203,7 @@ public static function register_taxonomies() {
192203 'slug ' => $ permalinks ['wpfc_service_type ' ],
193204 'with_front ' => false ,
194205 ),
206+ 'capabilities ' => $ capabilities ,
195207 ) )
196208 );
197209
@@ -238,7 +250,11 @@ public static function register_post_types() {
238250 ),
239251 'public ' => true ,
240252 'show_ui ' => true ,
241- 'capability_type ' => 'post ' ,
253+ 'capability_type ' => 'wpfc_sermon ' ,
254+ 'capabilities ' => array (
255+ 'manage_wpfc_categories ' => 'manage_wpfc_categories ' ,
256+ 'manage_wpfc_sm_settings ' => 'manage_wpfc_sm_settings '
257+ ),
242258 'map_meta_cap ' => true ,
243259 'publicly_queryable ' => true ,
244260 'exclude_from_search ' => false ,
0 commit comments