Skip to content

Commit

Permalink
Release 2.23 (#2058)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcasual authored May 17, 2024
2 parents 76ec143 + 6a235f9 commit f7cc566
Show file tree
Hide file tree
Showing 60 changed files with 867 additions and 14,872 deletions.
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

0 comments on commit f7cc566

Please sign in to comment.