Skip to content

Support site settings writes through Core REST - #25865

Open
crazytonyli wants to merge 6 commits into
trunkfrom
task/core-rest-site-settings-write
Open

Support site settings writes through Core REST#25865
crazytonyli wants to merge 6 commits into
trunkfrom
task/core-rest-site-settings-write

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Note

I recommend reviewing this PR commit by commit.

Description

Application-password sites use BlogServiceRemoteCoreREST, but BlogService.updateSettingsForBlog only dispatches WP.com REST and XML-RPC. Saving a setting therefore sends no request and invokes neither callback, leaving loading indicators
active.

One big refactor in this PR is that callers now pass a BlogSettingsChanges containing only the values changed by the user. Previously, BlogService built a full settings snapshot from Core Data for every save, which could overwrite
unrelated settings. Writes are also serialized because UI controls can trigger multiple saves quickly.

The other main changes are:

  1. BlogService.updateSettings writes supported fields through /wp/v2/settings and completes with exactly one callback for WP.com REST, Core REST, XML-RPC, and unavailable transports.
  2. Core REST maps the site icon in both directions, and WordPressClient.updateSiteSettings replaces the cached settings after a save. The site-icon flow also updates the header without waiting for syncBlog, which has no Core REST path.

Testing instructions

On a self-hosted application-password site:

  1. Change the Site Title and Tagline. Verify the loading indicator stops and the values persist after reopening Site Settings.
  2. Rapidly toggle settings under Sharing and Discussion. Verify the latest values persist.
  3. Update and remove the site icon. Verify the header refreshes and its loading indicator stops.
  4. Regression-test settings saves on WP.com and XML-RPC sites.

@crazytonyli crazytonyli added this to the 27.2 milestone Aug 4, 2026
@crazytonyli
crazytonyli requested a review from jkmassel August 4, 2026 09:32
@dangermattic

Copy link
Copy Markdown
Collaborator
2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number33591
VersionPR #25865
Bundle IDorg.wordpress.alpha
Commit4a4b15b
Installation URL31mgp3ipvcd50
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number33591
VersionPR #25865
Bundle IDcom.jetpack.alpha
Commit4a4b15b
Installation URL32i4gvjar6h9g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants