wordpress-website-lifecycle icon indicating copy to clipboard operation
wordpress-website-lifecycle copied to clipboard

Plugin changelog is not shown without install_plugins cap.

Open szepeviktor opened this issue 1 year ago • 3 comments

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?

szepeviktor avatar Jul 23 '24 19:07 szepeviktor

Yes that could well be a bug

johnbillion avatar Jul 23 '24 20:07 johnbillion

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 avatar Jul 23 '24 23:07 szepeviktor

A work-around

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

szepeviktor avatar Jul 23 '24 23:07 szepeviktor