Make WordPress Core


Ignore:
Timestamp:
10/04/2017 08:26:44 AM (7 years ago)
Author:
joehoyle
Message:

REST API: Support for objects in schema validation and sanitization.

When registering routes developers can now define their complex objects in the schema and benefit from the automatic validation and sanitization in the REST API. This also paves the way for support for complex object registration via register_meta and register_setting.

See #38583.
Props TimothyBlynJacobs5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r41588 r41727  
    12011201                    'arg_options'     => array(
    12021202                        'sanitize_callback' => null, // Note: sanitization implemented in self::prepare_item_for_database()
     1203                        'validate_callback' => null, // Note: validation implemented in self::prepare_item_for_database()
    12031204                    ),
    12041205                    'properties'      => array(
Note: See TracChangeset for help on using the changeset viewer.