Recent

AbilitiesclassPro only

Abilities

Registers Pro cache and post exclusion abilities.

Namespace: WebberZone\Contextual_Related_Posts\Pro
Since: 4.5.0
Source: includes/pro/class-abilities.php line 23

Methods

__construct()

Register the Pro ability hook.

Since: 4.5.0
Line: 39

public function __construct( ?Exclusion_Service $exclusions = ... );
Type Name Description
Exclusion_Service|null $exclusions Post exclusion service.

register_abilities()

Register the Pro abilities.

Since: 4.5.0
Line: 54

public function register_abilities(  ): void;

Returns: void

can_manage()

Check whether the current user can manage the site.

Since: 4.5.0
Line: 157

public function can_manage( $input = ... ): bool;
Type Name Description
mixed $input Ability input.

Returns: bool — Whether the user can manage site options.

clear_cache()

Clear one post’s cache or the entire Contextual Related Posts cache.

Since: 4.5.0
Line: 171

public function clear_cache( $input ): array|\WP_Error;
Type Name Description
mixed $input Ability input.

Returns: array|\WP_Error — Cache clear result or an error.

exclude_post()

Set whether a post is excluded from related posts.

Since: 4.5.0
Line: 213

public function exclude_post( $input ): array|\WP_Error;
Type Name Description
mixed $input Ability input.

Returns: array|\WP_Error — Post exclusion state or an error.