Summery Summery
Prepares a meta value for output.
Syntax Syntax
Description Description
Default preparation for meta fields. Override by passing the prepare_callback
in your show_in_rest
options.
Parameters Parameters
- $value
-
(Required) Meta value from the database.
- $request
-
(Required) Request object.
- $args
-
(Required) REST-specific options for the meta key.
Return Return
(mixed) Value prepared for output. If a non-JsonSerializable object, null.
Source Source
File: wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
foreach ( $fields as $args ) { $schema['properties'][ $args['name'] ] = $args['schema']; } return $schema; } /** * Prepares a meta value for output. * * Default preparation for meta fields. Override by passing the * `prepare_callback` in your `show_in_rest` options. * * @since 4.7.0 * * @param mixed $value Meta value from the database.
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |