" : '';
break;
}
}
return $value;
}
public function get_value_submission( $field_values, $get_from_post_global_var = true ) {
$value[ $this->id . '.1' ] = $this->get_input_value_submission( 'input_' . $this->id . '_1', $get_from_post_global_var );
$value[ $this->id . '.4' ] = $this->get_input_value_submission( 'input_' . $this->id . '_4', $get_from_post_global_var );
$value[ $this->id . '.7' ] = $this->get_input_value_submission( 'input_' . $this->id . '_7', $get_from_post_global_var );
return $value;
}
/**
* Gets merge tag values.
*
* @since Unknown
* @access public
*
* @param array|string $value The value of the input.
* @param string $input_id The input ID to use.
* @param array $entry The Entry Object.
* @param array $form The Form Object
* @param string $modifier The modifier passed.
* @param array|string $raw_value The raw value of the input.
* @param bool $url_encode If the result should be URL encoded.
* @param bool $esc_html If the HTML should be escaped.
* @param string $format The format that the value should be.
* @param bool $nl2br If the nl2br function should be used.
*
* @return string The processed merge tag.
*/
public function get_value_merge_tag( $value, $input_id, $entry, $form, $modifier, $raw_value, $url_encode, $esc_html, $format, $nl2br ) {
list( $url, $title, $caption, $description ) = array_pad( explode( '|:|', $value ), 4, false );
switch ( $modifier ) {
case 'title' :
return $title;
case 'caption' :
return $caption;
case 'description' :
return $description;
default :
return str_replace( ' ', '%20', $url );
}
}
}
GF_Fields::register( new GF_Field_Post_Image() );