[wp-trac] [WordPress Trac] #43992: Prevent activation of a plugin if its required PHP version is too high

WordPress Trac noreply at wordpress.org
Wed Mar 20 04:14:41 UTC 2019


#43992: Prevent activation of a plugin if its required PHP version is too high
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  desrosj
     Type:  task (blessed)                       |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.2
Component:  Plugins                              |     Version:
 Severity:  major                                |  Resolution:
 Keywords:  needs-unit-tests servehappy dev-     |     Focuses:
  feedback has-patch needs-testing 2nd-opinion   |
-------------------------------------------------+-------------------------

Comment (by afragen):

 Replying to [comment:38 desrosj]:
 > For the `unmet_requirements` error, maybe the approach could be:
 > - Add a new function that returns a boolean indicating a plugin can be
 activated.
 > - `validate_plugin_requirements()` returns an array indicating if PHP
 passed, WP passed, and if either fails, a string with the correct
 contextual error message.
 >
 > Something like this could let us have different messages for each
 scenario. Examples: `Plugin does not meet minimum WordPress
 requirements.`, `Plugin does not meet minimum PHP requirements.`, `Plugin
 does not meet minimum WordPress and PHP requirements.`.

 If more granular error messaging is desired I think that's very achievable
 for 5.2.1. I agree that it's likely to require a function that returns the
 correct messaging.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43992#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list