Changeset 51964 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- Timestamp:
- 11/01/2021 03:26:06 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php
r51786 r51964 251 251 } 252 252 253 if ( in_array( 'rest_namespace', $fields, true ) ) { 254 $data['rest_namespace'] = $taxonomy->rest_namespace; 255 } 256 253 257 if ( in_array( 'visibility', $fields, true ) ) { 254 258 $data['visibility'] = array( … … 275 279 ), 276 280 'https://api.w.org/items' => array( 277 'href' => rest_url( sprintf( 'wp/v2/%s', $base ) ),281 'href' => rest_url( rest_get_route_for_taxonomy_items( $taxonomy->name ) ), 278 282 ), 279 283 ) … … 311 315 'type' => 'object', 312 316 'properties' => array( 313 'capabilities' => array(317 'capabilities' => array( 314 318 'description' => __( 'All capabilities used by the taxonomy.' ), 315 319 'type' => 'object', … … 317 321 'readonly' => true, 318 322 ), 319 'description' => array(323 'description' => array( 320 324 'description' => __( 'A human-readable description of the taxonomy.' ), 321 325 'type' => 'string', … … 323 327 'readonly' => true, 324 328 ), 325 'hierarchical' => array(329 'hierarchical' => array( 326 330 'description' => __( 'Whether or not the taxonomy should have children.' ), 327 331 'type' => 'boolean', … … 329 333 'readonly' => true, 330 334 ), 331 'labels' => array(335 'labels' => array( 332 336 'description' => __( 'Human-readable labels for the taxonomy for various contexts.' ), 333 337 'type' => 'object', … … 335 339 'readonly' => true, 336 340 ), 337 'name' => array(341 'name' => array( 338 342 'description' => __( 'The title for the taxonomy.' ), 339 343 'type' => 'string', … … 341 345 'readonly' => true, 342 346 ), 343 'slug' => array(347 'slug' => array( 344 348 'description' => __( 'An alphanumeric identifier for the taxonomy.' ), 345 349 'type' => 'string', … … 347 351 'readonly' => true, 348 352 ), 349 'show_cloud' => array(353 'show_cloud' => array( 350 354 'description' => __( 'Whether or not the term cloud should be displayed.' ), 351 355 'type' => 'boolean', … … 353 357 'readonly' => true, 354 358 ), 355 'types' => array(359 'types' => array( 356 360 'description' => __( 'Types associated with the taxonomy.' ), 357 361 'type' => 'array', … … 362 366 'readonly' => true, 363 367 ), 364 'rest_base' => array(368 'rest_base' => array( 365 369 'description' => __( 'REST base route for the taxonomy.' ), 366 370 'type' => 'string', … … 368 372 'readonly' => true, 369 373 ), 370 'visibility' => array( 374 'rest_namespace' => array( 375 'description' => __( 'REST namespace route for the taxonomy.' ), 376 'type' => 'string', 377 'context' => array( 'view', 'edit', 'embed' ), 378 'readonly' => true, 379 ), 380 'visibility' => array( 371 381 'description' => __( 'The visibility settings for the taxonomy.' ), 372 382 'type' => 'object',
Note: See TracChangeset
for help on using the changeset viewer.