Skip to content

Commit 3d36f91

Browse files
author
Gravity Forms
committed
Updates to 2.9.27
1 parent 568ce3c commit 3d36f91

21 files changed

+87
-49
lines changed

assets/js/dist/assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('hash_map' => array('admin-components.min.js' => array('version' => '01dc2137b0984834b85dc5d699f4474f', 'file' => 'admin-components.min.js'), 'libraries.min.js' => array('version' => '6d369309f01747ee7c078398c8bfb871', 'file' => 'libraries.min.js'), 'react-utils.min.js' => array('version' => '5fd1f6cad3afcc53993677c3cb1adfb0', 'file' => 'react-utils.min.js'), 'scripts-admin.min.js' => array('version' => 'cdca5ffe052c75d76d2b843d1acb3f09', 'file' => 'scripts-admin.min.js'), 'scripts-theme.min.js' => array('version' => '0183eae4c8a5f424290fa0c1616e522c', 'file' => 'scripts-theme.min.js'), 'utils.min.js' => array('version' => '48a3755090e76a154853db28fc254681', 'file' => 'utils.min.js'), 'vendor-admin.min.js' => array('version' => 'f06e38cb5efe255ebb5b1791e4bfac57', 'file' => 'vendor-admin.min.js'), 'vendor-theme.min.js' => array('version' => '4f8b3915c1c1e1a6800825abd64b03cb', 'file' => 'vendor-theme.min.js')));
1+
<?php return array('hash_map' => array('admin-components.min.js' => array('version' => '01dc2137b0984834b85dc5d699f4474f', 'file' => 'admin-components.min.js'), 'libraries.min.js' => array('version' => '6d369309f01747ee7c078398c8bfb871', 'file' => 'libraries.min.js'), 'react-utils.min.js' => array('version' => '5fd1f6cad3afcc53993677c3cb1adfb0', 'file' => 'react-utils.min.js'), 'scripts-admin.min.js' => array('version' => '522f892c86f0ee45a22ec43df7f7f9ef', 'file' => 'scripts-admin.min.js'), 'scripts-theme.min.js' => array('version' => '0183eae4c8a5f424290fa0c1616e522c', 'file' => 'scripts-theme.min.js'), 'utils.min.js' => array('version' => '48a3755090e76a154853db28fc254681', 'file' => 'utils.min.js'), 'vendor-admin.min.js' => array('version' => 'f06e38cb5efe255ebb5b1791e4bfac57', 'file' => 'vendor-admin.min.js'), 'vendor-theme.min.js' => array('version' => '4f8b3915c1c1e1a6800825abd64b03cb', 'file' => 'vendor-theme.min.js')));

assets/js/dist/scripts-admin.form-editor.358ab0d6cdbe015b75b5.min.js renamed to assets/js/dist/scripts-admin.form-editor.0500b2cc9f35a49b3e19.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('gform_gravityforms_admin_components', 'gform_gravityforms_libraries', 'gform_gravityforms_react_utils', 'gform_gravityforms_utils', 'jquery', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render'), 'version' => '3b0c90a406f8a0f0f9ae');
1+
<?php return array('dependencies' => array('gform_gravityforms_admin_components', 'gform_gravityforms_libraries', 'gform_gravityforms_react_utils', 'gform_gravityforms_utils', 'jquery', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-server-side-render'), 'version' => '4883a3e0563a59c487ca');

assets/js/dist/scripts-admin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

change_log.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### 2.9.27 | 2026-02-05
2+
- Fixed an issue that causes incorrect error messages about version requirements when updating network-activated add-ons.
3+
- Fixed an issue that prevents the merge tag drop down from rendering on the form settings notifications.
4+
- Fixed an issue that causes console errors when switching from compact view in the form editor.
5+
- Fixed a PHP fatal error that occurs on submission if the currency input value is modified to an array.
6+
- Fixed an issue where `gform_is_delayed_pre_process_feed` does not work correctly with the Stripe Payment Element.
7+
- Fixed an issue where denying all capabilities to admin user role doesn't work with the Members plugin.
8+
19
### 2.9.26 | 2026-01-22
210
- Added Support Request and Square Course Registration form templates to the templates library.
311
- Added a hidden input to the form footer with a value of the form's currency code.

common.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4299,7 +4299,7 @@ public static function get_currency() {
42994299
public static function get_submission_currency() {
43004300
$posted_currency = rgpost( 'gform_currency' );
43014301

4302-
if ( ! $posted_currency ) {
4302+
if ( ! $posted_currency || ! is_string( $posted_currency ) ) {
43034303
return self::get_currency();
43044304
}
43054305

@@ -5388,7 +5388,7 @@ public static function calculate( $field, $form, $lead ) {
53885388
$result = false;
53895389

53905390
if ( preg_match( '/^[0-9 -\/*\(\)]+$/', $formula ) ) {
5391-
$prev_reporting_level = error_reporting( 0 );
5391+
$prev_reporting_level = error_reporting( 0 ); // phpcs:ignore QITStandard.PHP.DebugCode.ErrorReportingSuppressed
53925392
try {
53935393
$result = eval( "return {$formula};" );
53945394
} catch (DivisionByZeroError $e) {
@@ -5401,7 +5401,7 @@ public static function calculate( $field, $form, $lead ) {
54015401
GFCommon::log_debug( __METHOD__ . sprintf( '(): Formula caused an exception: "%s".', $e->getMessage() ) );
54025402
$result = 0;
54035403
}
5404-
error_reporting( $prev_reporting_level );
5404+
error_reporting( $prev_reporting_level ); // phpcs:ignore QITStandard.PHP.DebugCode.ErrorReportingModified
54055405
}
54065406

54075407
$result = apply_filters( 'gform_calculation_result', $result, $formula, $field, $form, $lead );
@@ -7565,7 +7565,7 @@ public static function email_domain_matches( $email_address, $domain = '' ) {
75657565
$email_domain = explode( '@', $email_address );
75667566

75677567
$domain_matches = ( strpos( $domain, array_pop( $email_domain ) ) !== false ) ? true : false;
7568-
GFCommon::log_debug( __METHOD__ . '(): Domain matches? '. var_export( $domain_matches, true ) );
7568+
GFCommon::log_debug( __METHOD__ . '(): Domain matches? '. var_export( $domain_matches, true ) ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
75697569

75707570
return $domain_matches;
75717571
}

form_display.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ public static function handle_submission( &$form, &$lead, $ajax = false ) {
19531953
$lead_id = gf_apply_filters( array( 'gform_entry_id_pre_save_lead', $form_id ), null, $form );
19541954

19551955
if ( ! empty( $lead_id ) ) {
1956-
GFCommon::log_debug( __METHOD__ . '(): The gform_entry_id_pre_save_lead filter was used to set the entry ID to ' . var_export( $lead_id, true ) );
1956+
GFCommon::log_debug( __METHOD__ . '(): The gform_entry_id_pre_save_lead filter was used to set the entry ID to ' . var_export( $lead_id, true ) ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
19571957

19581958
if ( empty( $lead ) ) {
19591959
$lead = array();
@@ -3963,7 +3963,7 @@ public static function get_input_mask_init_script( $form ) {
39633963
* @param string $mask The input mask value.
39643964
*/
39653965
if ( gf_has_filter( array( 'gform_input_mask_script', $form['id'] ) ) ) {
3966-
trigger_error( 'gform_input_mask_script is deprecated and will be removed in version 3.0.', E_USER_DEPRECATED );
3966+
trigger_error( 'gform_input_mask_script is deprecated and will be removed in version 3.0.', E_USER_DEPRECATED ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
39673967
}
39683968
$script_str .= gf_apply_filters( array( 'gform_input_mask_script', $form['id'] ), $script, $form['id'], $field->id, $mask );
39693969
}

form_settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public static function form_settings_fields( $form ) {
678678
*/
679679

680680
if ( has_filter( 'gform_form_settings' ) ) {
681-
trigger_error( 'gform_form_settings is deprecated and will be removed in version 3.0.', E_USER_DEPRECATED );
681+
trigger_error( 'gform_form_settings is deprecated and will be removed in version 3.0.', E_USER_DEPRECATED ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
682682
}
683683
$legacy_settings = apply_filters( 'gform_form_settings', array(), $form );
684684

forms_model.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ public static function delete_entries_by_form( $form_id, $status = '' ) {
18631863
*/
18641864

18651865
if ( has_action( 'gform_delete_lead' ) ) {
1866-
trigger_error( 'The gform_delete_lead action is deprecated and will be removed in 3.0. Use gform_delete_entry instead.', E_USER_DEPRECATED );
1866+
trigger_error( 'The gform_delete_lead action is deprecated and will be removed in 3.0. Use gform_delete_entry instead.', E_USER_DEPRECATED ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
18671867
}
18681868
do_action( 'gform_delete_lead', $entry_id );
18691869

@@ -2097,7 +2097,7 @@ public static function duplicate_form( $form_id ) {
20972097
*/
20982098

20992099
if ( has_action( 'gform_after_duplicate_form' ) ) {
2100-
trigger_error( 'The gform_after_duplicate_form action is deprecated and will be removed in 3.0. Use gform_post_form_duplicated instead.', E_USER_DEPRECATED );
2100+
trigger_error( 'The gform_after_duplicate_form action is deprecated and will be removed in 3.0. Use gform_post_form_duplicated instead.', E_USER_DEPRECATED ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
21012101
}
21022102
do_action( 'gform_after_duplicate_form', $form_id, $new_id );
21032103

@@ -2810,7 +2810,7 @@ public static function delete_entry( $entry_id ) {
28102810
*/
28112811

28122812
if ( has_action( 'gform_delete_lead' ) ) {
2813-
trigger_error( 'The gform_delete_lead action is deprecated and will be removed in version 3.0. Use gform_delete_entry instead.', E_USER_DEPRECATED );
2813+
trigger_error( 'The gform_delete_lead action is deprecated and will be removed in version 3.0. Use gform_delete_entry instead.', E_USER_DEPRECATED ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
28142814
}
28152815
do_action( 'gform_delete_lead', $entry_id );
28162816

@@ -5257,7 +5257,7 @@ public static function create_post( $form, &$lead ) {
52575257
$field = RGFormsModel::get_field( $form, $image['field_id'] );
52585258
if ( $field->postFeaturedImage ) {
52595259
$result = set_post_thumbnail( $post_id, $media_id );
5260-
GFCommon::log_debug( __METHOD__ . '(): Setting the featured image. Result from set_post_thumbnail(): ' . var_export( $result, 1 ) );
5260+
GFCommon::log_debug( __METHOD__ . '(): Setting the featured image. Result from set_post_thumbnail(): ' . var_export( $result, 1 ) ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
52615261
}
52625262
}
52635263
}
@@ -5611,7 +5611,7 @@ public static function save_input( $form, $field, &$lead, $current_fields, $inpu
56115611
if ( intval( $current_field->meta_key ) == $sub_field->id && ! isset( $current_field->update ) ) {
56125612
$current_field->delete = true;
56135613
$result = self::queue_batch_field_operation( $form, $lead, $sub_field, $current_field->id, $current_field->meta_key, '', $current_field->item_index );
5614-
GFCommon::log_debug( __METHOD__ . "(): Deleting: {$field->label}(#{$sub_field->id}{$current_field->item_index} - {$field->type}). Result: " . var_export( $result, 1 ) );
5614+
GFCommon::log_debug( __METHOD__ . "(): Deleting: {$field->label}(#{$sub_field->id}{$current_field->item_index} - {$field->type}). Result: " . var_export( $result, 1 ) ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
56155615
}
56165616
}
56175617
}
@@ -5687,7 +5687,7 @@ public static function queue_save_input_value( $value, $form, $field, &$lead, $c
56875687

56885688
$lead_detail_id = self::get_lead_detail_id( $current_fields, $input_id, $new_item_index );
56895689
$result = self::queue_batch_field_operation( $form, $lead, $field, $lead_detail_id, $input_id, $v, $new_item_index );
5690-
GFCommon::log_debug( __METHOD__ . "(): Saving: {$field->label}(#{$input_id}{$item_index} - {$field->type}). Result: " . var_export( $result, 1 ) );
5690+
GFCommon::log_debug( __METHOD__ . "(): Saving: {$field->label}(#{$input_id}{$item_index} - {$field->type}). Result: " . var_export( $result, 1 ) ); // phpcs:ignore QITStandard.PHP.DebugCode.DebugFunctionFound
56915691
foreach ( $current_fields as $current_field ) {
56925692
if ( (string) $current_field->meta_key === (string) $input_id && $current_field->item_index == $new_item_index ) {
56935693
$current_field->update = true;

gravityforms.php

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Gravity Forms
44
Plugin URI: https://gravityforms.com
55
Description: Easily create web forms and manage form entries within the WordPress admin.
6-
Version: 2.9.26
6+
Version: 2.9.27
77
Requires at least: 6.5
88
Requires PHP: 7.4
99
Author: Gravity Forms
@@ -13,7 +13,7 @@
1313
Domain Path: /languages
1414
1515
------------------------------------------------------------------------
16-
Copyright 2009-2025 Rocketgenius, Inc.
16+
Copyright 2009-2026 Rocketgenius, Inc.
1717
1818
This program is free software; you can redistribute it and/or modify
1919
it under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@ class GFForms {
257257
*
258258
* @var string $version The version number.
259259
*/
260-
public static $version = '2.9.26';
260+
public static $version = '2.9.27';
261261

262262
/**
263263
* Handles background upgrade tasks.
@@ -1575,7 +1575,7 @@ public static function user_has_cap( $all_caps, $cap, $args, $user = null ) {
15751575
}
15761576
}
15771577

1578-
if ( ! $has_gf_cap ) {
1578+
if ( ! $has_gf_cap && ! isset( $all_caps['gform_full_access'] ) ) {
15791579
//give full access to administrators if none of the GF permissions are active by the Members plugin
15801580
$all_caps['gform_full_access'] = true;
15811581
}
@@ -7102,29 +7102,59 @@ public static function ensure_hook_js_output( $content ) {
71027102
* @return array Array of plugin information.
71037103
*/
71047104
public static function get_installed_plugins() {
7105-
static $plugins_info = null;
7105+
// Cache plugin data per blog.
7106+
static $cache = array();
71067107

7107-
if ( $plugins_info !== null ) {
7108-
return $plugins_info;
7108+
$blog_id = function_exists( 'get_current_blog_id' ) ? get_current_blog_id() : 0;
7109+
7110+
// Disable cache when running in development mode.
7111+
$use_cache = ! ( defined( 'WP_DEBUG' ) && WP_DEBUG );
7112+
7113+
if ( $use_cache && isset( $cache[ $blog_id ] ) ) {
7114+
return $cache[ $blog_id ];
71097115
}
71107116

7111-
// List all installed plugins with their active status.
7117+
// Get all installed plugins.
71127118
$all_plugins = get_plugins();
7113-
$active_plugins = get_option( 'active_plugins' );
7119+
// Plugins active on the current site.
7120+
$active_plugins = (array) get_option( 'active_plugins', array() );
7121+
7122+
// Plugins active network-wide.
7123+
$network_active = array();
7124+
if ( is_multisite() ) {
7125+
$network_active = array_keys(
7126+
(array) get_site_option( 'active_sitewide_plugins', array() )
7127+
);
7128+
}
7129+
7130+
// Build the final list of active plugins.
7131+
$active_set = array_fill_keys(
7132+
array_merge( $active_plugins, $network_active ),
7133+
true
7134+
);
71147135

71157136
$plugins_info = array();
71167137

71177138
foreach ( $all_plugins as $plugin_path => $plugin ) {
7118-
$is_active = in_array( $plugin_path, $active_plugins, true );
7139+
$slug = dirname( $plugin_path );
7140+
// Handle single-file plugins.
7141+
if ( $slug === '.' ) {
7142+
$slug = preg_replace( '/\.php$/', '', basename( $plugin_path ) );
7143+
}
71197144

7120-
$plugins_info[ dirname( $plugin_path ) ] = array(
7145+
$plugins_info[ $slug ] = array(
71217146
'name' => $plugin['Name'],
71227147
'version' => $plugin['Version'],
71237148
'path' => $plugin_path,
7124-
'is_active' => $is_active,
7149+
'is_active' => isset( $active_set[ $plugin_path ] ),
71257150
);
71267151
}
71277152

7153+
// Store cached results only outside of development mode.
7154+
if ( $use_cache ) {
7155+
$cache[ $blog_id ] = $plugins_info;
7156+
}
7157+
71287158
return $plugins_info;
71297159
}
71307160

0 commit comments

Comments
 (0)