WP_REST_Meta_Fields::get_empty_value_for_type

Advertisement

Summery Summery

Gets the empty value for a schema type.

Syntax Syntax

WP_REST_Meta_Fields::get_empty_value_for_type( string $type )

Parameters Parameters

$type

(Required) The schema type.

Return Return

(mixed)

Source Source

File: wp-includes/rest-api/fields/class-wp-rest-meta-fields.php

				if ( ! isset( $schema['additionalProperties'] ) ) {
					$schema['additionalProperties'] = false;
				}
				break;
			case 'array':
				$schema['items'] = $this->default_additional_properties_to_false( $schema['items'] );
				break;
		}

		return $schema;
	}

	/**
	 * Gets the empty value for a schema type.
	 *
	 * @since 5.3.0

Advertisement

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Advertisement

Leave a Reply