← All changes
|
inc/jwt/rest-api/version1/class-lp-rest-sections-v1-controller.php
+7
-7
4.1.7
→
4.4.9
View file →
| @@ -36,9 +36,9 @@ | ||
| 36 | 36 | |
| 37 | 37 | $post_status_obj = get_post_status_object( $post->post_status ); |
| 38 | 38 | |
| 39 | 39 | if ( ! $post_status_obj || ! $post_status_obj->public ) { |
| 40 | - return new WP_Error( 'lp_section_not_public', __( 'Course is not public', 'learnpress' ), array( 'status' => rest_authorization_required_code() ) ); | |
| 40 | + return new WP_Error( 'lp_section_not_public', __( 'The course is not public', 'learnpress' ), array( 'status' => rest_authorization_required_code() ) ); | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return true; |
| 44 | 44 | } |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | 'title' => 'learnpress_sections', |
| 113 | 113 | 'type' => 'object', |
| 114 | 114 | 'properties' => array( |
| 115 | 115 | 'id' => array( |
| 116 | - 'description' => __( 'Unique identifier for the resource.', 'learnpress' ), | |
| 116 | + 'description' => __( 'A unique identifier for the resource.', 'learnpress' ), | |
| 117 | 117 | 'type' => 'integer', |
| 118 | 118 | 'context' => array( 'view', 'edit' ), |
| 119 | 119 | 'readonly' => true, |
| 120 | 120 | ), |
| @@ -139,9 +139,9 @@ | ||
| 139 | 139 | $params['context'] = $this->get_context_param(); |
| 140 | 140 | $params['context']['default'] = 'view'; |
| 141 | 141 | |
| 142 | 142 | $params['page'] = array( |
| 143 | - 'description' => __( 'Current page of the collection.', 'learnpress' ), | |
| 143 | + 'description' => __( 'The current page of the collection.', 'learnpress' ), | |
| 144 | 144 | 'type' => 'integer', |
| 145 | 145 | 'default' => 1, |
| 146 | 146 | 'sanitize_callback' => 'absint', |
| 147 | 147 | 'validate_callback' => 'rest_validate_request_arg', |
| @@ -147,9 +147,9 @@ | ||
| 147 | 147 | 'validate_callback' => 'rest_validate_request_arg', |
| 148 | 148 | 'minimum' => 1, |
| 149 | 149 | ); |
| 150 | 150 | $params['per_page'] = array( |
| 151 | - 'description' => __( 'Maximum number of items to be returned in result set.', 'learnpress' ), | |
| 151 | + 'description' => __( 'The maximum number of items to be returned in the result set.', 'learnpress' ), | |
| 152 | 152 | 'type' => 'integer', |
| 153 | 153 | 'default' => 10, |
| 154 | 154 | 'minimum' => 1, |
| 155 | 155 | 'maximum' => 100, |
| @@ -156,9 +156,9 @@ | ||
| 156 | 156 | 'sanitize_callback' => 'absint', |
| 157 | 157 | 'validate_callback' => 'rest_validate_request_arg', |
| 158 | 158 | ); |
| 159 | 159 | $params['order'] = array( |
| 160 | - 'description' => __( 'Order sort attribute ascending or descending.', 'learnpress' ), | |
| 160 | + 'description' => __( 'Sorting attributes in ascending or descending order.', 'learnpress' ), | |
| 161 | 161 | 'type' => 'string', |
| 162 | 162 | 'default' => 'asc', |
| 163 | 163 | 'enum' => array( 'asc', 'desc' ), |
| 164 | 164 | 'validate_callback' => 'rest_validate_request_arg', |
| @@ -169,9 +169,9 @@ | ||
| 169 | 169 | 'sanitize_callback' => 'sanitize_text_field', |
| 170 | 170 | 'validate_callback' => 'rest_validate_request_arg', |
| 171 | 171 | ); |
| 172 | 172 | $params['exclude'] = array( |
| 173 | - 'description' => __( 'Ensure result set excludes specific IDs.', 'learnpress' ), | |
| 173 | + 'description' => __( 'Ensure the result set excludes specific IDs.', 'learnpress' ), | |
| 174 | 174 | 'type' => 'array', |
| 175 | 175 | 'items' => array( |
| 176 | 176 | 'type' => 'integer', |
| 177 | 177 | ), |
| @@ -178,9 +178,9 @@ | ||
| 178 | 178 | 'default' => array(), |
| 179 | 179 | 'sanitize_callback' => 'wp_parse_id_list', |
| 180 | 180 | ); |
| 181 | 181 | $params['include'] = array( |
| 182 | - 'description' => __( 'Limit result set to specific ids.', 'learnpress' ), | |
| 182 | + 'description' => __( 'Limit the result set to specific IDs.', 'learnpress' ), | |
| 183 | 183 | 'type' => 'array', |
| 184 | 184 | 'items' => array( |
| 185 | 185 | 'type' => 'integer', |
| 186 | 186 | ), |