GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
deprecated
fields
post_content.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
9
$gravityview_view
=
GravityView_View::getInstance
();
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_content();
30
wp_reset_postdata();
31
32
/** Restore! */
33
$post = $_the_post;
34
35
}
else
{
36
echo
$display_value
;
37
}
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
$gravityview_view
$gravityview_view
Definition:
post_content.php:9
$display_value
$display_value
Definition:
field-address-csv.php:17
$field_settings
$field_settings['content']
Definition:
custom.php:27
$post
global $post
Definition:
delete-entry.php:7
$entry
$entry
Definition:
notes.php:27