HEX
HEX
Server: Apache
System: Linux localhost.localdomain 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1001)
PHP: 8.1.32
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/ahmsolaiman.com/wp-content/plugins/types/vendor/toolset/types/includes/fields/date.php
<?php
/**
 * Types-field: Date
 *
 * Description: Displays a datepicker to the user with optional
 * 'hour' and 'minute' selection.
 *
 * Rendering: Date is stored in seconds (time()) but displayed as date
 * formatted. Additional data like 'hour' and 'minute' is stored in separate
 * meta value.
 * 
 * Parameters:
 * 'raw' => 'true'|'false' (display raw data stored in DB, default false)
 * 'output' => 'html' (wrap data in HTML, optional)
 * 'show_name' => 'true' (show field name before value e.g. My date: $value)
 * 'style' => 'text'|'calendar' (display text or WP calendar)
 * 'format' => defaults to WP date format settings, can be any valid date format
 *     e.g. "j/n/Y" or "j/n/Y H:i"
 *
 * Example usage:
 * With a short code use [types field="my-date"]
 * Display only hour and minute [types field="my-date" format="H:i"]
 * In a theme use types_render_field("my-date", $parameters)
 * 
 */

/**
 * Form data for group form.
 * 
 * @return type 
 */
function wpcf_fields_date_insert_form( $form)
{
    $form = array(
        'description' => array(),
        'placeholder' => array(),
    );
    $form['date_and_time'] = array(
        '#type' => 'radios',
        '#title' => __('Time', 'wpcf'),
        '#name' => 'date_and_time',
        '#default_value' => isset( $form_data['data']['date_and_time'] ) ? strval( $form_data['data']['date_and_time'] ) : 'date',
        '#options' => array(
            'date' => array(
                '#title' => __( 'Input only the date', 'wpcf' ),
                '#value' => 'date',
                '#inline' => true,
                '#before' => '<li>',
                '#after' => '</li>',
            ),
            'and_time' => array(
                '#title' => __( 'Input date and time', 'wpcf' ),
                '#value' => 'and_time',
                '#inline' => true,
                '#before' => '<li>',
                '#after' => '</li>',
            ),
        ),
        '#inline' => true,
        '#before' => '<ul>',
        '#after' => '</ul>',
    );

    return $form;
}