diff --git a/changelog.txt b/changelog.txt index d0ac1380a1..02720a2414 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,12 @@ == Changelog == += 6.33 = +* New: A new Gated Content form action type has been added. Now you can easily give access to restricted pages, views, pdfs, and files! +* New: A new Spam settings section has been added to Form settings. Several spam settings have been moved here. In addition this section includes a summary of Global Spam settings, and a new Include Captcha in this form setting to easily add and remove Captcha fields. +* New: PayPal Commerce front end error messages have been improved. +* New: A Payment Settings button has been added to the Payments list page. +* Fix: Google Pay would use the test environment incorrectly when using PayPal Commerce. +* Fix: A Using null as an array offset is deprecated, use an empty string instead PHP deprecated message has been fixed. + = 6.32.1 = * Security: An issue has been fixed where requests could be manipulated to attempt form submissions using test payments instead of live payments, for Stripe, Square, and PayPal Commerce. * Security: An incorrect status check would allow forms to submit without errors when using PayPal Commerce to handle subscriptions in a pending approval status. Credit to Yaswanth Reddy Sunkara and WPScan for reporting the issue. diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 42d5806a5b..856a48645e 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -306,7 +306,7 @@ private static function antispam_was_on( $form_id ) { /** * Handle captcha field inclusion in form * - * @since x.x + * @since 6.33 * * @param int $form_id Form ID. * @param bool $include_captcha Whether to include captcha field. @@ -1712,7 +1712,7 @@ public static function advanced_settings( $values ) { } /** - * @since x.x + * @since 6.33 * * @param array $values * @@ -3804,13 +3804,13 @@ public static function create( $values = array() ) { } /** - * @deprecated x.x + * @deprecated 6.33 * * @param array $values * * @return void */ public static function render_spam_settings( $values ) { - _deprecated_function( __METHOD__, 'x.x' ); + _deprecated_function( __METHOD__, '6.33' ); } } diff --git a/classes/controllers/FrmGatedContentController.php b/classes/controllers/FrmGatedContentController.php index 4d55ac9312..47968d3bbc 100644 --- a/classes/controllers/FrmGatedContentController.php +++ b/classes/controllers/FrmGatedContentController.php @@ -4,7 +4,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -306,7 +306,7 @@ public static function trigger( $action, $entry, $form, $event ) { * * Hooked to `frm_helper_shortcodes` with 3 accepted args. * - * @since x.x + * @since 6.33 * * @param array $shortcodes Existing shortcode helpers array (shortcode => label). * @param string $settings_tab Active settings tab slug. diff --git a/classes/controllers/FrmGatedContentShortcodeController.php b/classes/controllers/FrmGatedContentShortcodeController.php index a230649bb9..5f460a771d 100644 --- a/classes/controllers/FrmGatedContentShortcodeController.php +++ b/classes/controllers/FrmGatedContentShortcodeController.php @@ -6,7 +6,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -56,7 +56,7 @@ public static function shortcode( $atts ) { * Return a non-null string to short-circuit the default rendering. Return null * to let the shortcode fall through to its built-in show= handlers. * - * @since x.x + * @since 6.33 * * @param string|null $output Output string, or null to continue default handling. * @param array $atts Full shortcode attributes array (id, show, item, …). diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 77610b4612..b2aff9d547 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -29,7 +29,7 @@ class FrmAppHelper { * * @var string */ - public static $plug_version = '6.32.1'; + public static $plug_version = '6.33'; /** * @var bool diff --git a/classes/helpers/FrmGatedTokenHelper.php b/classes/helpers/FrmGatedTokenHelper.php index 27d5e6b9a2..030339dc46 100644 --- a/classes/helpers/FrmGatedTokenHelper.php +++ b/classes/helpers/FrmGatedTokenHelper.php @@ -4,7 +4,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -83,7 +83,7 @@ public static function generate( $action, $entry, $event ) { * token — for example, Formidable Registration hooks here to set the correct * user_id when the registrant is not yet logged in at trigger time. * - * @since x.x + * @since 6.33 * * @param array $data Row data to insert into wp_frm_gated_tokens. * @param array $args { @@ -483,7 +483,7 @@ public static function get_valid_token( FrmGatedItem $item ) { * a valid token. Add-ons can return a validated FrmGatedToken to grant access from * alternative sources, or null to indicate no token is available. * - * @since x.x + * @since 6.33 * * @param FrmGatedToken|null $token Null — no valid token found by core. * @param array{item: FrmGatedItem} $args Array containing the content item being accessed. diff --git a/classes/helpers/FrmHtmlHelper.php b/classes/helpers/FrmHtmlHelper.php index dacc865249..854c815111 100644 --- a/classes/helpers/FrmHtmlHelper.php +++ b/classes/helpers/FrmHtmlHelper.php @@ -38,7 +38,7 @@ function () use ( $id, $name, $args ) { /** * Show readonly setting icon * - * @since x.x + * @since 6.33 * * @param bool $is_enabled Whether the setting is enabled. * diff --git a/classes/models/FrmGatedContentAction.php b/classes/models/FrmGatedContentAction.php index 82ae0c46b5..b61cfaf7a1 100644 --- a/classes/models/FrmGatedContentAction.php +++ b/classes/models/FrmGatedContentAction.php @@ -4,7 +4,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -134,7 +134,7 @@ public function get_defaults() { * The `frm_gated_content_shortcodes` filter allows Pro and add-ons to append * additional rows (e.g. show="expired_time" when expiry is configured). * - * @since x.x + * @since 6.33 * * @param int $action_id Gated content action post ID. * @@ -167,7 +167,7 @@ public static function get_shortcodes( $action_id ) { * - code (string) The shortcode string to display and copy. * - output (string) Human-readable description of what it outputs. * - * @since x.x + * @since 6.33 * * @param array $shortcodes Shortcode rows. * @param int $action_id Gated content action post ID. @@ -214,7 +214,7 @@ public static function get_posts() { * * The filtered list is then narrowed to private and password-protected posts only. * - * @since x.x + * @since 6.33 * * @param array $query_args get_posts() argument array. */ diff --git a/classes/models/FrmGatedItem.php b/classes/models/FrmGatedItem.php index cf346aae29..e1b4787d29 100644 --- a/classes/models/FrmGatedItem.php +++ b/classes/models/FrmGatedItem.php @@ -8,7 +8,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -57,7 +57,7 @@ public static function make( array $item ) { * Return a FrmGatedItem subclass instance to handle the given type. * Return null to fall back to the base FrmGatedItem. * - * @since x.x + * @since 6.33 * * @param FrmGatedItem|null $instance Instance, or null to use base class. * @param array{type: string, id: int|string} $item Item data array with 'type' and 'id' keys. @@ -138,7 +138,7 @@ public function get_title() { * Subclasses may override to produce a more specific name — e.g. when the * same post type can have multiple distinct access scopes (view + entry). * - * @since x.x + * @since 6.33 * * @return string */ @@ -154,7 +154,7 @@ public function get_cookie_name() { * include extra scope — e.g. entry ID for view items — so that cache * entries for different access scopes never collide. * - * @since x.x + * @since 6.33 * * @return string */ diff --git a/classes/models/FrmGatedToken.php b/classes/models/FrmGatedToken.php index bb5b8495d0..5e9d25dec4 100644 --- a/classes/models/FrmGatedToken.php +++ b/classes/models/FrmGatedToken.php @@ -7,7 +7,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 */ if ( ! defined( 'ABSPATH' ) ) { @@ -153,7 +153,7 @@ public function validate( FrmGatedItem $item ) { /** * Filters whether a resolved token grants access to a content item. * - * @since x.x + * @since 6.33 * * @param bool $is_valid Whether the token passes structural validation. * @param array $args { diff --git a/classes/views/frm-form-actions/_gated_content_item_row.php b/classes/views/frm-form-actions/_gated_content_item_row.php index 4de58d5bc7..c5ec002047 100644 --- a/classes/views/frm-form-actions/_gated_content_item_row.php +++ b/classes/views/frm-form-actions/_gated_content_item_row.php @@ -14,7 +14,7 @@ * * @package Formidable * - * @since x.x + * @since 6.33 * * @var bool $is_template True when rendering the JS clone template. * @var string $frm_gc_item_type Active type key ('post', 'frm_file', …). Always 'post' for template. @@ -201,7 +201,7 @@ * wrapper as the primary post selector. Fires for both existing rows and the * JS