Changeset 39342 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
- Timestamp:
- 11/23/2016 02:42:00 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
r39313 r39342 120 120 121 121 if ( empty( $obj ) ) { 122 return new WP_Error( 'rest_type_invalid', __( 'Invalid resource.' ), array( 'status' => 404 ) );122 return new WP_Error( 'rest_type_invalid', __( 'Invalid post type.' ), array( 'status' => 404 ) ); 123 123 } 124 124 125 125 if ( empty( $obj->show_in_rest ) ) { 126 return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view resource.' ), array( 'status' => rest_authorization_required_code() ) );126 return new WP_Error( 'rest_cannot_read_type', __( 'Cannot view post type.' ), array( 'status' => rest_authorization_required_code() ) ); 127 127 } 128 128 … … 205 205 'properties' => array( 206 206 'capabilities' => array( 207 'description' => __( 'All capabilities used by the resource.' ),207 'description' => __( 'All capabilities used by the post type.' ), 208 208 'type' => 'object', 209 209 'context' => array( 'edit' ), … … 211 211 ), 212 212 'description' => array( 213 'description' => __( 'A human-readable description of the resource.' ),213 'description' => __( 'A human-readable description of the post type.' ), 214 214 'type' => 'string', 215 215 'context' => array( 'view', 'edit' ), … … 217 217 ), 218 218 'hierarchical' => array( 219 'description' => __( 'Whether or not the resource should have children.' ),219 'description' => __( 'Whether or not the post type should have children.' ), 220 220 'type' => 'boolean', 221 221 'context' => array( 'view', 'edit' ), … … 223 223 ), 224 224 'labels' => array( 225 'description' => __( 'Human-readable labels for the resource for various contexts.' ),225 'description' => __( 'Human-readable labels for the post type for various contexts.' ), 226 226 'type' => 'object', 227 227 'context' => array( 'edit' ), … … 229 229 ), 230 230 'name' => array( 231 'description' => __( 'The title for the resource.' ),231 'description' => __( 'The title for the post type.' ), 232 232 'type' => 'string', 233 233 'context' => array( 'view', 'edit', 'embed' ), … … 235 235 ), 236 236 'slug' => array( 237 'description' => __( 'An alphanumeric identifier for the resource.' ),237 'description' => __( 'An alphanumeric identifier for the post type.' ), 238 238 'type' => 'string', 239 239 'context' => array( 'view', 'edit', 'embed' ), … … 241 241 ), 242 242 'taxonomies' => array( 243 'description' => __( 'Taxonomies associated with resource.' ),243 'description' => __( 'Taxonomies associated with post type.' ), 244 244 'type' => 'array', 245 245 'items' => array( … … 250 250 ), 251 251 'rest_base' => array( 252 'description' => __( 'REST base route for the resource.' ),252 'description' => __( 'REST base route for the post type.' ), 253 253 'type' => 'string', 254 254 'context' => array( 'view', 'edit', 'embed' ),
Note: See TracChangeset
for help on using the changeset viewer.