LLMS_REST_Access_Plans_Controller::get_item_schema()
Get the Access Plan’s schema, conforming to JSON Schema
Return Return
(array)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-access-plans-controller.php
*/ public function get_item_schema_base() { $schema = (array) parent::get_item_schema_base(); // Post properties to unset. $properties_to_unset = array( 'comment_status', 'excerpt', 'featured_media', 'password', 'ping_status', 'slug', 'status', ); foreach ( $properties_to_unset as $to_unset ) { unset( $schema['properties'][ $to_unset ] ); } // The content is not required. unset( $schema['properties']['content']['required'] ); $access_plan_properties = require LLMS_REST_API_PLUGIN_DIR . 'includes/server/schemas/schema-access-plans.php'; $schema['properties'] = array_merge( $schema['properties'], $access_plan_properties ); return $schema; } /** * Retrieves the query params for the objects collection * * @since 1.0.0-beta.18
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Introduced. |