From aca114f3416b0f5d2603ad808b3180deaceb59e2 Mon Sep 17 00:00:00 2001 From: Samuel Bassah Date: Wed, 29 Oct 2025 09:56:51 +0000 Subject: [PATCH 1/2] `gw-update-posts.php`: Added support to update post excerpt. --- gravity-forms/gw-update-posts.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gravity-forms/gw-update-posts.php b/gravity-forms/gw-update-posts.php index c326a694f..37b85c6b1 100644 --- a/gravity-forms/gw-update-posts.php +++ b/gravity-forms/gw-update-posts.php @@ -25,6 +25,7 @@ public function __construct( $args = array() ) { 'title' => false, 'content' => false, 'author' => false, + 'excerpt' => false, 'status' => false, 'slug' => false, 'terms' => array(), @@ -104,6 +105,10 @@ public function update_post_by_entry( $entry, $form ) { if ( $this->_args['author'] ) { $post->post_author = (int) rgar( $entry, $this->_args['author'] ); } + + if ($this->_args['excerpt']) { + $post->post_excerpt = rgar($entry, $this->_args['excerpt']); + } if ( $this->_args['status'] ) { $stati = get_post_stati(); @@ -419,5 +424,3 @@ public function get_post_date( $entry, $form ) { return gmdate( 'Y-m-d H:i:s', strtotime( sprintf( '%s %s:%s:00', $date, $hour, $min ) ) ); } } - - From 4e38e36297299aae96a4a0e6688d7efc85344fb4 Mon Sep 17 00:00:00 2001 From: Samuel Bassah Date: Wed, 29 Oct 2025 10:20:22 +0000 Subject: [PATCH 2/2] `gw-update-posts.php`: Added support to update post excerpt. --- gravity-forms/gw-update-posts.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gravity-forms/gw-update-posts.php b/gravity-forms/gw-update-posts.php index 37b85c6b1..6cda6076b 100644 --- a/gravity-forms/gw-update-posts.php +++ b/gravity-forms/gw-update-posts.php @@ -25,7 +25,7 @@ public function __construct( $args = array() ) { 'title' => false, 'content' => false, 'author' => false, - 'excerpt' => false, + 'excerpt' => false, 'status' => false, 'slug' => false, 'terms' => array(), @@ -105,10 +105,10 @@ public function update_post_by_entry( $entry, $form ) { if ( $this->_args['author'] ) { $post->post_author = (int) rgar( $entry, $this->_args['author'] ); } - - if ($this->_args['excerpt']) { - $post->post_excerpt = rgar($entry, $this->_args['excerpt']); - } + + if ( $this->_args['excerpt'] ) { + $post->post_excerpt = rgar( $entry, $this->_args['excerpt'] ); + } if ( $this->_args['status'] ) { $stati = get_post_stati();