Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.23 #2058

Merged
merged 60 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
04786c5
correct format for decimals and dots
omarkasem Jul 23, 2023
5d00293
fix tests issue
omarkasem Oct 10, 2023
8b8fb85
tests
omarkasem Oct 10, 2023
724598a
tests
omarkasem Oct 10, 2023
7f7f01a
fix tests
omarkasem Oct 11, 2023
7b6a4eb
Merge branch 'develop' into issue/1872-incorrect-display-of-the-numbe…
mrcasual Mar 20, 2024
c01bb98
new fix
omarkasem Mar 27, 2024
fd362db
new fix
omarkasem Mar 27, 2024
a1c8aac
return if
omarkasem Mar 27, 2024
3862885
fix comma issue by editing wp_locale decimal point and thousands sep …
omarkasem Mar 27, 2024
5743c30
remove wp_locale and use the number_format function directly to adjus…
omarkasem Mar 27, 2024
3cd0696
adjust decimal formatting and use gv instead of GFFormsModel
omarkasem Mar 28, 2024
aaa835b
Make approval link text filterable
karlemilnikka Apr 21, 2024
35cc606
Add GPNF merge tags for views.
doekenorg Apr 8, 2024
a0c433f
Register custom meta tags.
doekenorg Apr 8, 2024
da65e57
Add fields top field modal
doekenorg Apr 8, 2024
7998d6d
Fix missing secret on nested views.
doekenorg Apr 22, 2024
7f95583
Added Child Form Field merge tag
doekenorg Apr 22, 2024
2289774
Configure Composer to install Foundation from ZIP file
mrcasual Apr 22, 2024
c7e4ece
Update developer instructions [ci skip]
mrcasual Apr 22, 2024
307f03c
Remove acceptance tests
mrcasual Apr 22, 2024
f66a034
Remove old unit test setup
mrcasual Apr 22, 2024
3826ce2
Update developer instructions [ci skip]
mrcasual Apr 22, 2024
7cb9018
Ignore readme.md from secret scanning
zackkatz Apr 22, 2024
3efbee3
Ignore secret scanning in readme.md (take 2)
zackkatz Apr 22, 2024
fb074c2
Delete .github/.github directory
zackkatz Apr 22, 2024
062e934
Fix CircleCI badge in readme.md [ci skip]
mrcasual Apr 22, 2024
bdf6404
trigger build
mrcasual Apr 22, 2024
73e1740
Update repo's readme.md [ci skip]
mrcasual Apr 22, 2024
4e641c0
Allow modifying entry approval link url, text and other parameters
mrcasual Apr 22, 2024
a98e63d
Fix test_frontend_field_html_number test by adding the correct number…
omarkasem Apr 23, 2024
a4e0433
Merge branch 'develop' into issue/1872-incorrect-display-of-the-numbe…
mrcasual Apr 24, 2024
bf723a1
Fix export link widget by sanitizing link
doekenorg Apr 25, 2024
379a29c
Fix readme entry [ci skip]
doekenorg Apr 25, 2024
add7cad
Merge pull request #1 from mrcasual/develop
karlemilnikka Apr 25, 2024
225a797
Make approval link text filterable (#2031)
mrcasual Apr 29, 2024
fa45dce
Allow returning raw URL for entry approval and search clear links
mrcasual Apr 29, 2024
daac01f
Remove unnecessary null coalescing in condition check [ci skip]
mrcasual Apr 29, 2024
f6a233f
Merge branch 'develop' into issues/2034-fatal-error-on-csv-export-wid…
mrcasual Apr 29, 2024
9c0b589
Fix export link widget by sanitizing link (#2035) [ci skip]
mrcasual Apr 29, 2024
c0cdebb
Support for nested forms entry meta (#2032) [ci skip]
mrcasual Apr 29, 2024
1c392ae
Update changelog & docblocks [ci skip]
mrcasual Apr 29, 2024
001babf
Update Foundation to v1.2.13
mrcasual Apr 30, 2024
c715257
Update changelog [ci skip]
mrcasual Apr 30, 2024
3be2378
Check for Gravity Flow presence before adding hooks
mrcasual May 1, 2024
e005343
Fix default value of showing incorrectly
omarkasem May 2, 2024
abb15de
Fix textdomain
zackkatz May 3, 2024
6c27e13
Add tests for decimal comma format with default, number_format and de…
omarkasem May 3, 2024
d432a33
Add another scenario of comma type field test
omarkasem May 3, 2024
83207a5
Add gitignore .phpunit cache file
omarkasem May 3, 2024
cb786ea
Add a new possible test for decimal dot
omarkasem May 3, 2024
f056f49
Update repo's readme.md [ci skip]
mrcasual May 7, 2024
87e25eb
Display description for select and text fields in View editor metabox
mrcasual May 11, 2024
d42e655
Fix number formatting according to the form field setting (#1879)
mrcasual May 12, 2024
3a09cab
Fix entry duplication not busting View cache
mrcasual May 13, 2024
8a144e1
Update changelog
mrcasual May 13, 2024
adeab1c
Update Foundation to v1.2.14
mrcasual May 17, 2024
0101ae0
Bump version to 2.23 & update changelog
mrcasual May 17, 2024
569207a
Fix View caching issues when updating entries on a joined form
mrcasual May 17, 2024
6a235f9
Make "Add All Form Fields" button add fields in correct order (#2052)
mrcasual May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/secret_scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- "readme.md"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ phpunit
phpunit.xml
wordpress-51-tests-lib
wordpress-latest-tests-lib
.phpunit.result.cache

.coveralls.yml
.scrutinizer.yml
Expand Down
2 changes: 1 addition & 1 deletion assets/css/admin-views.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/scss/admin-metabox-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
label {
.howto {
margin-top: 5px;
white-space: normal;
}
}
}
Expand Down
28 changes: 17 additions & 11 deletions assets/js/admin-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -1934,22 +1934,28 @@
* @param {object} clicked jQuery object of the clicked "+ Add All Fields" link
*/
addAllFields: function ( clicked ) {
const fields = clicked.siblings( '.gv-fields' ).filter( function () {
const field_id = $( this ).data( 'fieldid' );

clicked.siblings( '.gv-fields' ).filter( function () {

var field_id = $( this ).data( 'fieldid' );

// Is the (number +)Field ID the same as the integer (not an input)?
// If so, form field. If not, entry meta or custom field type.
return ( +field_id === parseInt( field_id, 10 ) );

} ).each( function () {
$( this ).trigger( 'click' );
} );

// We just added all the fields. No reason to show the tooltip.
$( "a.gv-add-field[data-tooltip='active']" ).gvTooltip( "close" );
const triggerClick = ( el ) => {
return new Promise( ( resolve, reject ) => {
$( document.body ).one( 'gravityview/field-added', function () {
resolve();
} );
$( el ).trigger( 'click' );
} );
};

( async function () {
for ( let i = 0; i < fields.length; i++ ) {
await triggerClick( fields[ i ] );
}

$( 'a.gv-add-field[data-tooltip=\'active\']' ).gvTooltip( 'close' );
} )();
},

/**
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
}
},
"scripts": {
"install-public-no-dev": "[ -f composer.json ] && ( cp composer_public.json composer.json && composer update gravitykit/foundation --no-dev && git checkout composer.lock composer.json ) || ( echo 'failed to use the public composer.json' && git checkout composer.json composer.lock)",
"install-public": "[ -f composer.json ] && ( cp composer_public.json composer.json && composer update gravitykit/foundation && git checkout composer.lock composer.json ) || ( echo 'failed to use the public composer.json' && git checkout composer.json ccomposer.lock)",
"prefix_vendor": "@php strauss.phar",
"post_update_install": "./composer_post_update_install.sh",
"post-install-cmd": [
Expand Down
11 changes: 6 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 110 additions & 0 deletions composer_public.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"name": "gravityview/gravityview",
"type": "wordpress-plugin",
"description": "The best way to display Gravity Forms entries on your website.",
"keywords": [
"gravityview",
"gravity view",
"gravity forms directory",
"gravity forms"
],
"homepage": "https://www.gravitykit.com/",
"license": "GPL-2.0+",
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "https://github.com/katzwebservices/standalone-phpenkoder"
},
{
"type": "package",
"package": {
"name": "gravitykit/foundation",
"version": "1.2.12",
"dist": {
"url": "https://www.dropbox.com/scl/fi/9ymdlep3stwsobdxa3fvm/foundation-1.2.12-987da1e.zip?rlkey=tt6zethqhk1f574ygoi1xdnlm&dl=1",
"type": "zip"
}
}
}
],
"require": {
"php": ">=7.2.0",
"ext-json": "*",
"ext-openssl": "*",
"gravitykit/foundation": "1.2.12"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"lucatume/wp-browser": "^2.4",
"codeception/module-asserts": "^1.0",
"codeception/module-phpbrowser": "^1.0",
"codeception/module-webdriver": "^1.0",
"codeception/module-db": "^1.0",
"codeception/module-filesystem": "^1.0",
"codeception/module-cli": "^1.0",
"codeception/util-universalframework": "^1.0",
"yoast/phpunit-polyfills": "^1.0",
"squizlabs/php_codesniffer": "*",
"wp-coding-standards/wpcs": "^3.0",
"phpcompatibility/phpcompatibility-wp": "^2.1"
},
"extra": {
"strauss": {
"target_directory": "vendor_prefixed",
"namespace_prefix": "GravityKit\\GravityView",
"classmap_prefix": "GravityKit_GravityView_",
"packages": [
"gravitykit/foundation"
],
"namespace_replacement_patterns": {
"/^Gettext/": "GravityKit\\GravityView\\Foundation\\ThirdParty\\Gettext",
"/^Illuminate/": "GravityKit\\GravityView\\Foundation\\ThirdParty\\Illuminate",
"/^Psr/": "GravityKit\\GravityView\\Foundation\\ThirdParty\\Psr",
"/^Monolog/": "GravityKit\\GravityView\\Foundation\\ThirdParty\\Monolog",
"/^TrustedLogin/": "GravityKit\\GravityView\\Foundation\\ThirdParty\\TrustedLogin",
"/^GravityKit\\\\Foundation/": "GravityKit\\GravityView\\Foundation"
},
"override_autoload": {
"gravitykit/foundation": {
"psr-4": {
"GravityKit\\Foundation\\": "src"
},
"files": [
"assets"
]
}
},
"exclude_from_prefix": {
"file_patterns": []
},
"exclude_from_copy": {
"packages": [
"paragonie/random_compat",
"paragonie/sodium_compat"
]
}
}
},
"scripts": {
"prefix_vendor": "@php strauss.phar",
"post_update_install": "./composer_post_update_install.sh",
"post-install-cmd": [
"@prefix_vendor",
"@post_update_install",
"composer dump-autoload -o"
],
"post-update-cmd": [
"@prefix_vendor",
"@post_update_install",
"composer dump-autoload -o"
]
},
"config": {
"platform-check": false,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
8 changes: 7 additions & 1 deletion future/includes/class-gv-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,13 @@ private function run_db_query( GF_Query $query ) {

$atts['query_hash'] = $query_hash;

$long_lived_cache = new GravityView_Cache( $this->form->ID, $atts );
$form_ids = [ $this->form->ID];

foreach ( $this->joins as $join ) {
$form_ids[] = $join->join_on->ID;
}

$long_lived_cache = new GravityView_Cache( $form_ids, $atts );

if ( $long_lived_cache->use_cache() ) {
$cached_entries = $long_lived_cache->get();
Expand Down
4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GravityView
* Plugin URI: https://www.gravitykit.com
* Description: The best, easiest way to display Gravity Forms entries on your website.
* Version: 2.22
* Version: 2.23
* Author: GravityKit
* Author URI: https://www.gravitykit.com
* Text Domain: gk-gravityview
Expand All @@ -27,7 +27,7 @@
/**
* The plugin version.
*/
define( 'GV_PLUGIN_VERSION', '2.22' );
define( 'GV_PLUGIN_VERSION', '2.23' );

/**
* Full path to the GravityView file
Expand Down
18 changes: 14 additions & 4 deletions includes/admin/field-types/type_select.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
* select
*/
class GravityView_FieldType_select extends GravityView_FieldType {
function render_setting( $override_input = null ) {
if ( ! empty( $this->field['full_width'] ) ) { ?>
<th scope="row" colspan="2">
<div>
<?php $this->render_option(); ?>
</div>
</th>
<?php } else {
parent::render_setting( $override_input );
}
}

function render_option() {
?>
<label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>">
<?php

echo '<span class="gv-label">' . $this->get_field_label() . '</span>';

echo $this->get_tooltip() . $this->get_field_desc();
echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc();

$this->render_input();

Expand All @@ -25,8 +34,9 @@ function render_input( $override_input = null ) {
echo $override_input;
return;
}

?>
<select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>">
<select name="<?php echo esc_attr( $this->name ); ?>" class="<?php echo \GV\Utils::get( $this->field, 'class', '' ); ?>" id="<?php echo $this->get_field_id(); ?>">
<?php foreach ( $this->field['options'] as $value => $label ) : ?>
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option>
<?php endforeach; ?>
Expand Down
14 changes: 12 additions & 2 deletions includes/admin/field-types/type_text.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
* text input type
*/
class GravityView_FieldType_text extends GravityView_FieldType {
function render_setting( $override_input = null ) {
if ( ! empty( $this->field['full_width'] ) ) { ?>
<th scope="row" colspan="2">
<div>
<?php $this->render_option(); ?>
</div>
</th>
<?php } else {
parent::render_setting( $override_input );
}
}

function render_option() {
?>
<label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>">
<?php

echo '<span class="gv-label">' . $this->get_field_label() . '</span>';
echo $this->get_tooltip() . $this->get_field_desc();
echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc();
?>
<div>
<?php $this->render_input(); ?>
Expand Down
50 changes: 47 additions & 3 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,50 @@ public function changelog_screen() {
* - If 4.28, include to 4.26.
*/
?>
<h3>2.23 on May 17, 2024</h3>

<p>This update adds support for Nested Forms' entry meta, addresses several bugs, including critical ones, and improves GravityKit's Settings and Manage Your Kit screens.</p>

<h4>🚀 Added</h4>

<ul>
<li>Support for Gravity Wiz's Gravity Forms Nested Forms entry meta (parent form and entry IDs, child form field ID) in the View editor and merge tags.</li>
</ul>

<h4>✨ Improved</h4>

<ul>
<li>The "Add All Fields" button in the View editor now adds fields in their correct form order.</li>
</ul>

<h4>🐛 Fixed</h4>

<ul>
<li>Export link View widget would cause a fatal error during multi-word searches.</li>
<li>Fatal error when the search bar is configured with a Gravity Flow field and the Gravity Flow plugin is not active.</li>
<li>Duplicating entries no longer fails to refresh the entry list when View-based caching is enabled.</li>
<li>View cache not being invalidated when updating entries on a form joined using the Multiple Forms extension.</li>
<li>Number field output now respects the form field's format settings, such as decimals and currency.</li>
</ul>

<h4>🔧 Updated</h4>

<p><a href="https://www.gravitykit.com/foundation/">Foundation</a> to version 1.2.14.</p>

<ul>
<li>Added an option to subscribe to GravityKit's newsletter from the Manage Your Kit screen.</li>
<li>Added a setting in GravityKit > Settings > GravityKit to specify the GravityKit menu position in the Dashboard.</li>
<li>Improved internal check for product updates that could still interfere with third-party plugin updates. Thanks, Aaron!</li>
<li>Fixed a bug that prevented WordPress from loading third-party plugin translations after their updates. Thanks, Jérôme!</li>
<li>Success message now shows correct product name after activation/deactivation.</li>
</ul>

<h4>💻 Developer Updates</h4>

<ul>
<li>Added <code>gk/gravityview/entry/approval-link/params</code> filter to modify entry approval link parameters.</li>
</ul>

<h3>2.22 on April 16, 2024</h3>

<p>This release introduces support for <a href="https://docs.gravitykit.com/article/995-gravityview-search-modifiers">search modifiers</a> and <a href="https://docs.gravitykit.com/article/996-number-range-search">range-based searching</a> for numeric fields, enables easy duplication and precise insertion of View fields and widgets, and resolves critical issues with Yoast SEO and LifterLMS. <a href="https://www.gravitykit.com/gravityview-2-22/">Read the announcement</a> for more details.</p>
Expand Down Expand Up @@ -325,11 +369,11 @@ public function changelog_screen() {
<li>Resolved a dependency management issue that incorrectly prompted for a Gravity Forms update before activating, installing, or updating GravityKit products.</li>
</ul>

<p><strong>Developer Updates:</strong></p>
<h4>💻 Developer Updates</h4>

<ul>
<li><code>gk/gravityview/common/quotation-marks</code> filter to modify the quotation marks used for exact-match searches.
<li><code>gk/gravityview/search/number-range/step</code> filter to adjust the interval between numbers in input fields for range-based searches.
<li><code>gk/gravityview/common/quotation-marks</code> filter to modify the quotation marks used for exact-match searches.</li>
<li><code>gk/gravityview/search/number-range/step</code> filter to adjust the interval between numbers in input fields for range-based searches.</li>
</ul>

<h3>2.21.2 on March 28, 2024</h3>
Expand Down
1 change: 0 additions & 1 deletion includes/class-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public function entry_property_changed( $lead_id, $property_name = '', $property
* @return void
*/
public function entry_updated( $form, $lead_id ) {

gravityview()->log->debug(
' adding form {form_id} to blocklist because entry #{entry_id} was updated',
array(
Expand Down
Loading
Loading