Skip to content

Commit f21a9a1

Browse files
authored
gw-update-posts.php: Added support to update post excerpt.
1 parent 03fcd3d commit f21a9a1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gravity-forms/gw-update-posts.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function __construct( $args = array() ) {
2525
'title' => false,
2626
'content' => false,
2727
'author' => false,
28+
'excerpt' => false,
2829
'status' => false,
2930
'slug' => false,
3031
'terms' => array(),
@@ -105,6 +106,10 @@ public function update_post_by_entry( $entry, $form ) {
105106
$post->post_author = (int) rgar( $entry, $this->_args['author'] );
106107
}
107108

109+
if ( $this->_args['excerpt'] ) {
110+
$post->post_excerpt = rgar( $entry, $this->_args['excerpt'] );
111+
}
112+
108113
if ( $this->_args['status'] ) {
109114
$stati = get_post_stati();
110115
$status = rgar( $entry, $this->_args['status'] );
@@ -419,5 +424,3 @@ public function get_post_date( $entry, $form ) {
419424
return gmdate( 'Y-m-d H:i:s', strtotime( sprintf( '%s %s:%s:00', $date, $hour, $min ) ) );
420425
}
421426
}
422-
423-

0 commit comments

Comments
 (0)