18 var
$contexts = array(
'single',
'multiple',
'export' );
22 var
$icon =
'dashicons-calendar-alt';
29 $this->label = esc_html__(
'Date Created',
'gk-gravityview' );
31 $this->
description = esc_html__(
'The date the entry was created.',
'gk-gravityview' );
33 add_filter(
'gravityview_field_entry_value_' . $this->name .
'_pre_link', array( $this,
'get_content' ), 10, 4 );
35 parent::__construct();
40 if(
'edit' === $context ) {
41 return $field_options;
46 return $field_options;
93 foreach ( $matches as $match ) {
95 $full_tag = $match[0];
96 $property = $match[1];
100 $return = str_replace( $full_tag, $formatted_date, $return );
Modify field settings by extending this class.
__construct()
GravityView_Field_Date_Created constructor.
get_content( $output='', $entry=array(), $field_settings=array(), $field=array())
Filter the value of the field.
new GravityView_Field_Date_Created
$field_settings['content']
add_field_support( $key, &$field_options)
if(gravityview() ->plugin->is_GF_25()) $form
replace_merge_tag( $matches=array(), $text='', $form=array(), $entry=array(), $url_encode=false, $esc_html=false)
Add {date_created} merge tag and format the values using format_date.
scale description p description
static format_date( $date_string='', $args=array())
Allow formatting date and time based on GravityView standards.
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
if(empty( $created_by)) $form_id
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed