PluginProbe
Private groups / 2.4
Private groups v2.4
trunk 1.5 1.6 1.7 1.8 1.8.1 1.9.1 1.9.2 2.0 2.0.1 2.2 2.3 2.4 2.5 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 All 116 releases
bbp-private-groups / includes / role_assignment.php

role_assignment.php in Private groups 2.4, at includes/role_assignment.php

74 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php //************************* Group name settings *************************//
2 Function pg_role_assignment () { ?>
3 <?php global $rpg_roles;
4 global $wp_roles;
5 global $rpg_groups ;
6 $all_roles = $wp_roles->roles ;
7
8 ?>
9 <form method="post" action="options.php">
10
11 <?php settings_fields( 'rpg_roles_settings' ); ?>
12
13 <table class="form-table">
14
15 <tr valign="top">
16 <th colspan="2"><p>This section is optional and designed to allow those of you who use membership plugins etc. to assign a group against a wordpress or custom role.
17 </p>
18 <p> By entering a group against a role, new users with that role will be allocated the group automatically as part of the registration process. You can subsequently change individual users, and changing elements in this tab will only affect new registrations, not change anyone who has already registered.</p>
19
20 <p>For instance you may want all wordpress authors to automatically belong to a particular group, or you may have created a role called 'member' in your membership plugin, and want to automatically give these access to a private group called say membership.
21 </p>
22 <p>This section only applies to wordpress roles !
23 </p>
24 </th></tr>
25
26 <?php foreach($all_roles as $role=>$value) {
27 $name = $value['name'] ;
28 $item="rpg_roles[".$role."]" ;
29 if (substr($role,0,4) != 'bbp_') {
30 ?>
31 <!------------------------- Role --------------------------------------------->
32 <tr valign="top">
33 <th><?php echo $name ?></th>
34 <td>
35 <?php echo '<select name="'.$item.'">'; ?>
36 <?php echo ' ' ; ?>
37 <?php if ($rpg_roles[$role] != 'no-Group') {
38 $name2= $rpg_roles[$role] ;
39 $item2=$name2.' '.$rpg_groups[$name2] ;
40 ?>
41 <option value="<?php echo $name2 ?>"><?php echo $item2 ?></option>
42 <?php } ?>
43 <option value="no-group"> <?php _e( 'no-Group') ?></option>
44 <?php
45 //sets up the groups as actions
46 $count=count ($rpg_groups) ;
47 for ($i = 0 ; $i < $count ; ++$i) {
48 $g=$i+1 ;
49 $name2="group".$g ;
50 $item2=$name2.' '.$rpg_groups[$name2] ;
51 ?>
52 <option value="<?php echo $name2 ?>"><?php echo $item2 ?></option>
53
54 <?php } ?>
55 </select>
56 </td>
57 </tr>
58 <?php }}
59 ?>
60 </td>
61 </tr>
62 </table>
63 <!-- save the options -->
64 <p class="submit">
65 <input type="submit" value="<?php _e( 'Save Changes' ); ?>" class="button action doaction" name="">
66 </p>
67 </form>
68 </div><!--end sf-wrap-->
69 </div><!--end wrap-->
70
71 <?php
72
73 }
74 ?>