Recent

Display class

Display

Display class.

Namespace: WebberZone\Popular_Authors\Frontend
Since: 1.2.0
Source: includes/frontend/class-display.php line 21

Methods

__construct()

Constructor class.

Since: 1.2.0
Line: 28

public function __construct(  );

List all the authors of the site, with several options available.

Since: 1.2.0
Line: 41

static public function list_popular_authors( $args = ... ): void|string;
TypeNameDescription
array$argsList of arguments. See self::list_popular_authors_args() for full list.

Returns: void|string — Void if ‘echo’ argument is true, list of authors if ‘echo’ is false.

Get the popular author IDs.

Since: 1.0.0
Line: 269

static public function get_popular_author_ids( $args = ... ): object;
TypeNameDescription
string|array$args{

Returns: object — List of popular authors and corresponding view counts.

Fills in missing query variables with default values.

Since: 1.0.0
Line: 508

static public function list_popular_authors_args( $args = ... ): array;
TypeNameDescription
string|array$args{

Returns: array — Complete query variables with undefined ones filled in with defaults.

get_avatar() static

Retrieve the avatar <img> tag for a user, email address, MD5 hash, comment, or post.

Since: 1.1.0
Line: 581

static public function get_avatar( $author, $args = ... ): string|false;
TypeNameDescription
\WP_User&#124;int$authorAuthor’s \WP_User object or user ID.
array$args{

Returns: string|false<img> tag for the user’s avatar. False on failure.

cache_get_key() static

Generate cache key for the given arguments.

Since: 1.2.0
Line: 633

static public function cache_get_key( $args ): string;
TypeNameDescription
array$argsArguments array.

Returns: string — Cache key.