예제 #1
0
<!-- Conditional Fields -->

<table class="form-table" data-type="conditional" rel="manual">
	<tr valign="top">
		<th scope="row"><label for="badge_to_users[]"><?php 
_e('Choose which users receive this badge', 'userpro');
?>
</label></th>
		<td>
			<select name="badge_to_users[]" id="badge_to_users[]" multiple="multiple" class="chosen-select" style="width:300px" data-placeholder="<?php 
_e('Choose...', 'userpro');
?>
">
				<?php 
$users = userpro_badges_admin_users();
foreach ($users as $user) {
    ?>
				<option value="<?php 
    echo $user->ID;
    ?>
"><?php 
    echo userpro_profile_data('display_name', $user->ID);
    if ($user->user_email) {
        echo ' (' . $user->user_email . ')';
    }
    ?>
</option>
				<?php 
}
?>
예제 #2
0
?>
</h3>
<table class="form-table">
	<tr valign="top">
		<th scope="row"><label for="badge_user"><?php 
_e('Select a user', 'userpro');
?>
</label></th>
		<td>
			<select name="badge_user" id="badge_user" class="chosen-select" style="width:300px" data-placeholder="">
				<option value=""><?php 
_e('Select a user...', 'userpro');
?>
</option>
				<?php 
$users = userpro_badges_admin_users(true);
foreach ($users as $user) {
    ?>
				<option value="<?php 
    echo $user->ID;
    ?>
" <?php 
    userpro_admin_post_value('badge_user', $user->ID, $_POST);
    ?>
><?php 
    echo userpro_profile_data('display_name', $user->ID);
    if ($user->user_email) {
        echo ' (' . $user->user_email . ')';
    }
    ?>
</option>