GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
deprecated
fields
post_title.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Display the post_title 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
$output
= get_the_title(
$entry
[
'post_id'
] );
15
16
if
( empty(
$output
) ) {
17
do_action(
'gravityview_log_debug'
,
'Dynamic data for post #'
.
$entry
[
'post_id'
].
' doesnt exist.'
);
18
}
19
20
}
else
{
21
$output
=
$display_value
;
22
}
23
24
// Link to the post URL?
25
if
( !empty(
$field_settings
[
'link_to_post'
] ) && !empty(
$entry
[
'post_id'
] ) ) {
26
27
echo
gravityview_get_link
( get_permalink(
$entry
[
'post_id'
] ), esc_attr(
$output
) );
28
29
}
else
{
30
echo
$output
;
31
}
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
$display_value
$display_value
Definition:
field-address-csv.php:17
$gravityview_view
$gravityview_view
Definition:
post_title.php:9
$field_settings
$field_settings['content']
Definition:
custom.php:27
gravityview_get_link
gravityview_get_link( $href='', $anchor_text='', $atts=array())
Generate an HTML anchor tag with a list of supported attributes.
Definition:
class-common.php:1931
$output
$output
Definition:
edit_link.php:18
$entry
$entry
Definition:
notes.php:27