GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
templates
deprecated
fields
source_url.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Generate output for the Source URL field
4
* @package GravityView
5
* @subpackage GravityView/templates/fields
6
* @since 1.1.6
7
*/
8
9
$gravityview_view
=
GravityView_View::getInstance
();
10
11
extract(
$gravityview_view
->getCurrentField() );
12
13
// If linking to the source URL
14
if
( !empty(
$field_settings
[
'link_to_source'
] ) ) {
15
16
// If customizing the anchor text
17
if
( !empty(
$field_settings
[
'source_link_text'
] ) ) {
18
19
$link_text
=
GravityView_API::replace_variables
(
$field_settings
[
'source_link_text'
],
$form
,
$entry
);
20
21
}
else
{
22
23
// Otherwise, it's just the URL
24
$link_text
= esc_html(
$value
);
25
26
}
27
28
$output
=
gravityview_get_link
(
$value
,
$link_text
);
29
30
}
else
{
31
32
// Otherwise, it's just the URL
33
$output
= esc_url_raw(
$value
);
34
35
}
36
37
echo
$output
;
$link_text
if(!GravityView_Delete_Entry::check_user_cap_delete_entry( $entry, $field_settings)) $link_text
Definition:
delete_link.php:19
GravityView_View\getInstance
static getInstance( $passed_post=NULL)
Definition:
class-template.php:195
$gravityview_view
$gravityview_view
Definition:
source_url.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
GV\$form
if(gravityview() ->plugin->is_GF_25()) $form
Definition:
class-gv-settings-plugin.php:526
$value
$value
Definition:
search-field-date_range.php:10
GravityView_API\replace_variables
static replace_variables( $text, $form=array(), $entry=array(), $url_encode=false, $esc_html=true, $nl2br=true, $format='html', $aux_data=array())
Alias for GravityView_Merge_Tags::replace_variables()
Definition:
class-api.php:118
$output
$output
Definition:
edit_link.php:18
$entry
$entry
Definition:
notes.php:27