Make WordPress Core


Ignore:
Timestamp:
10/31/2016 03:52:08 AM (9 years ago)
Author:
rmccue
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r39046 r39047  
    17481748                    'readonly'    => true,
    17491749                ),
     1750                'password'        => array(
     1751                    'description' => __( 'A password to protect access to the content and excerpt.' ),
     1752                    'type'        => 'string',
     1753                    'context'     => array( 'edit' ),
     1754                ),
    17501755            ),
    17511756        );
     
    19491954                'context'     => array( 'view', 'edit' ),
    19501955            );
    1951 
    1952             $schema['properties']['password'] = array(
    1953                 'description' => __( 'A password to protect access to the content and excerpt.' ),
    1954                 'type'        => 'string',
    1955                 'context'     => array( 'edit' ),
    1956             );
    19571956        }
    19581957
Note: See TracChangeset for help on using the changeset viewer.