PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | custom_user_roles.php +10 -1 1.2.6 → 1.5.9 View file →
@@ -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 ?>