Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: SS Users Table for Codeable
- Plugin URL: *
- Description: A plugin that gives you possibility to list users in a jquery table.
- Version: 1.0.0
- Author: SS
- Author URI: *
- Text Domain: ss-users-table
- Domain Path: /
- */
- function ss_get_users() {
- $args = array(
- 'role' => '',
- 'orderby' => 'display_name',
- 'order' => 'ASC',
- );
- $users = get_users( $args );
- $table = '<ul>';
- foreach ( $users as $user ) {
- $table .= '<li>' . esc_html( $user->display_name ) . '[' . esc_html( $user->user_email ) . '] </li>';
- // return $user;
- }
- $table .= '</ul>';
- return $table;
- }
- add_shortcode('ss_users_table','ss_get_users');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement