Popular_Authors_Display
Class for displaying author’s top posts.
Namespace: WebberZone\Popular_Authors\Frontend
Since: 1.3.0
Source: includes/frontend/class-popular-authors-display.php line 21
Methods
get_author_top_posts() static
Get top posts for a specific author.
Since: 1.3.0
Line: 41
static public function get_author_top_posts( $author, $field = ..., $args = ... ): array|\WP_Error;
| Type | Name | Description |
|---|---|---|
int|string | $author | Author value for $field. A user ID, slug, email address, or login name. |
string | $field | Field to query by: ‘id’, ‘ID’, ‘slug’, ‘email’, or ‘login’. |
array | $args | { |
Returns: array|\WP_Error — Array of post objects or \WP_Error on failure.
display_author_top_posts() static
Display author’s top posts.
Since: 1.3.0
Line: 76
static public function display_author_top_posts( $author, $field = ..., $args = ... ): string;
| Type | Name | Description |
|---|---|---|
int|string | $author | Author value for $field. A user ID, slug, email address, or login name. |
string | $field | Field to query by: ‘id’, ‘ID’, ‘slug’, ‘email’, or ‘login’. |
array | $args | Optional. Arguments for the query. |
Returns: string — HTML output of the author’s top posts.