| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $uwp_in_user_loop; |
| 7 |
$uwp_in_user_loop = true; |
| 8 |
$the_query = isset( $args['template_args']['the_query'] ) ? $args['template_args']['the_query'] : ''; |
| 9 |
$maximum_pages = isset( $args['template_args']['maximum_pages'] ) ? $args['template_args']['maximum_pages'] : ''; |
| 10 |
$users = isset( $args['template_args']['users'] ) ? $args['template_args']['users'] : ''; |
| 11 |
$total_users = isset( $args['template_args']['total_users'] ) ? $args['template_args']['total_users'] : ''; |
| 12 |
?> |
| 13 |
<div class="uwp-users-loop"> |
| 14 |
<?php |
| 15 |
|
| 16 |
// The Loop |
| 17 |
if ( $users ) { |
| 18 |
|
| 19 |
echo '<div class="row row-cols-1 row-cols-sm-2 '.apply_filters('uwp_users_list_ul_extra_class', '').'">'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 20 |
|
| 21 |
global $uwp_user; |
| 22 |
$original_user = $uwp_user; |
| 23 |
foreach ($users as $uwp_user){ |
| 24 |
uwp_get_template( 'bootstrap/users-item.php', $args ); |
| 25 |
} |
| 26 |
|
| 27 |
$uwp_user = $original_user; |
| 28 |
echo '</div>'; |
| 29 |
|
| 30 |
/* Restore original Post Data */ |
| 31 |
wp_reset_postdata(); |
| 32 |
} else { |
| 33 |
// no users found |
| 34 |
uwp_no_users_found(); |
| 35 |
} |
| 36 |
do_action('uwp_after_users_list'); |
| 37 |
?> |
| 38 |
</div><!-- .uwp-users-loop --> |
| 39 |
|
| 40 |
<?php |
| 41 |
$uwp_in_user_loop = false; |
| 42 |
?> |
| 43 |
|