40 if( !empty(
$field[
'postFeaturedImage'] ) && !empty(
$field_settings[
'dynamic_data'] ) && !empty(
$entry[
'post_id'] ) && has_post_thumbnail(
$entry[
'post_id'] ) ) {
47 $image_size = apply_filters(
'gravityview/fields/post_image/size',
'large',
$entry );
48 $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(
$entry[
'post_id'] ), $image_size );
50 if( empty( $image_url[0] ) ) {
51 do_action(
'gravityview_log_debug',
'Dynamic featured image for post #'.
$entry[
'post_id'].
' doesnt exist (size: '.$image_size.
').' );
76 $link_atts[
'class'] = apply_filters(
'gravityview_lightbox_script',
'thickbox' );
95 'validate_src' =>
false,
108 'label' => esc_attr_x(
'Title:',
'Post Image field title heading',
'gk-gravityview'),
110 'tag_label' =>
'span',
114 'label' => esc_attr_x(
'Caption:',
'Post Image field caption heading',
'gk-gravityview'),
116 'tag_label' =>
'span',
117 'tag_value' => GFFormsModel::is_html5_enabled() ?
'figcaption' :
'div',
119 'description' => array(
120 'label' => esc_attr_x(
'Description:',
'Post Image field description heading',
'gk-gravityview'),
122 'tag_label' =>
'span',
128 $wrappertag = GFFormsModel::is_html5_enabled() ?
'figure' :
'div';
135 $showlabels = apply_filters(
'gravityview_post_image_meta_show_labels',
true );
138 $output =
'<'.$wrappertag.
' class="gv-image">';
145 if( !empty( $meta[
'value'] ) ) {
147 $output .=
'<div class="gv-image-'.esc_attr( $key ).
'">';
150 if( !empty(
$showlabels ) && !empty( $meta[
'label'] ) ) {
151 $output .=
'<'.esc_attr( $meta[
'tag_label'] ).
' class="gv-image-label">';
152 $output .= esc_html( $meta[
'label'] );
153 $output .=
'</'.esc_attr( $meta[
'tag_label'] ).
'> ';
157 $output .=
'<'.esc_attr( $meta[
'tag_value'] ).
' class="gv-image-value">';
158 $output .= esc_html( $meta[
'value'] );
159 $output .=
'</'.esc_attr( $meta[
'tag_value'] ).
'>';
166 $output .=
'</'.$wrappertag.
'>';
Generic class for generating image tag.
static getInstance( $passed_post=NULL)
$field_settings['content']
gravityview_get_link( $href='', $anchor_text='', $atts=array())
Generate an HTML anchor tag with a list of supported attributes.
gv_entry_link( $entry, $post_id=NULL)