Adjust context for REST API fields

This commit is contained in:
Brian Miyaji
2016-04-13 15:58:01 +10:00
parent 38e3944623
commit 4f3c539b70

View File

@@ -142,7 +142,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Players', 'sportspress' ), 'description' => __( 'Players', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -158,7 +158,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Staff', 'sportspress' ), 'description' => __( 'Staff', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -174,7 +174,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Results', 'sportspress' ), 'description' => __( 'Results', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -190,7 +190,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Box Score', 'sportspress' ), 'description' => __( 'Box Score', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -206,7 +206,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Staff', 'sportspress' ), 'description' => __( 'Staff', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -222,7 +222,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'League Tables', 'sportspress' ), 'description' => __( 'League Tables', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -238,7 +238,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Player Lists', 'sportspress' ), 'description' => __( 'Player Lists', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -253,7 +253,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Events', 'sportspress' ), 'description' => __( 'Events', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'embed' ), 'context' => array( 'view' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -300,7 +300,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Teams', 'sportspress' ), 'description' => __( 'Teams', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'embed' ), 'context' => array( 'view' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -330,7 +330,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Past Teams', 'sportspress' ), 'description' => __( 'Past Teams', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'embed' ), 'context' => array( 'view' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -361,7 +361,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Metrics', 'sportspress' ), 'description' => __( 'Metrics', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),
@@ -377,7 +377,7 @@ class SP_REST_API {
'schema' => array( 'schema' => array(
'description' => __( 'Statistics', 'sportspress' ), 'description' => __( 'Statistics', 'sportspress' ),
'type' => 'array', 'type' => 'array',
'context' => array( 'view', 'edit', 'embed' ), 'context' => array( 'view', 'edit' ),
'arg_options' => array( 'arg_options' => array(
'sanitize_callback' => 'rest_sanitize_request_arg', 'sanitize_callback' => 'rest_sanitize_request_arg',
), ),