', 'scoper' ); $remove_all = __( '>>', 'scoper' ); $restore = __( '< Restore', 'scoper' ); $restore_all = __( '<<', 'scoper' ); $approve = __( 'Approve ^', 'scoper' ); $activate = __( 'Activate ^', 'scoper' ); $recommend = __( 'Recommend ^', 'scoper' ); if ( 'groups' == $agent_type ) { $can_admin = is_user_administrator_rs(); if ( $can_admin ) { $this->status []= 'active'; $this->list_ids [] = 'current_agents_rs'; $this->removal_ids [] = 'uncurrent_agents_rs'; $this->list_captions[] = __( 'Active Groups', 'scoper' ); $this->removal_captions[] = __( 'Remove', 'scoper' ); $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; $this->approval_button_id []= ''; $this->approval_caption []= ''; } if ( scoper_get_option( 'group_recommendations' ) && ( $can_admin || ( $can_moderate = current_user_can( 'recommend_group_membership' ) ) ) ) { $this->status []= 'recommended'; $this->list_ids [] = 'recommended_agents_rs'; $this->removal_ids [] = 'unrecommended_agents_rs'; $this->list_captions[] = __( 'Recommended Groups', 'scoper' ); $this->removal_captions[] = $remove; $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; if ( $can_admin ) { $this->approval_button_id []= 'recommended_to_active_rs'; $this->approval_caption []= $activate; } else { $this->approval_button_id []= ''; $this->approval_caption []= ''; } } if ( scoper_get_option( 'group_requests' ) && ( $can_admin || current_user_can( 'request_group_membership' ) ) ) { $this->status []= 'requested'; $this->list_ids [] = 'requested_agents_rs'; $this->removal_ids [] = 'unrequested_agents_rs'; $this->list_captions[] = __( 'Requested Groups', 'scoper' ); $this->removal_captions[] = $remove; $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; if ( $can_admin ) { $this->approval_button_id []= 'requested_to_active_rs'; $this->approval_caption []= $activate; } elseif ( $can_moderate ) { $this->approval_button_id []= 'requested_to_recommended_rs'; $this->approval_caption []= $recommend; } else { $this->approval_button_id []= ''; $this->approval_caption []= ''; } } } else { if ( ! empty( $_GET['page'] ) && ( 'rs-groups' == $_GET['page'] ) && ! empty( $_GET['id'] ) ) $group_id = $_GET['id']; else $group_id = 0; $can_admin = is_user_administrator_rs() || current_user_can( 'manage_groups', $group_id ); if ( $can_admin ) { $this->status []= 'active'; $this->list_ids [] = 'current_agents_rs'; $this->removal_ids [] = 'uncurrent_agents_rs'; $this->list_captions[] = __( 'Active Users', 'scoper' ); $this->removal_captions[] = $remove; $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; $this->approval_button_id []= ''; $this->approval_caption []= ''; } if ( scoper_get_option( 'group_recommendations' ) && ( $can_admin || ( $can_moderate = current_user_can( 'recommend_group_membership' ) ) ) ) { $this->status []= 'recommended'; $this->list_ids [] = 'recommended_agents_rs'; $this->removal_ids [] = 'unrecommended_agents_rs'; $this->list_captions[] = __( 'Recommended Users', 'scoper' ); $this->removal_captions[] = $remove; $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; if ( $can_admin ) { $this->approval_button_id []= 'recommended_to_active_rs'; $this->approval_caption []= $activate; } else { $this->approval_button_id []= ''; $this->approval_caption []= ''; } } if ( scoper_get_option( 'group_requests' ) && ( $can_admin || current_user_can( 'request_group_membership' ) ) ) { $this->status []= 'requested'; $this->list_ids [] = 'requested_agents_rs'; $this->removal_ids [] = 'unrequested_agents_rs'; $this->list_captions[] = __( 'Requested Users', 'scoper' ); $this->removal_captions[] = $remove; $this->remove_button []= $remove_btn; $this->remove_all_button []= $remove_all; $this->restore_button []= $restore; $this->restore_all_button []= $restore_all; if ( $can_admin ) { $this->approval_button_id []= 'requested_to_active_rs'; $this->approval_caption []= $activate; } elseif ( $can_moderate ) { $this->approval_button_id []= 'requesed_to_recommended_rs'; $this->approval_caption []= $recommend; } else { $this->approval_button_id []= ''; $this->approval_caption []= ''; } } } } function output_js( $agent_type = 'users', $agent_id ) { echo "\n" . ""; echo "\n" . ""; $site_url = admin_url(''); if ( ! $this->list_ids ) return; $list_id = $this->list_ids[0]; // only the logged user's highest authority listbox will receive new selections from search results ?> status[0] ) ) { if ( 'requested' == $this->status[0] ) $reqd_caps = 'request_group_membership'; elseif ( 'recommended' == $this->status[0] ) $reqd_caps = 'recommend_group_membership'; } $editable_group_ids = ScoperAdminLib::get_all_groups( FILTERED_RS, COL_ID_RS, array( 'reqd_caps' => $reqd_caps ) ); } if ( ! empty($this->list_ids) ) : ?>
|
list_captions[0];
?>
|
|
removal_captions[0];
?>
|
|
list_captions[$key];
?>
|
approval_button_id[$key] ) )
echo " "; ?> |
removal_captions[$key];
?>
|