| @@ -7,12 +7,21 @@ | ||
| 7 | 7 | add_action( 'init', 'wdk_custom_user_roles' ); |
| 8 | 8 | function wdk_custom_user_roles() |
| 9 | 9 | { |
| 10 | 10 | add_role('wdk_agent' , __('Agent', 'wpdirectorykit'), array( 'read' => true, 'level_0' => true ) ); |
| 11 | + $role = get_role('wdk_agent'); | |
| 12 | + $role->add_cap('edit_own_listings'); | |
| 13 | + $role->add_cap('edit_own_profile'); | |
| 14 | + $role->add_cap('upload_files'); | |
| 11 | 15 | |
| 12 | - $role = get_role('wdk_agent'); | |
| 16 | + add_role('wdk_listing_admin' , __('Listing Admin', 'wpdirectorykit'), array( 'read' => true, 'level_0' => true ) ); | |
| 17 | + $role = get_role('wdk_listing_admin'); | |
| 13 | 18 | $role->add_cap('edit_own_listings'); |
| 14 | 19 | $role->add_cap('edit_own_profile'); |
| 15 | 20 | $role->add_cap('upload_files'); |
| 21 | + $role->add_cap('wdk_listings_manage'); | |
| 22 | + | |
| 23 | + $role = get_role('administrator'); | |
| 24 | + $role->add_cap('wdk_listings_manage'); | |
| 16 | 25 | } |
| 17 | 26 | |
| 18 | 27 | ?> |