[wp-trac] [WordPress Trac] #43992: Prevent activation of a plugin if its required PHP version is too high
WordPress Trac
noreply at wordpress.org
Fri Jan 25 23:03:32 UTC 2019
#43992: Prevent activation of a plugin if its required PHP version is too high
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.2
Component: Plugins | Version:
Severity: major | Resolution:
Keywords: needs-unit-tests servehappy dev- | Focuses:
feedback has-patch needs-testing |
-------------------------------------------------+-------------------------
Comment (by afragen):
Replying to [comment:22 joyously]:
> > `get_file_data()` will not correctly parse a readme.txt file.
>
> I bet it will, and it would be better than adding a lot of extra code.
It takes parameters for the file to use and the headers to look for.
What's the big deal? The format is the same. Did you try it?
>
> But I notice that this diff adds those headers to the defaults in
`get_plugin_data()`, so are they just in the readme or in the plugin file
also?
The overwhelming majority of plugins in dot org do not contain the added
`Requires WP` and/or `Requires PHP` headers, but they all contain a
`readme.txt`.
In fact, these were added to this patch as a method for plugins that are
not hosted in dot org to be compliant and not necessarily require a valid
`readme.txt` file.
As an example, a readme header of `Requires` or `Requires at least`, which
are the excepted readme headers, will not parse correctly from
`get_plugin_data` and will not return results.
Please submit a patch based on your idea. I'm happy to test it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43992#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list