Update and document fictioneer_filter_patreon_dollars
This commit is contained in:
parent
20361cbfff
commit
e1d931eef7
10
FILTERS.md
10
FILTERS.md
@ -647,6 +647,16 @@ Filters the intermediate output array in the `_card-page.php` partial before it
|
||||
|
||||
---
|
||||
|
||||
### `apply_filters( 'fictioneer_filter_patreon_dollars', $dollar, $amount_cents_raw, $post )`
|
||||
Filters the pledge threshold amount of the Patreon gate for protected posts (if any). Patreon stores tier prices in cents, so $2.50 would be 250 raw. The theme turns that back into the Dollar format, which you can intercept here. Note that Patreon has specific [rules for converting currencies](https://support.patreon.com/hc/en-us/articles/360044469871--How-tiers-are-converted-into-other-currencies).
|
||||
|
||||
**Parameters:**
|
||||
* $dollar (string) – The pledge threshold as "$0.00".
|
||||
* $amount_cents_raw (int) – The threshold in cents.
|
||||
* $post (WP_Post) – The gated post.
|
||||
|
||||
---
|
||||
|
||||
### `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.
|
||||
|
||||
|
@ -539,7 +539,7 @@ function fictioneer_unlock_with_patreon( $form ) {
|
||||
|
||||
$options[] = sprintf(
|
||||
_x( 'with any %s pledge', 'Unlock with Patreon pledge amount', 'fictioneer' ),
|
||||
apply_filters( 'fictioneer_filter_patreon_dollars', $dollar, $patreon_post_data['gate_cents'] )
|
||||
apply_filters( 'fictioneer_filter_patreon_dollars', $dollar, $patreon_post_data['gate_cents'], $post )
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user