WordPress 4.7.2
[autoinstalls/wordpress.git] / wp-includes / rest-api / endpoints / class-wp-rest-post-types-controller.php
index a1437dd597d8eb25844a5d9580d349fa6d16b7b0..45ef15520a852e14975d6b4fce61f6ee7a95672a 100644 (file)
@@ -48,6 +48,12 @@ class WP_REST_Post_Types_Controller extends WP_REST_Controller {
                ) );
 
                register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<type>[\w-]+)', array(
+                       'args' => array(
+                               'type' => array(
+                                       'description' => __( 'An alphanumeric identifier for the post type.' ),
+                                       'type'        => 'string',
+                               ),
+                       ),
                        array(
                                'methods'  => WP_REST_Server::READABLE,
                                'callback' => array( $this, 'get_item' ),