WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#17091 closed enhancement (fixed)

Allow mt.getRecentPostTitles to return the post status

Reported by: daniloercoli Owned by:
Milestone: 3.2 Priority: normal
Severity: minor Version: 3.1
Component: XML-RPC Keywords: has-patch mobile dev-feedback
Focuses: Cc:

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)

17091.diff (477 bytes) - added by daniloercoli 3 years ago.

Download all attachments as: .zip

Change History (8)

daniloercoli3 years ago

comment:1 ericmann3 years ago

  • Component changed from General to XML-RPC
  • Keywords mobile removed
  • Severity changed from normal to minor

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.

comment:2 nacin3 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 josephscott3 years ago

  • Cc joseph@… added

comment:5 josephscott3 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 josephscott3 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 josephscott3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [17649]) Include the post status in the response for mt.getRecentPostTitles calls

Fixes #17091 props daniloercoli

Note: See TracTickets for help on using tickets.