Recent

Popular_Authors class Pro only

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(  );

Render the popular authors shortcode.

Line: 124

public function popular_authors_shortcode( $atts ): string;
TypeNameDescription
array$attsShortcode attributes.

Returns: string — HTML.

Render the legacy Popular Authors shortcode.

Line: 134

public function legacy_popular_authors_shortcode( $atts ): string;
TypeNameDescription
array$attsShortcode attributes.

Returns: string — HTML.

author_posts_shortcode()

Render the author posts shortcode.

Line: 168

public function author_posts_shortcode( $atts ): string;
TypeNameDescription
array$attsShortcode attributes.

Returns: string — HTML.

legacy_author_posts_shortcode()

Render the legacy author posts shortcode.

Line: 178

public function legacy_author_posts_shortcode( $atts ): string;
TypeNameDescription
array$attsShortcode attributes.

Returns: string — HTML.

add_settings_section()

Add the Popular Authors settings tab.

Line: 226

public function add_settings_section( $sections ): array;
TypeNameDescription
array$sectionsSettings sections.

Returns: array

register_settings()

Register Popular Authors settings.

Line: 237

public function register_settings( $settings ): array;
TypeNameDescription
array$settingsRegistered 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;
TypeNameDescription
string$styleStyle 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;
TypeNameDescription
array$argsDisplay arguments.

Returns: string

get_authors() static

Query author rankings from Top 10 count tables.

Line: 597

static public function get_authors( $args = ... ): array;
TypeNameDescription
array$argsQuery 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;
TypeNameDescription
int|string$authorUser value.
string$fieldUser field.
array$argsDisplay arguments.

Returns: string