Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->settings['manageraccess'] = array(
- 'section' => 'manager',
- 'title' => __('Manager Mode Access'),
- 'desc' => __(''),
- 'type' => 'manageraccess',
- 'std' => '',
- 'dflt' => '',
- 'helplink'=> 'yes',
- 'submit' => 'yes'
- );
- 'choices' => array(
- 'op1' => 'Option 1',
- 'op2' => 'Option 2',
- ),
- case 'manageraccess':
- global $wp_roles;
- $all_roles = $wp_roles->roles;
- $editable_roles = apply_filters('editable_roles', $all_roles);
- echo '<select multiple="multiple" class="select chozed-select' . $field_class . '" name="myplugin_options[' . $id . '][]" data-placeholder=" ">';
- foreach($editable_roles as $role=>$theroles){
- echo '<option value="' . esc_attr($role) . '" '.selected($options[$id], $role, false) . '>'.$wp_roles->role_names[$role].'</option>';
- }
- echo '</select>' . $helplink;
- if ($desc != '')
- echo '<br /><div class="ssfa-description">' . $desc . '</div>';
- if ($submit != null)
- echo '<br /><br /><br />'.$submit;
- break;
- public function get_settings(){
- global $wp_roles;
- $this->settings['managertest'] = array(
- 'section' => 'manager',
- 'title' => __('Manager Mode Access'),
- 'desc' => __(''),
- 'type' => 'multi_select',
- 'std' => '',
- 'dflt' => '',
- 'choices' => $wp_roles->role_names,
- 'helplink'=> 'yes',
- 'submit' => 'yes'
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement