From cee80095c88d901e7400aafd091a47433707b59d Mon Sep 17 00:00:00 2001 From: saifsultanc Date: Wed, 26 Feb 2025 23:37:48 +0530 Subject: [PATCH 1/3] `gw-all-fields-template.php`: Added filter to customize template content. --- gravity-forms/gw-all-fields-template.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gravity-forms/gw-all-fields-template.php b/gravity-forms/gw-all-fields-template.php index b6f88f932..2a6dda5f9 100644 --- a/gravity-forms/gw-all-fields-template.php +++ b/gravity-forms/gw-all-fields-template.php @@ -591,7 +591,20 @@ public function load_template( $slug, $name = null, $data = array(), $suffixes = include( $template ); } $content = ob_get_clean(); - return ! $template ? false : $content; + + /** + * Filters the content loaded by the template. + * + * @since 0.12 + * + * @param string $content The content loaded by the template. + * @param string $slug The slug name for the generic template. + * @param string $name The name of the specialized template. + * @param array $data An array of data extracted for use in the template. + * @param array $suffixes An array of suffixes used to locate the template. + */ + $content = apply_filters( 'gwaft_template_content', $content, $slug, $name, $data, $suffixes ); + return ! $template && ! $content ? false : $content; } public function get_template_part( $slug, $name = null, $load = true, $suffixes = array() ) { From 3bd8b0460e68891d9945236eb1462cec2cd369be Mon Sep 17 00:00:00 2001 From: Saif Sultan Date: Fri, 28 Feb 2025 11:45:21 +0530 Subject: [PATCH 2/3] `gw-all-fields-template.php`: Added filter to customize template content. --- gravity-forms/gw-all-fields-template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gravity-forms/gw-all-fields-template.php b/gravity-forms/gw-all-fields-template.php index 2a6dda5f9..c92f4f9a2 100644 --- a/gravity-forms/gw-all-fields-template.php +++ b/gravity-forms/gw-all-fields-template.php @@ -593,17 +593,17 @@ public function load_template( $slug, $name = null, $data = array(), $suffixes = $content = ob_get_clean(); /** - * Filters the content loaded by the template. + * Filters the output loaded by the template. * * @since 0.12 * - * @param string $content The content loaded by the template. + * @param string $content The output content loaded by the template. * @param string $slug The slug name for the generic template. * @param string $name The name of the specialized template. * @param array $data An array of data extracted for use in the template. * @param array $suffixes An array of suffixes used to locate the template. */ - $content = apply_filters( 'gwaft_template_content', $content, $slug, $name, $data, $suffixes ); + $content = apply_filters( 'gwaft_template_output', $content, $slug, $name, $data, $suffixes ); return ! $template && ! $content ? false : $content; } From b14477ee588b930dfb0a8e04daa3c4682171c17a Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 28 Feb 2025 13:44:07 -0500 Subject: [PATCH 3/3] Update gw-all-fields-template.php --- gravity-forms/gw-all-fields-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity-forms/gw-all-fields-template.php b/gravity-forms/gw-all-fields-template.php index c92f4f9a2..f23f368f8 100644 --- a/gravity-forms/gw-all-fields-template.php +++ b/gravity-forms/gw-all-fields-template.php @@ -8,7 +8,7 @@ * Plugin URI: https://gravitywiz.com/gravity-forms-all-fields-template/ * Description: Modify the {all_fields} merge tag output via a template file. * Author: Gravity Wiz - * Version: 0.11 + * Version: 0.12 * Author URI: http://gravitywiz.com * * Usage: