WP_MS_Users_List_Table::get_views() –

You appear to be a bot. Output may be restricted

Description

Usage

$array = WP_MS_Users_List_Table::get_views();

Parameters

Returns

array

Source

File name: wordpress/wp-admin/includes/class-wp-ms-users-list-table.php
Lines:

1 to 42 of 42
  protected function get_views() {
    global $role;

    $total_users  = get_user_count();
    $super_admins = get_super_admins();
    $total_admins = count( $super_admins );

    $current_link_attributes = 'super' !== $role ? ' class="current" aria-current="page"' : '';
    $role_links              = array();
    $role_links['all']       = sprintf(
      '<a href="%s"%s>%s</a>',
      network_admin_url( 'users.php' ),
      $current_link_attributes,
      sprintf(
        /* translators: Number of users. */
        _nx(
          'All <span class="count">(%s)</span>',
          'All <span class="count">(%s)</span>',
          $total_users,
          'users'
        ),
        number_format_i18n( $total_users )
      )
    );
    $current_link_attributes = 'super' === $role ? ' class="current" aria-current="page"' : '';
    $role_links['super']     = sprintf(
      '<a href="%s"%s>%s</a>',
      network_admin_url( 'users.php?role=super' ),
      $current_link_attributes,
      sprintf(
        /* translators: Number of users. */
        _n(
          'Super Admin <span class="count">(%s)</span>',
          'Super Admins <span class="count">(%s)</span>',
          $total_admins
        ),
        number_format_i18n( $total_admins )
      )
    );

    return $role_links;
  }
 

 View on GitHub View on Trac