diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 52c84e15a6..2749b12d22 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -419,6 +419,8 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller { 'readonly' => true, ); + unset( $schema['properties']['password'] ); + return $schema; } diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 49d030bad7..b36ba66654 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -1747,6 +1747,11 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, ), + 'password' => array( + 'description' => __( 'A password to protect access to the content and excerpt.' ), + 'type' => 'string', + 'context' => array( 'edit' ), + ), ), ); @@ -1948,12 +1953,6 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { 'type' => 'boolean', 'context' => array( 'view', 'edit' ), ); - - $schema['properties']['password'] = array( - 'description' => __( 'A password to protect access to the content and excerpt.' ), - 'type' => 'string', - 'context' => array( 'edit' ), - ); } if ( 'page' === $this->post_type ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 6fa2803807..b88dadb97f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39046'; +$wp_version = '4.7-beta1-39047'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.