rest_sanitize_boolean

Advertisement

Summery Summery

Changes a boolean-like value into the proper boolean value.

Syntax Syntax

rest_sanitize_boolean( bool|string|int $value )

Parameters Parameters

$value

(bool|string|int) (Required) The value being evaluated.

Return Return

(boolean) Returns the proper associated boolean value.

Source Source

File: wp-includes/rest-api.php

 *
 * @since 4.4.0
 *
 * @see rest_parse_date()
 *
 * @param string $date   RFC3339 timestamp.
 * @param bool   $is_utc Whether the provided date should be interpreted as UTC. Default false.
 * @return array|null Local and UTC datetime strings, in MySQL datetime format (Y-m-d H:i:s),
 *                    null on failure.
 */
function rest_get_date_with_gmt( $date, $is_utc = false ) {
	/*

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.