Popular_Authors
Adds author rankings backed by Top 10 visit data.
Namespace: WebberZone\Top_Ten\Pro\Popular_Authors
Since: 4.4.0
Source: includes/popular-authors/class-popular-authors.php line 21
Methods
__construct()
Register the premium feature.
Line: 35
public function __construct( );
register_shortcodes()
Register shortcodes.
Line: 49
public function register_shortcodes( );
register_widgets()
Register the legacy Popular Authors widget.
Line: 59
public function register_widgets( );
add_dashboard_widget()
Add the Top Authors dashboard widget.
Since: 4.4.0
Line: 68
public function add_dashboard_widget( );
render_dashboard_widget()
Render the Top Authors dashboard widget.
Since: 4.4.0
Line: 81
public function render_dashboard_widget( );
popular_authors_shortcode()
Render the popular authors shortcode.
Line: 124
public function popular_authors_shortcode( $atts ): string;
| Type | Name | Description |
|---|---|---|
array | $atts | Shortcode attributes. |
Returns: string — HTML.
legacy_popular_authors_shortcode()
Render the legacy Popular Authors shortcode.
Line: 134
public function legacy_popular_authors_shortcode( $atts ): string;
| Type | Name | Description |
|---|---|---|
array | $atts | Shortcode attributes. |
Returns: string — HTML.
author_posts_shortcode()
Render the author posts shortcode.
Line: 168
public function author_posts_shortcode( $atts ): string;
| Type | Name | Description |
|---|---|---|
array | $atts | Shortcode attributes. |
Returns: string — HTML.
legacy_author_posts_shortcode()
Render the legacy author posts shortcode.
Line: 178
public function legacy_author_posts_shortcode( $atts ): string;
| Type | Name | Description |
|---|---|---|
array | $atts | Shortcode attributes. |
Returns: string — HTML.
add_settings_section()
Add the Popular Authors settings tab.
Line: 226
public function add_settings_section( $sections ): array;
| Type | Name | Description |
|---|---|---|
array | $sections | Settings sections. |
Returns: array
register_settings()
Register Popular Authors settings.
Line: 237
public function register_settings( $settings ): array;
| Type | Name | Description |
|---|---|---|
array | $settings | Registered settings. |
Returns: array
get_styles() static
Get the various styles.
Since: 4.4.0
Line: 366
static public function get_styles( ): array;
Returns: array — Style options.
register_styles() static
Register and enqueue the Popular Authors styles.
Since: 4.4.0
Line: 400
static public function register_styles( );
get_style() static
Get the current style for the popular authors.
Since: 4.4.0
Line: 428
static public function get_style( $style = ... ): array;
| Type | Name | Description |
|---|---|---|
string | $style | Style parameter. |
Returns: array — Contains two elements: ‘name’ holding the style name and ‘extra_css’ to be added inline.
get_defaults() static
Get default display arguments.
Line: 465
static public function get_defaults( ): array;
Returns: array
list_authors() static
Render ranked authors.
Line: 504
static public function list_authors( $args = ... ): string;
| Type | Name | Description |
|---|---|---|
array | $args | Display arguments. |
Returns: string
get_authors() static
Query author rankings from Top 10 count tables.
Line: 597
static public function get_authors( $args = ... ): array;
| Type | Name | Description |
|---|---|---|
array | $args | Query arguments. |
Returns: array
display_author_posts() static
Render Top 10 posts for one author.
Line: 676
static public function display_author_posts( $author, $field, $args ): string;
| Type | Name | Description |
|---|---|---|
int|string | $author | User value. |
string | $field | User field. |
array | $args | Display arguments. |
Returns: string