szepeviktor / wordpress-website-lifecycle

How to work with WordPress 📅 for long years
https://github.com/stars/szepeviktor/lists/wordpress
The Unlicense
63 stars 7 forks source link

Plugin changelog is not shown without install_plugins cap. #13

Open szepeviktor opened 2 months ago

szepeviktor commented 2 months ago

https://github.com/szepeviktor/wordpress-website-lifecycle/blob/383e73edcab65d04c727edbc036d673508a8d6b5/mu-plugins/_core-disallow-updates.php#L15

@johnbillion Could it be that showing changelog on the Plugins page needs install_plugins cap.?

Link: "View version 3.23.2 details"

Sorry, you are not allowed to access this page.

Is it a core bug?

johnbillion commented 2 months ago

Yes that could well be a bug

szepeviktor commented 2 months ago

Here it is. Even for install_plugins_pre_plugin-information. https://github.com/WordPress/WordPress/blob/afd60dd8a467eb8620b2ce32277b9ce8b6248c15/wp-admin/plugin-install.php#L18-L20

szepeviktor commented 2 months ago

A work-around

document.querySelectorAll(
    "a[href*='/wp-admin/plugin-install.php']"
).forEach(function (anchor) { anchor.outerHTML = anchor.innerHTML; });