GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
post_excerpt.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the post_content field type
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
10 
11 extract( $gravityview_view->getCurrentField() );
12 
13 if( !empty( $field_settings['dynamic_data'] ) && !empty( $entry['post_id'] ) ) {
14 
15  global $post;
16 
17  /** Backup! */
18  $_the_post = $post;
19 
20  $post = get_post( $entry['post_id'] );
21 
22  if( empty( $post ) ) {
23  do_action('gravityview_log_debug', 'Dynamic data for post #'.$entry['post_id'].' doesnt exist.' );
24  wp_reset_postdata();
25  return;
26  }
27 
28  setup_postdata( $post );
29  the_excerpt();
30  wp_reset_postdata();
31 
32  /** Restore! */
33  $post = $_the_post;
34 
35 } else {
36  echo $display_value;
37 }
static getInstance( $passed_post=NULL)
$gravityview_view
Definition: post_excerpt.php:9
$display_value
$field_settings['content']
Definition: custom.php:27
global $post
Definition: delete-entry.php:7
$entry
Definition: notes.php:27