Pro
Class to load all the pro features.
Namespace: WebberZone\Top_Ten\Pro
Since: 4.0.0
Source: includes/pro/class-pro.php line 25
Methods
__construct()
Constructor
Line: 129
public function __construct( );
register_popular_authors_stubs()
Register stub shortcodes when Popular Authors is disabled so that raw shortcode text does not leak into published content.
Since: 4.4.0
Line: 179
public function register_popular_authors_stubs( );
hooks()
Register hooks
Since: 4.0.0
Line: 191
public function hooks( );
filter_maintenance_days()
Filter the maintenance days.
Allows Pro users to override the number of days of data retained in the daily table.
Since: 4.2.0
Line: 221
public function filter_maintenance_days( $days ): int;
| Type | Name | Description |
|---|---|---|
int |
$days |
Number of days before which post data is deleted from daily tables. |
Returns: int — Updated number of days.
filter_log_retention_days()
Filter the visits log retention days.
Allows Pro users to override the number of days of raw visit rows retained in the log table.
Since: 4.3.0
Line: 241
public function filter_log_retention_days( $days ): int;
| Type | Name | Description |
|---|---|---|
int |
$days |
Number of days before which rows are deleted from the visits log table. |
Returns: int — Updated number of days.
update_shortcode_defaults()
Update the shortcode defaults.
Since: 4.0.0
Line: 259
public function update_shortcode_defaults( $defaults ): array;
| Type | Name | Description |
|---|---|---|
array |
$defaults |
Default shortcode settings. |
Returns: array — Updated shortcode settings.
short_circuit()
Shortcode circuit.
Since: 4.0.0
Line: 277
public function short_circuit( $short_circuit, $args, $post ): bool;
| Type | Name | Description |
|---|---|---|
bool |
$short_circuit |
Short circuit flag. |
array |
$args |
Arguments array. |
\WP_Post |
$post |
Post object. |
Returns: bool — True if short circuit is enabled.
update_tptn_query_args_before()
Update the Top 10 query args before the query is run.
Since: 4.0.0
Line: 305
public function update_tptn_query_args_before( $args, $source_post ): array;
| Type | Name | Description |
|---|---|---|
array |
$args |
The query arguments. |
\WP_Post |
$source_post |
The source post. |
Returns: array — Updated query arguments.
update_registered_settings()
Update the registered settings.
Since: 4.0.0
Line: 332
public function update_registered_settings( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Registered settings. |
Returns: array — Updated registered settings.
uninstall_pro() static
Uninstall the pro plugin features.
Since: 4.0.0
Line: 358
static public function uninstall_pro( );
delete_data() static
Delete plugin data.
Since: 4.0.0
Line: 384
static public function delete_data( ): void;
Returns: void
update_exclude_terms_include_parents()
Update the exclude terms include parents setting.
Since: 4.0.0
Line: 395
public function update_exclude_terms_include_parents( $include_parents ): bool;
| Type | Name | Description |
|---|---|---|
bool |
$include_parents |
Include parents flag. |
Returns: bool — Updated include parents flag.
add_max_execution_time()
Adds MAX_EXECUTION_TIME hint to MySQL queries.
Since: 4.1.0
Line: 415
public function add_max_execution_time( $sql, $query ): string;
| Type | Name | Description |
|---|---|---|
string |
$sql |
The complete SQL query. |
\WebberZone\Top_Ten\Top_Ten_Core_Query |
$query |
The Top_Ten_Core_Query instance. |
Returns: string — Modified SQL query with MAX_EXECUTION_TIME hint.
filter_rss_feed_settings()
Filter the RSS feed settings to add category filtering support.
Since: 4.1.0
Line: 454
public function filter_rss_feed_settings( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Array of RSS feed settings. |
Returns: array — Modified settings array.