From 8115168964a71043e226a619da70ffec4c22662f Mon Sep 17 00:00:00 2001 From: omarkasem Date: Sat, 13 Jul 2024 07:20:52 +0300 Subject: [PATCH 1/3] Fix gv_entry_link shortcode in views page --- includes/class-gravityview-entry-link-shortcode.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-gravityview-entry-link-shortcode.php b/includes/class-gravityview-entry-link-shortcode.php index 0eff217ade..41987dc308 100644 --- a/includes/class-gravityview-entry-link-shortcode.php +++ b/includes/class-gravityview-entry-link-shortcode.php @@ -133,6 +133,10 @@ private function shortcode( $atts, $content = null, $context = 'gv_entry_link' ) $this->view_id = empty( $this->settings['view_id'] ) ? GravityView_View::getInstance()->getViewId() : absint( $this->settings['view_id'] ); + if( empty( $this->view_id ) && get_the_ID() ){ + $this->view_id = get_the_ID(); + } + if ( empty( $this->view_id ) ) { gravityview()->log->error( 'A View ID was not defined and we are not inside a View' ); From e6c3d909561a97ed22725f7475cfe5479a70b7bc Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 30 Jul 2024 17:57:56 -0400 Subject: [PATCH 2/3] Format code --- includes/class-gravityview-entry-link-shortcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-gravityview-entry-link-shortcode.php b/includes/class-gravityview-entry-link-shortcode.php index 41987dc308..dab70ad456 100644 --- a/includes/class-gravityview-entry-link-shortcode.php +++ b/includes/class-gravityview-entry-link-shortcode.php @@ -133,7 +133,7 @@ private function shortcode( $atts, $content = null, $context = 'gv_entry_link' ) $this->view_id = empty( $this->settings['view_id'] ) ? GravityView_View::getInstance()->getViewId() : absint( $this->settings['view_id'] ); - if( empty( $this->view_id ) && get_the_ID() ){ + if ( empty( $this->view_id ) && get_the_ID() ) { $this->view_id = get_the_ID(); } From 9656a07d11a1147045ad5db3476f65b40eaa2840 Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 30 Jul 2024 18:07:46 -0400 Subject: [PATCH 3/3] Update changelog [ci skip] --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index c2a0c39197..b6d47c2d09 100644 --- a/readme.txt +++ b/readme.txt @@ -27,6 +27,7 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h * Timeout issue when rendering a page/post with GravityView Gutenberg blocks when Yoast SEO is active. * View editor fields added to the Single or Edit Entry layouts inheriting options from the View type set in the Multiple Entries layout. * An issue in the Search Widget configuration where adding a Date field caused the search mode ("any" and "all") to no longer be toggleable. +* `[gv_entry_link]` shortcode not rendering inside the Custom HTML block. = 2.25 on June 5, 2024 =