LearnDash_Settings_Fields_Date_Entry::rest_value_to_field_value( mixed $val = '', string $key = '', $field_args = array() )
Converts REST submit value to internal Settings Field acceptable value.
Description #
In this case, it needs to convert the value to a timestamp with an offset based on the site timezone.
Parameters #
- $val
-
(mixed) (Optional) Value from REST to be converted to internal value.
Default value: ''
- $key
-
(string) (Optional) Key field for value.
Default value: ''
-
(<span class="arrayarray<string,) (Required) mixed> $field_args Array of field args.
Return #
(array{aa?:) int, mm?: int, jj?: int, hh?: int, mn?: int} Expected array format representing year, month, day, hour, and minute. An empty array will clear the saved value.
Source #
File: includes/settings/settings-fields/class-ld-settings-fields-date-entry.php
Changelog #
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |