On this page
wp_ajax_time_format()
Ajax handler for time formatting.
Source
File: wp-admin/includes/ajax-actions.php. View all references
function wp_ajax_time_format() {
wp_die( date_i18n( sanitize_option( 'time_format', wp_unslash( $_POST['date'] ) ) ) );
}
Related
Uses
| Uses | Description |
|---|---|
| sanitize_option() wp-includes/formatting.php | Sanitizes various option values based on the nature of the option. |
| date_i18n() wp-includes/functions.php | Retrieves the date in localized format, based on a sum of Unix timestamp and timezone offset in seconds. |
| wp_unslash() wp-includes/formatting.php | Removes slashes from a string or recursively removes slashes from strings within an array. |
| wp_die() wp-includes/functions.php | Kills WordPress execution and displays HTML page with an error message. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_ajax_time_format