Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

/wp/statuses is missing trash for logged-in user context #1040

@danielbachhuber

Description

@danielbachhuber

Our logic is based of the internal attribute, which trash is marked true: 66e015f

v1 has this logic, which also fails for our needs: https://github.com/WP-API/WP-API/blob/master/lib/class-wp-json-posts.php#L473

local ➜  ~  http wordpress-develop.dev/wp-json/wp/statuses --auth=daniel:daniel
HTTP/1.1 200 OK
Allow: GET
Cache-Control: no-cache, must-revalidate, max-age=0
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Date: Fri, 03 Apr 2015 16:03:14 GMT
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Pragma: no-cache
Server: nginx/1.4.6 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Pingback: http://wordpress-develop.dev/xmlrpc.php
X-Powered-By: PHP/5.5.9-1ubuntu4.3

[
    {
        "name": "Published",
        "private": false,
        "protected": false,
        "public": true,
        "queryable": true,
        "show_in_list": true,
        "slug": "publish"
    },
    {
        "name": "Scheduled",
        "private": false,
        "protected": true,
        "public": false,
        "queryable": false,
        "show_in_list": true,
        "slug": "future"
    },
    {
        "name": "Draft",
        "private": false,
        "protected": true,
        "public": false,
        "queryable": false,
        "show_in_list": true,
        "slug": "draft"
    },
    {
        "name": "Pending",
        "private": false,
        "protected": true,
        "public": false,
        "queryable": false,
        "show_in_list": true,
        "slug": "pending"
    },
    {
        "name": "Private",
        "private": true,
        "protected": false,
        "public": false,
        "queryable": false,
        "show_in_list": true,
        "slug": "private"
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions