From fbe99a4bd8da488945c4d69c2337b125a707ff4e Mon Sep 17 00:00:00 2001 From: nitesh Patel <1988niteshpatel@gmail.com> Date: Wed, 25 Nov 2026 15:23:05 +0530 Subject: [PATCH] REST API: Use consistent ISO 8601 spelling in parameter descriptions --- .../class-wp-rest-comments-controller.php | 4 +- .../class-wp-rest-posts-controller.php | 8 +-- tests/qunit/fixtures/wp-api-generated.js | 52 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index 3bb44059052eb..fc5e72834e93e 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -2149,7 +2149,7 @@ public function get_collection_params() { $query_params['context']['default'] = 'view'; $query_params['after'] = array( - 'description' => __( 'Limit response to comments published after a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to comments published after a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); @@ -2178,7 +2178,7 @@ public function get_collection_params() { ); $query_params['before'] = array( - 'description' => __( 'Limit response to comments published before a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to comments published before a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index a333b55845410..ae0af24464252 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -3025,13 +3025,13 @@ public function get_collection_params() { $query_params['context']['default'] = 'view'; $query_params['after'] = array( - 'description' => __( 'Limit response to posts published after a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to posts published after a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); $query_params['modified_after'] = array( - 'description' => __( 'Limit response to posts modified after a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to posts modified after a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); @@ -3056,13 +3056,13 @@ public function get_collection_params() { } $query_params['before'] = array( - 'description' => __( 'Limit response to posts published before a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to posts published before a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); $query_params['modified_before'] = array( - 'description' => __( 'Limit response to posts modified before a given ISO8601 compliant date.' ), + 'description' => __( 'Limit response to posts modified before a given ISO 8601 compliant date.' ), 'type' => 'string', 'format' => 'date-time', ); diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index ba63e6425b7fd..e69ba020a6769 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -307,13 +307,13 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -337,13 +337,13 @@ mockedApiResponse.Schema = { "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -1694,13 +1694,13 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -1724,13 +1724,13 @@ mockedApiResponse.Schema = { "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -2808,13 +2808,13 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -2838,13 +2838,13 @@ mockedApiResponse.Schema = { "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -3839,25 +3839,25 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -4658,13 +4658,13 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -4688,13 +4688,13 @@ mockedApiResponse.Schema = { "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -7312,25 +7312,25 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to posts published after a given ISO8601 compliant date.", + "description": "Limit response to posts published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_after": { - "description": "Limit response to posts modified after a given ISO8601 compliant date.", + "description": "Limit response to posts modified after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "before": { - "description": "Limit response to posts published before a given ISO8601 compliant date.", + "description": "Limit response to posts published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false }, "modified_before": { - "description": "Limit response to posts modified before a given ISO8601 compliant date.", + "description": "Limit response to posts modified before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -10511,7 +10511,7 @@ mockedApiResponse.Schema = { "required": false }, "after": { - "description": "Limit response to comments published after a given ISO8601 compliant date.", + "description": "Limit response to comments published after a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false @@ -10540,7 +10540,7 @@ mockedApiResponse.Schema = { "required": false }, "before": { - "description": "Limit response to comments published before a given ISO8601 compliant date.", + "description": "Limit response to comments published before a given ISO 8601 compliant date.", "type": "string", "format": "date-time", "required": false