Add fictioneer_filter_patreon_tier_unlock filter
This commit is contained in:
parent
0b9df8e84a
commit
91b8083b0a
15
FILTERS.md
15
FILTERS.md
@ -1245,6 +1245,21 @@ Filters the HTML of the message displayed below the Patreon unlock button. The m
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### `apply_filters( 'fictioneer_filter_patreon_tier_unlock', $required, $post, $user, $patreon_post_data )`
|
||||||
|
Filters the boolean to determine whether a post is unlocked via Patreon tier.
|
||||||
|
|
||||||
|
**Parameters:**
|
||||||
|
* $required (boolean) – Whether the post is unlocked.
|
||||||
|
* $post (WP_Post) – The post object.
|
||||||
|
* $user (WP_User) – The current user.
|
||||||
|
* $patreon_post_data (array) – Relevant Patreon data for the post.
|
||||||
|
* 'gated' (boolean) - Whether the post has tiers or a cent amount assigned.
|
||||||
|
* 'gate_tiers' (array) - Tiers that unlock the post.
|
||||||
|
* 'gated' (int) - Minimum cent amount that unlocks the post.
|
||||||
|
* 'gate_lifetime_cents' (int) - Minimum lifetime cent amount that unlocks the post.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### `apply_filters( 'fictioneer_filter_post_card_footer', $footer_items, $post, $args )`
|
### `apply_filters( 'fictioneer_filter_post_card_footer', $footer_items, $post, $args )`
|
||||||
Filters the intermediate output array in the `_card-post.php` partial before it is imploded and rendered. Contains statistics with icons such as the author, publishing date, and comments.
|
Filters the intermediate output array in the `_card-post.php` partial before it is imploded and rendered. Contains statistics with icons such as the author, publishing date, and comments.
|
||||||
|
|
||||||
|
@ -546,6 +546,8 @@ function fictioneer_bypass_password( $required, $post ) {
|
|||||||
( $patreon_user_data['lifetime_support_cents'] ?? -1 ) >= $patreon_check_lifetime_amount_cents
|
( $patreon_user_data['lifetime_support_cents'] ?? -1 ) >= $patreon_check_lifetime_amount_cents
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$required = apply_filters( 'fictioneer_filter_patreon_tier_unlock', $required, $post, $user, $patreon_post_data );
|
||||||
|
|
||||||
if ( ! $required ) {
|
if ( ! $required ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user