Skip to main content

PDF for GravityView Hooks – gfpdf_gv_share_pdf_limit_logged_in_multiplier

Description​

Logged-in users get higher Share PDF limits than logged-out visitors: twice as high by default. Use this filter to change that ratio.

The multiplier is applied after gfpdf_gv_share_pdf_limit, so logged-in users keep the same ratio if you change a limit. It has no effect on a limit that's turned off.

Only the share_client and share_recipient limits are multiplied. The share_address and share_network counters follow the multiplied share_client limit. The share_recipient_daily and share_site limits are the same for everyone, and this filter doesn't run for them.

Version​

This hook was introduced in PDF for GravityView 2.0.

Arguments​

The following arguments are passed to functions that use this hook:

$multiplier | int|float​

  • The number a logged-in user's limit is multiplied by. The result is rounded to a whole number.
  • Fractions are allowed, such as 1.5.
  • A value of 0 or below gives logged-in users a limit of 1 email per window, not an unlimited one. Use gfpdf_gv_share_pdf_limit to turn a limit off.
  • The default value is 2

$context | string​

  • Which limit is being multiplied.
  • Valid values include: share_client share_recipient

Usage​

Let logged-in users send five times as many emails as logged-out visitors:

add_filter( 'gfpdf_gv_share_pdf_limit_logged_in_multiplier', function( $multiplier, $context ) {
return 5;
}, 10, 2 );

Give logged-in users the same limits as logged-out visitors:

add_filter( 'gfpdf_gv_share_pdf_limit_logged_in_multiplier', function( $multiplier, $context ) {
return 1;
}, 10, 2 );

Source Code​

This filter is located in src/Pdf/Access/RenderBudget.php of the PDF for GravityView extension.