mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
REST API: Support password on non-post post types.
The password field was incorrectly only added to "post" post types, but is supported for all post types in the Dashboard UI. Props jnylen0. Fixes #38582. git-svn-id: https://develop.svn.wordpress.org/trunk@39047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -419,6 +419,8 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
'readonly' => true,
|
||||
);
|
||||
|
||||
unset( $schema['properties']['password'] );
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user