From 2b4567d862715bc8bcba82ee9799bdb64542ed40 Mon Sep 17 00:00:00 2001 From: GravityView - CI Date: Fri, 20 Oct 2023 01:14:57 +0000 Subject: [PATCH 1/7] Add updated translations/assets & release v2.19.2 [ci skip] --- translations.pot | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translations.pot b/translations.pot index b405f7a28f..4a3f3bea23 100644 --- a/translations.pot +++ b/translations.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv2 or later msgid "" msgstr "" -"Project-Id-Version: GravityView 2.19.1\n" +"Project-Id-Version: GravityView 2.19.2\n" "Report-Msgid-Bugs-To: https://www.gravitykit.com/support\n" "Last-Translator: GravityKit \n" "Language-Team: GravityKit \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2023-10-17T15:17:43+00:00\n" +"POT-Creation-Date: 2023-10-20T01:14:46+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.7.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -1831,23 +1831,23 @@ msgstr "" msgid "What’s New" msgstr "" -#: includes/class-admin-welcome.php:573 +#: includes/class-admin-welcome.php:579 msgid "View change history" msgstr "" -#: includes/class-admin-welcome.php:623 +#: includes/class-admin-welcome.php:629 msgid "GravityView is brought to you by:" msgstr "" -#: includes/class-admin-welcome.php:661 +#: includes/class-admin-welcome.php:667 msgid "Contributors" msgstr "" -#: includes/class-admin-welcome.php:693 +#: includes/class-admin-welcome.php:699 msgid "Want to contribute?" msgstr "" -#: includes/class-admin-welcome.php:694 +#: includes/class-admin-welcome.php:700 msgid "If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here." msgstr "" From f6dfa17959693797617f06881ad59f5aca8ad347 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 23 Oct 2023 09:43:47 -0400 Subject: [PATCH 2/7] Declare a class property to avoid deprecation notice in PHP 8.2+ --- includes/class-gravityview-placeholder-template.php | 6 ++++++ readme.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/includes/class-gravityview-placeholder-template.php b/includes/class-gravityview-placeholder-template.php index 1af6f4a923..4338e6ab72 100644 --- a/includes/class-gravityview-placeholder-template.php +++ b/includes/class-gravityview-placeholder-template.php @@ -13,6 +13,12 @@ */ class GravityView_Placeholder_Template extends GravityView_Template { + /** + * @since + * @var mixed|string The template ID. + */ + private $id; + function __construct( $id = 'template_placeholder', $settings = array() ) { $default_template_settings = array( diff --git a/readme.txt b/readme.txt index 1216b96e1e..7ae11fd744 100644 --- a/readme.txt +++ b/readme.txt @@ -21,6 +21,10 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h == Changelog == += 2.19.3 [unreleased] = + +* Fixed: Deprecation notice in PHP 8.2+ + = 2.19.2 on October 19, 2023 = * Fixed: Merge tags were still not working in the Custom Content field after the fix in 2.19.1 From 22e7f36150c4aeb34f38e7ed9ec8a1e89105fac3 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 23 Oct 2023 17:52:50 -0400 Subject: [PATCH 3/7] Update Foundation to 9cad077 Ref: https://github.com/GravityKit/Foundation/commit/9cad077d601802f727dd37a17850fbabb7ef7c28 --- composer.lock | 10 +++--- translations.pot | 84 ++---------------------------------------------- 2 files changed, 7 insertions(+), 87 deletions(-) diff --git a/composer.lock b/composer.lock index 62ff302250..3bcaaa1369 100644 --- a/composer.lock +++ b/composer.lock @@ -237,12 +237,12 @@ "source": { "type": "git", "url": "git@github.com:GravityKit/Foundation.git", - "reference": "7741dd2d011a0bbea8a6dad52270478b8d9a0d6a" + "reference": "9cad077d601802f727dd37a17850fbabb7ef7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GravityKit/Foundation/zipball/7741dd2d011a0bbea8a6dad52270478b8d9a0d6a", - "reference": "7741dd2d011a0bbea8a6dad52270478b8d9a0d6a", + "url": "https://api.github.com/repos/GravityKit/Foundation/zipball/9cad077d601802f727dd37a17850fbabb7ef7c28", + "reference": "9cad077d601802f727dd37a17850fbabb7ef7c28", "shasum": "" }, "require": { @@ -322,10 +322,10 @@ } ], "support": { - "source": "https://github.com/GravityKit/Foundation/tree/v1.2.5", + "source": "https://github.com/GravityKit/Foundation/tree/main", "issues": "https://github.com/GravityKit/Foundation/issues" }, - "time": "2023-10-09T13:30:55+00:00" + "time": "2023-10-23T13:29:34+00:00" }, { "name": "illuminate/container", diff --git a/translations.pot b/translations.pot index 4a3f3bea23..48d2f8a9d8 100644 --- a/translations.pot +++ b/translations.pot @@ -9,9 +9,9 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2023-10-20T01:14:46+00:00\n" +"POT-Creation-Date: 2023-10-23T21:52:28+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.7.1\n" +"X-Generator: WP-CLI 2.8.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Domain: gk-gravityview\n" @@ -6653,83 +6653,3 @@ msgstr "" #: future/includes/gutenberg/shared/js/server-side-render.js:171 msgid "The block did not render any content." msgstr "" - -#: future/includes/gutenberg/blocks/entry-field/block.json -msgctxt "block title" -msgid "GravityView Entry Field" -msgstr "" - -#: future/includes/gutenberg/blocks/entry-field/block.json -msgctxt "block description" -msgid "Display an entry field value." -msgstr "" - -#: future/includes/gutenberg/blocks/entry-field/block.json -#: future/includes/gutenberg/blocks/entry-link/block.json -#: future/includes/gutenberg/blocks/entry/block.json -#: future/includes/gutenberg/blocks/view-details/block.json -#: future/includes/gutenberg/blocks/view/block.json -msgctxt "block keyword" -msgid "GravityView" -msgstr "" - -#: future/includes/gutenberg/blocks/entry-field/block.json -#: future/includes/gutenberg/blocks/entry-link/block.json -#: future/includes/gutenberg/blocks/entry/block.json -#: future/includes/gutenberg/blocks/view-details/block.json -msgctxt "block keyword" -msgid "form entry" -msgstr "" - -#: future/includes/gutenberg/blocks/entry-field/block.json -#: future/includes/gutenberg/blocks/entry-link/block.json -#: future/includes/gutenberg/blocks/entry/block.json -#: future/includes/gutenberg/blocks/view-details/block.json -msgctxt "block keyword" -msgid "entry" -msgstr "" - -#: future/includes/gutenberg/blocks/entry-link/block.json -msgctxt "block title" -msgid "GravityView Entry Link" -msgstr "" - -#: future/includes/gutenberg/blocks/entry-link/block.json -msgctxt "block description" -msgid "Display a link to the GravityView entry." -msgstr "" - -#: future/includes/gutenberg/blocks/entry/block.json -msgctxt "block title" -msgid "GravityView Entry" -msgstr "" - -#: future/includes/gutenberg/blocks/entry/block.json -msgctxt "block description" -msgid "Display a GravityView entry." -msgstr "" - -#: future/includes/gutenberg/blocks/view-details/block.json -msgctxt "block title" -msgid "GravityView View Details" -msgstr "" - -#: future/includes/gutenberg/blocks/view-details/block.json -msgctxt "block description" -msgid "Display specific information about a GravityView View." -msgstr "" - -#: future/includes/gutenberg/blocks/view/block.json -msgctxt "block title" -msgid "GravityView View" -msgstr "" - -#: future/includes/gutenberg/blocks/view/block.json -msgctxt "block description" -msgid "Display a GravityView View." -msgstr "" - -#: future/includes/gutenberg/blocks/view/block.json -msgctxt "block keyword" -msgid "view" -msgstr "" From afce56e8215c4f7d55909ed4d2d1b87ac0464e17 Mon Sep 17 00:00:00 2001 From: Zack Katz Date: Mon, 23 Oct 2023 21:10:52 -0400 Subject: [PATCH 4/7] Auto-add PRs to GitHub Projects --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..0a0967aea7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: Add issues and PRs to GitHub Projects + +on: + pull_request: + types: + - opened + - reopened +jobs: + add-to-project: + name: Auto-add pull requests to GravityKit Planning + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/GravityKit/projects/16 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} From 90632540a5c513d700e164e6b0888d35ad6b932d Mon Sep 17 00:00:00 2001 From: Zack Katz Date: Mon, 23 Oct 2023 21:15:08 -0400 Subject: [PATCH 5/7] Update name of action --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a0967aea7..3a2a1b657a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Add issues and PRs to GitHub Projects +name: Auto-Add Pull Requests on: pull_request: @@ -7,7 +7,7 @@ on: - reopened jobs: add-to-project: - name: Auto-add pull requests to GravityKit Planning + name: Add to GravityKit Planning runs-on: ubuntu-latest steps: - uses: actions/add-to-project@v0.5.0 From 310c965dda37f30161d817fae3342667b4e1a3cd Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 25 Oct 2023 11:53:27 -0400 Subject: [PATCH 6/7] Replace merge tags when rendering a View embedded as a field This fixes #1940 & also addresses merge tags not being replaced in start/end date override settings. --- .../class-gravityview-field-gravityview_view.php | 16 ++++++++-------- readme.txt | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/includes/fields/class-gravityview-field-gravityview_view.php b/includes/fields/class-gravityview-field-gravityview_view.php index 095d7cab47..378d5589e2 100644 --- a/includes/fields/class-gravityview-field-gravityview_view.php +++ b/includes/fields/class-gravityview-field-gravityview_view.php @@ -155,16 +155,17 @@ public function field_options( $field_options, $template_id, $field_id, $context static public function render_frontend( $field_settings, $context ) { global $post; - $view_id = \GV\Utils::get( $field_settings, 'view_id', \GV\Utils::get( $field_settings, 'view_id' ) ); + $view_id = $field_settings['view_id'] ?? null; + $form = $context->views->form->form ?? GFAPI::get_form( $field_settings['form_id'] ?? 0 ); - if ( empty( $view_id ) ) { + if ( ! $view_id || ! $form ) { return; } $attributes = ''; $page_size_value = \GV\Utils::get( $field_settings, 'page_size', 'default' ); - $attributes .= ( 'default' === $page_size_value ) ? '' : sprintf( ' page_size="%d"', $page_size_value ); + $attributes .= ( 'default' === $page_size_value ) ? '' : sprintf( ' page_size="%d"', $page_size_value ); // Prepare search field. $search_field = \GV\Utils::get( $field_settings, 'search_field' ); @@ -174,8 +175,8 @@ static public function render_frontend( $field_settings, $context ) { $search_value = \GV\Utils::get( $field_settings, 'search_value' ); if ( ! is_null( $search_value ) ) { - $search_value = GFCommon::replace_variables( $search_value, $context->form->form, $context->entry->as_entry() ); - $attributes .= sprintf( ' search_value="%s"', esc_attr( $search_value ) ); + $search_value = GFCommon::replace_variables( $search_value, $form, $context->entry->as_entry() ); + $attributes .= sprintf( ' search_value="%s"', esc_attr( $search_value ) ); } // Prepare search operator. @@ -187,14 +188,14 @@ static public function render_frontend( $field_settings, $context ) { // Start date $start_date = \GV\Utils::get( $field_settings, 'start_date' ); if ( ! empty( $start_date ) ) { - $start_date = GFCommon::replace_variables( $start_date, $context->form->form, $context->entry->as_entry() ); + $start_date = GFCommon::replace_variables( $start_date, $form, $context->entry->as_entry() ); $attributes .= sprintf( ' start_date="%s"', esc_attr( $start_date ) ); } // End date $end_date = \GV\Utils::get( $field_settings, 'end_date' ); if ( ! empty( $end_date ) ) { - $end_date = GFCommon::replace_variables( $end_date, $context->form->form, $context->entry->as_entry() ); + $end_date = GFCommon::replace_variables( $end_date, $form, $context->entry->as_entry() ); $attributes .= sprintf( ' end_date="%s"', esc_attr( $end_date ) ); } @@ -202,7 +203,6 @@ static public function render_frontend( $field_settings, $context ) { echo do_shortcode( $shortcode ); } - } new GravityView_Field_GravityView_View; diff --git a/readme.txt b/readme.txt index 7ae11fd744..dc0d841250 100644 --- a/readme.txt +++ b/readme.txt @@ -23,6 +23,7 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h = 2.19.3 [unreleased] = +* Fixed: Using merge tags as values for search and start/end date override settings was not working in Views embedded as a field * Fixed: Deprecation notice in PHP 8.2+ = 2.19.2 on October 19, 2023 = From 7558023941e02ac1920688330d1193b23356fb3a Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 25 Oct 2023 12:16:56 -0400 Subject: [PATCH 7/7] Bump version to 2.19.3 --- gravityview.php | 4 ++-- includes/class-admin-welcome.php | 7 +++++++ readme.txt | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gravityview.php b/gravityview.php index 1fbc4b5d93..80d1b17075 100644 --- a/gravityview.php +++ b/gravityview.php @@ -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.19.2 + * Version: 2.19.3 * Author: GravityKit * Author URI: https://www.gravitykit.com * Text Domain: gk-gravityview @@ -27,7 +27,7 @@ /** * The plugin version. */ -define( 'GV_PLUGIN_VERSION', '2.19.2' ); +define( 'GV_PLUGIN_VERSION', '2.19.3' ); /** * Full path to the GravityView file diff --git a/includes/class-admin-welcome.php b/includes/class-admin-welcome.php index f146fc22de..b9a32e56e5 100644 --- a/includes/class-admin-welcome.php +++ b/includes/class-admin-welcome.php @@ -284,6 +284,13 @@ public function changelog_screen() { * - If 4.28, include to 4.26. */ ?> +

2.19.3 on October 25, 2023

+ +
    +
  • Fixed: Using merge tags as values for search and start/end date override settings was not working in Views embedded as a field
  • +
  • Fixed: Deprecation notice in PHP 8.2+
  • +
+

2.19.2 on October 19, 2023

    diff --git a/readme.txt b/readme.txt index dc0d841250..97564cb8b5 100644 --- a/readme.txt +++ b/readme.txt @@ -21,7 +21,7 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h == Changelog == -= 2.19.3 [unreleased] = += 2.19.3 on October 25, 2023 = * Fixed: Using merge tags as values for search and start/end date override settings was not working in Views embedded as a field * Fixed: Deprecation notice in PHP 8.2+