- Timestamp:
- 11/03/2016 02:17:39 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r39101 r39105 1115 1115 'format' => 'ipv4', 1116 1116 'context' => array( 'edit' ), 1117 'arg_options' => array( 1118 'default' => '127.0.0.1', 1119 ), 1117 'default' => '127.0.0.1', 1120 1118 ), 1121 1119 'author_name' => array( … … 1189 1187 'type' => 'integer', 1190 1188 'context' => array( 'view', 'edit', 'embed' ), 1191 'arg_options' => array( 1192 'default' => 0, 1193 ), 1189 'default' => 0, 1194 1190 ), 1195 1191 'post' => array( … … 1197 1193 'type' => 'integer', 1198 1194 'context' => array( 'view', 'edit' ), 1199 'arg_options' => array( 1200 'default' => 0, 1201 ), 1195 'default' => 0, 1202 1196 ), 1203 1197 'status' => array( … … 1265 1259 'type' => 'string', 1266 1260 'format' => 'date-time', 1267 'validate_callback' => 'rest_validate_request_arg',1268 1261 ); 1269 1262 1270 1263 $query_params['author'] = array( 1271 1264 'description' => __( 'Limit result set to comments assigned to specific user ids. Requires authorization.' ), 1272 'sanitize_callback' => 'wp_parse_id_list',1273 1265 'type' => 'array', 1266 'items' => array( 1267 'type' => 'integer', 1268 ), 1274 1269 ); 1275 1270 1276 1271 $query_params['author_exclude'] = array( 1277 1272 'description' => __( 'Ensure result set excludes comments assigned to specific user ids. Requires authorization.' ), 1278 'sanitize_callback' => 'wp_parse_id_list',1279 1273 'type' => 'array', 1274 'items' => array( 1275 'type' => 'integer', 1276 ), 1280 1277 ); 1281 1278 … … 1284 1281 'description' => __( 'Limit result set to that from a specific author email. Requires authorization.' ), 1285 1282 'format' => 'email', 1286 'sanitize_callback' => 'sanitize_email',1287 1283 'type' => 'string', 1288 1284 ); … … 1292 1288 'type' => 'string', 1293 1289 'format' => 'date-time', 1294 'validate_callback' => 'rest_validate_request_arg',1295 1290 ); 1296 1291 … … 1298 1293 'description' => __( 'Ensure result set excludes specific ids.' ), 1299 1294 'type' => 'array', 1295 'items' => array( 1296 'type' => 'integer', 1297 ), 1300 1298 'default' => array(), 1301 'sanitize_callback' => 'wp_parse_id_list',1302 1299 ); 1303 1300 … … 1305 1302 'description' => __( 'Limit result set to specific ids.' ), 1306 1303 'type' => 'array', 1304 'items' => array( 1305 'type' => 'integer', 1306 ), 1307 1307 'default' => array(), 1308 'sanitize_callback' => 'wp_parse_id_list',1309 1308 ); 1310 1309 … … 1312 1311 'default' => null, 1313 1312 'description' => __( 'Limit result set to that of a particular comment karma. Requires authorization.' ), 1314 'sanitize_callback' => 'absint',1315 1313 'type' => 'integer', 1316 'validate_callback' => 'rest_validate_request_arg',1317 1314 ); 1318 1315 … … 1320 1317 'description' => __( 'Offset the result set by a specific number of comments.' ), 1321 1318 'type' => 'integer', 1322 'sanitize_callback' => 'absint',1323 'validate_callback' => 'rest_validate_request_arg',1324 1319 ); 1325 1320 … … 1327 1322 'description' => __( 'Order sort attribute ascending or descending.' ), 1328 1323 'type' => 'string', 1329 'sanitize_callback' => 'sanitize_key',1330 'validate_callback' => 'rest_validate_request_arg',1331 1324 'default' => 'desc', 1332 1325 'enum' => array( … … 1339 1332 'description' => __( 'Sort collection by object attribute.' ), 1340 1333 'type' => 'string', 1341 'sanitize_callback' => 'sanitize_key',1342 'validate_callback' => 'rest_validate_request_arg',1343 1334 'default' => 'date_gmt', 1344 1335 'enum' => array( … … 1356 1347 'default' => array(), 1357 1348 'description' => __( 'Limit result set to resources of specific parent ids.' ), 1358 'sanitize_callback' => 'wp_parse_id_list',1359 1349 'type' => 'array', 1350 'items' => array( 1351 'type' => 'integer', 1352 ), 1360 1353 ); 1361 1354 … … 1363 1356 'default' => array(), 1364 1357 'description' => __( 'Ensure result set excludes specific parent ids.' ), 1365 'sanitize_callback' => 'wp_parse_id_list',1366 1358 'type' => 'array', 1359 'items' => array( 1360 'type' => 'integer', 1361 ), 1367 1362 ); 1368 1363 … … 1371 1366 'description' => __( 'Limit result set to resources assigned to specific post ids.' ), 1372 1367 'type' => 'array', 1373 'sanitize_callback' => 'wp_parse_id_list', 1368 'items' => array( 1369 'type' => 'integer', 1370 ), 1374 1371 ); 1375 1372
Note: See TracChangeset
for help on using the changeset viewer.