golden hour
/home/godaofbq/dev.hyperredbed.com/wp-content/plugins/wp-social-pro/template/admin
⬆️ Go Up
Upload
File/Folder
Size
Actions
content-users-list.php
10.13 KB
Del
OK
modules.php
2.48 KB
Del
OK
Edit: content-users-list.php
<?php defined('ABSPATH') || exit; /* ------------------------------- - Count user per page - Count serial number ------------------------------- */ $loop = $page ? (($page * $users_per_page) - ($users_per_page - 1)) : 1; $entries = $loop; if($page != 1) { if(count($users) != $users_per_page) { $to = $total_users; } else { $to = (count($users) * $page); } } else { $to = count($users); } ?> <div class="wslu-social-pro-userlist-page"> <!-- Page Header start --> <div class="wslu-main-header"> <h1> <span class="wslu-icon met-social met-social-cog-icon"></span> <?php esc_html_e('WP Social User List', 'wp-social-pro'); ?> </h1> </div> <!-- page header end --> <!-- main wrapper for filter and user data table --> <div class="wslu-user-list-container"> <!----------------------------- user data table start --------------------------- --> <div class="wslu-user-table-content"> <table class="styled-table"> <thead> <tr> <th class="wslu-no">#</th> <th class="wslu-avator"><?php esc_html_e('Avatar', 'wp-social-pro') ?></th> <th class="wslu-first-name"><?php esc_html_e('First Name', 'wp-social-pro'); ?></th> <th class="wslu-last-name"><?php esc_html_e('Last Name', 'wp-social-pro'); ?></th> <th class="wslu-email"><?php esc_html_e('Email', 'wp-social-pro') ?></th> <th class="wslu-role"><?php esc_html_e('Role', 'wp-social-pro') ?></th> <th class="wslu-register-by"><?php esc_html_e('Register By', 'wp-social-pro') ?></th> <th class="wslu-registration-time"><?php esc_html_e('Registration time', 'wp-social-pro') ?></th> <th class="wslu-action"><?php esc_html_e('Action', 'wp-social-pro') ?></th> </tr> </thead> <tbody> <?php foreach($users as $user) : $user_data = get_userdata($user->data->ID) ?> <tr> <td class="wslu-no" data-title="<?php esc_attr_e('No', 'wp-social-pro')?>"><?php echo esc_html($loop++) ?></td> <td class="wslu-avator" data-title="<?php esc_attr_e('Avatar','wp-social-pro')?>"><?php echo get_avatar($user->data->ID, 40) ?></td> <td class="wslu-first-name" data-title="<?php esc_attr_e('First Name', 'wp-social-pro')?>"><?php echo esc_html($user_data->first_name) ?></td> <td class="wslu-last-name" data-title="<?php esc_attr_e('Last Name', 'wp-social-pro')?>"><?php echo esc_html($user_data->last_name) ?></td> <td class="wslu-email" data-title="<?php esc_attr_e('Email', 'wp-social-pro')?>"><?php echo esc_html($user_data->user_email) ?></td> <td class="wslu-role" data-title="<?php esc_attr_e('Role', 'wp-social-pro')?>"><?php echo esc_html($user_data->roles[0]) ?></td> <td class="wslu-register-by" data-title="<?php esc_attr_e('Register By', 'wp-social-pro')?>"><?php echo esc_html($user_data->xs_social_register_by) ?></td> <td class="wslu-registration-time" data-title="<?php esc_attr_e('Registration time', 'wp-social-pro')?>"><?php echo esc_html($user_data->user_registered) ?></td> <td class="wslu-action" data-title="<?php esc_attr_e('Action', 'wp-social-pro')?>"> <a href="<?php echo esc_url(admin_url() . 'user-edit.php?user_id=' . $user->data->ID) ?>" class="btn"> <?php echo esc_html('Edit', 'wp-social') ?> </a> </td> </tr> <?php endforeach ?> </tbody> </table> <!----------------------------- show pagination for table --------------------------- --> <p> <?php echo esc_html__('Showing', 'wp-social-pro') . ' ' . $entries . ' ' . esc_html__('to', 'wp-social-pro') . ' ' . $to . ' ' . esc_html__('of', 'wp-social-pro') . ' ' . $total_users ?> entries</p> <div class="pagination"> <?php echo paginate_links([ 'base' => $base, 'format' => '&p=%#%', 'prev_text' => __('« Previous', 'wp-social-pro'), 'next_text' => __('Next »', 'wp-social-pro'), 'total' => $total_pages, 'current' => $page, 'end_size' => 1, 'mid_size' => 5, ]); ?> </div> <!-- end of show pagination for table --> </div> <!-- user data table end --> <!----------------------------- user filter section start --------------------------- --> <div class="wslu-user-list-filters"> <div class="sticky-top"> <!-- filter provider --> <div class="wslu-user-list-filters__provider"> <form action="<?php echo esc_url(admin_url() . 'admin.php'); ?>" method="get"> <input type="hidden" value="wslu_global_setting-ulist" name="page"> <input type="hidden" name="per_page" value="<?php echo esc_attr($users_per_page) ?>"> <p class="filter-label"> <?php echo esc_html__('Show Providers', 'wp-social-pro') ?> </p> <select name="filter" onchange="this.form.submit()"> <option value=""> <?php echo esc_html__('All', 'wp-social-pro') ?> </option> <?php foreach($providers as $provider) : ?> <option value="<?php echo esc_attr($provider->meta_value) ?>" <?php echo \WP_Social\Helper\Helper::is_true($filter, strtolower($provider->meta_value), 'selected') ?> > <?php echo esc_html($provider->meta_value) ?> </option> <?php endforeach ?> </select> </form> </div> <!-- end of providers --> <!-- entries to show --> <div class="wslu-user-list-filters__entries"> <form action="<?php echo esc_url(admin_url() . 'admin.php'); ?>" method="get"> <?php if($filter) : ?> <input type="hidden" name="filter" value="<?php echo esc_attr($filter) ?>"> <?php endif; ?> <input type="hidden" value="wslu_global_setting-ulist" name="page"> <label> <p class="filter-label"> <?php echo esc_html__('Show Entries', 'wp-social-pro') ?> </p> <select name="per_page" onchange="this.form.submit()"> <option <?php echo \WP_Social\Helper\Helper::is_true($users_per_page, 5, 'selected') ?> value="5"> <?php echo esc_html('5', 'wp-social') ?> </option> <option <?php echo \WP_Social\Helper\Helper::is_true($users_per_page, 10, 'selected') ?> value="10"> <?php echo esc_html('10', 'wp-social') ?> </option> <option <?php echo \WP_Social\Helper\Helper::is_true($users_per_page, 25, 'selected') ?> value="25"> <?php echo esc_html('25', 'wp-social') ?> </option> <option <?php echo \WP_Social\Helper\Helper::is_true($users_per_page, 50, 'selected') ?> value="50"> <?php echo esc_html('50', 'wp-social') ?> </option> <option <?php echo \WP_Social\Helper\Helper::is_true($users_per_page, 100, 'selected') ?> value="100"> <?php echo esc_html('100', 'wp-social') ?> </option> </select> </label> </form> </div> <!-- end of show entries --> <!-- export button option --> <div class="wslu-user-list-filters__export"> <form action="<?php echo esc_url(admin_url() . 'admin-ajax.php') ?>" method="post" target="_blank"> <p class="filter-label"> <?php echo esc_html__('Export User List', 'wp-social-pro') ?> </p> <select name="provider"> <option value="all" selected><?php echo esc_html__('All', 'wp-social-pro') ?></option> <?php foreach($providers as $provider) : ?> <option value="<?php echo esc_attr($provider->meta_value) ?>"> <?php echo esc_html($provider->meta_value) ?> </option> <?php endforeach ?> </select> <input type="hidden" name="action" value="export_users_content_csv_pro"/> <?php wp_nonce_field('wslu_export_users_list_nonce', 'wslu_export_users_list_nonce') ?> <!-- Export as CSV --> <button type="submit" class="export wslu-export-button"><?php echo esc_html__('Export CSV', 'wp-social-pro') ?></button> </form> </div> <!-- end of export filter --> </div> </div> <!-- user filter section end --> </div> </div> <!-- end of main parent div -->
Save