Opened 2 years ago
Closed 2 years ago
#17091 closed enhancement (fixed)
Allow mt.getRecentPostTitles to return the post status
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | XML-RPC | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch mobile dev-feedback |
| Cc: | ercoli@…, joseph@… |
Description
Could be useful to have the post status field within the response of mt.getRecentPostTitles.
This XML-RPC call is used especially on mobile clients, but if we want add a visual indicator that shows the post status we should call the metaWeblog.getRecentPosts that is a more expensive call.
Attachments (1)
Change History (8)
daniloercoli
— 2 years ago
comment:1
ericmann
— 2 years ago
- Component changed from General to XML-RPC
- Keywords mobile removed
- Severity changed from normal to minor
comment:2
nacin
— 2 years ago
- Keywords mobile added
- Milestone changed from Awaiting Review to 3.2
Hey Eric, the mobile team is using the mobile keyword to track tickets on report {42}.
comment:4
josephscott
— 2 years ago
- Cc joseph@… added
comment:5
josephscott
— 2 years ago
- Keywords dev-feedback added
I'm fine with this change and tested it, works fine. I'm going to put this on my list of potential XML-RPC tickets for WP 3.2 (which I'll be posting on wpdevel).
comment:6
josephscott
— 2 years ago
I'm going to make one small adjustment to this and call the field 'post_status' instead of 'status' so that it is consistent with other API calls that return the post status.
comment:7
josephscott
— 2 years ago
- Resolution set to fixed
- Status changed from new to closed
My first instinct was to disagree with you because I assumed getRecentPostTitles only retrieved published posts. Looking at the code, it does indeed return drafts as well, so there should be some distinction between the two.
So long as adding a return value doesn't break existing third-party solutions, I see no problem with this. The patch looks sound as well.