Skip to content

Add the Update URI header - #113

Merged
dnnsjsk merged 1 commit into
inline0:7.7.2from
Contributolo:fix/update-uri
Oct 15, 2026
Merged

dnnsjsk merged 1 commit into
inline0:7.7.2from
Contributolo:fix/update-uri

Conversation

@Contributolo

Copy link
Copy Markdown
Collaborator

Blockstudio is not hosted on WordPress.org, and the slug blockstudio is still free there (the plugin API answers Plugin not found). WordPress sends every installed plugin to the WordPress.org update check by its slug, so if someone registered a plugin named blockstudio there, WordPress would offer it as an update to every site running Blockstudio.

WordPress 5.8 added the Update URI header for exactly this: "If the value of this new field matches any URI other than https://wordpress.org/plugins/{$slug}/ or w.org/plugin/{$slug}, WordPress will not attempt to update it." This PR adds

Update URI: https://blockstudio.dev

I used the product domain because the dev note asks for a URI with a unique hostname. https://github.com/inline0/blockstudio would work too, but its hostname is shared with every other GitHub-hosted plugin.

Updates from GitHub are not affected: the Plugin Update Checker adds its update in the site_transient_update_plugins filter, independent of the WordPress.org request, and nothing hooks update_plugins_blockstudio.dev. Checked in a fresh WordPress (Playground, WordPress latest, PHP 8.4) with this branch installed as 7.7.0: get_plugin_data() returns the header, and after an update check the update transient offers 7.7.1 with the blockstudio.zip asset of the GitHub release. Must-use and Composer installs do not read plugin headers, so nothing changes there.

Blockstudio is not on WordPress.org and the slug blockstudio is free
there. Without the header, a plugin registered under that slug would be
offered as an update to every site running Blockstudio. With an Update
URI that does not point to WordPress.org, WordPress no longer asks
WordPress.org about this plugin. Updates keep coming from the GitHub
releases through the Plugin Update Checker, which adds them to the
update transient itself.
@dnnsjsk
dnnsjsk changed the base branch from main to 7.7.2 October 15, 2026 11:07
@dnnsjsk
dnnsjsk merged commit 6902dfd into inline0:7.7.2 Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants