GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Namespaces | Variables
post_image.php File Reference

Go to the source code of this file.

Namespaces

 GravityView
 includes
 

Variables

 $ary = explode("|:|", $value)
 
 $caption = count($ary) > 2 ? $ary[2] : ""
 
 $description = count($ary) > 3 ? $ary[3] : ""
 
 $gravityview_view = GravityView_View::getInstance()
 
 $image = new GravityView_Image( $image_atts )
 
 $image_atts
 
 $image_meta
 
 $link_atts = array()
 
if($gravityview_view->getAtts('lightbox')) $link_atts ['href'] = $href
 
 $link_atts ['title'] = $title
 
 $output = '<'.$wrappertag.' class="gv-image">'
 
 $showlabels = apply_filters( 'gravityview_post_image_meta_show_labels', true )
 
 $title = count($ary) > 1 ? $ary[1] : ""
 
 $url = count($ary) > 0 ? $ary[0] : ""
 
 $wrappertag = GFFormsModel::is_html5_enabled() ? 'figure' : 'div'
 
if(!empty($field['postFeaturedImage'])&&!empty($field_settings['dynamic_data'])&&!empty($entry['post_id'])&&has_post_thumbnail($entry['post_id'])) if(!empty($field_settings['link_to_post'])) else if(!empty($field_settings['show_as_link'])) else
 

Variable Documentation

$ary = explode("|:|", $value)

Definition at line 24 of file post_image.php.

Referenced by GravityView_Edit_Entry_Render\update_post_image().

$caption = count($ary) > 2 ? $ary[2] : ""

Definition at line 27 of file post_image.php.

Referenced by GravityView_Field_Post_Image\explode_value().

$description = count($ary) > 3 ? $ary[3] : ""

Definition at line 28 of file post_image.php.

$gravityview_view = GravityView_View::getInstance()

Definition at line 9 of file post_image.php.

$image = new GravityView_Image( $image_atts )
$image_atts
Initial value:
= array(
'src' => $url,
'alt' => ( !empty( $caption ) ? $caption : $title ),
'validate_src' => false,
)
$url
Definition: post_image.php:25
$caption
Definition: post_image.php:27
$title
Definition: post_image.php:26

Definition at line 92 of file post_image.php.

$image_meta
Initial value:
= apply_filters('gravityview_post_image_meta', array(
'title' => array(
'label' => esc_attr_x( 'Title:', 'Post Image field title heading', 'gravityview'),
'value' => $title,
'tag_label' => 'span',
'tag_value' => 'div'
),
'caption' => array(
'label' => esc_attr_x( 'Caption:', 'Post Image field caption heading', 'gravityview'),
'value' => $caption,
'tag_label' => 'span',
'tag_value' => GFFormsModel::is_html5_enabled() ? 'figcaption' : 'div',
),
'description' => array(
'label' => esc_attr_x( 'Description:', 'Post Image field description heading', 'gravityview'),
'value' => $description,
'tag_label' => 'span',
'tag_value' => 'div'
),
))
$caption
Definition: post_image.php:27
$title
Definition: post_image.php:26
$description
Definition: post_image.php:28

Definition at line 106 of file post_image.php.

Referenced by GravityView_Edit_Entry_Render\update_post_image().

$link_atts = array()

Definition at line 30 of file post_image.php.

if ($gravityview_view->getAtts('lightbox')) $link_atts['href'] = $href

Definition at line 83 of file post_image.php.

$link_atts['title'] = $title

Definition at line 86 of file post_image.php.

foreach ((array)$image_meta as $key=> $meta) $output = '<'.$wrappertag.' class="gv-image">'

Definition at line 138 of file post_image.php.

$showlabels = apply_filters( 'gravityview_post_image_meta_show_labels', true )

Definition at line 135 of file post_image.php.

$title = count($ary) > 1 ? $ary[1] : ""

Definition at line 26 of file post_image.php.

$url = count($ary) > 0 ? $ary[0] : ""
$wrappertag = GFFormsModel::is_html5_enabled() ? 'figure' : 'div'

Definition at line 128 of file post_image.php.

if (!empty($field['postFeaturedImage'])&&!empty($field_settings['dynamic_data'])&&!empty($entry['post_id'])&&has_post_thumbnail($entry['post_id'])) if (!empty($field_settings['link_to_post'])) else if (!empty($field_settings['show_as_link'])) else
Initial value:
{
$url
Definition: post_image.php:25
Since
1.5.4

$field['postFeaturedImage'] - holds if the Post Image field is set as post featured image $field_settings['dynamic_data'] - whether the field content should be fetched from the Post (dynamic data) or from the GF entry

Dynamic data (get post featured image instead of GF entry field)

Definition at line 70 of file post_image.php.