Make WordPress Core

Opened 2 years ago

Closed 2 months ago

#25958 closed enhancement (fixed)

Allow wp.getUsersBlogs to return the primary_blog flag

Reported by: daniloercoli Owned by: wonderboymusic
Milestone: 4.4 Priority: low
Severity: normal Version:
Component: XML-RPC Keywords: has-patch needs-unit-tests 3.9-early
Focuses: Cc:


Would be nice if wp.getUsersBlogs could return the primary blog flag in the response.
For example, when logging with the mobile apps, we can pre-select the primary blog as the default, and give the user a better experience just from the beginning.

Attachments (2)

local_history.patch (1.1 KB) - added by daniloercoli 2 years ago.
25958.patch (1023 bytes) - added by SergeyBiryukov 2 years ago.
Some cleanup

Download all attachments as: .zip

Change History (9)

#1 @markoheijnen
2 years ago

  • Milestone changed from Awaiting Review to 3.8

Patch looks fine. Moved to 3.8 for consideration.

2 years ago

Some cleanup

#2 @SergeyBiryukov
2 years ago

  • Keywords commit added

#3 @westi
2 years ago

  • Keywords needs-unit-tests added; commit removed

Lets have some Unit Tests for wp.getUsersBlogs

#4 @markoheijnen
2 years ago

  • Owner set to markoheijnen
  • Status changed from new to assigned

I'm assigning this one to myself and working on it tomorrow. In case someone beats me before it I will check the patch

#5 @nacin
2 years ago

  • Keywords 3.9-early added
  • Milestone changed from 3.8 to Future Release

I wasn't actually aware that primary_blog was still a thing. I thought we ditched it when we got rid of the dashboard blog.

#6 @wonderboymusic
2 months ago

  • Keywords mobile removed
  • Milestone changed from Future Release to 4.4
  • Owner changed from markoheijnen to wonderboymusic

#7 @wonderboymusic
2 months ago

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

In 34574:

XML-RPC: In wp_xmlrpc_server::wp_getUsersBlogs(), return the isPrimary flag for each blog.

Props SergeyBiryukov, daniloercoli.
Fixes #25958.

Note: See TracTickets for help on using tickets.