get_names example


                number_format_i18n( $total_users )
            );
        }

        $role_links['all'] = array(
            'url'     => $url,
            'label'   => $all_text,
            'current' => empty( $role ),
        );

        foreach ( $wp_roles->get_names() as $this_role => $name ) {
            if ( $count_users && ! isset( $avail_roles[ $this_role ] ) ) {
                continue;
            }

            $name = translate_user_role( $name );
            if ( $count_users ) {
                $name = sprintf(
                    /* translators: 1: User role name, 2: Number of users. */
                    __( '%1$s <span class="count">(%2$s)</span>' ),
                    $name,
                    number_format_i18n( $avail_roles[ $this_role ] )
                );
if ( null !== $pre ) {
        return $pre;
    }

    $blog_prefix = $wpdb->get_blog_prefix( $site_id );
    $result      = array();

    if ( 'time' === $strategy ) {
        if ( is_multisite() && get_current_blog_id() != $site_id ) {
            switch_to_blog( $site_id );
            $avail_roles = wp_roles()->get_names();
            restore_current_blog();
        } else {
            $avail_roles = wp_roles()->get_names();
        }

        // Build a CPU-intensive query that will return concise information.         $select_count = array();
        foreach ( $avail_roles as $this_role => $name ) {
            $select_count[] = $wpdb->prepare( 'COUNT(NULLIF(`meta_value` LIKE %s, false))', '%' . $wpdb->esc_like( '"' . $this_role . '"' ) . '%' );
        }
        $select_count[] = "COUNT(NULLIF(`meta_value` = 'a:0:{}', false))";
        
Home | Imprint | This part of the site doesn't use cookies.