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

WordPress Trac noreply at wordpress.org
Thu Mar 21 18:44:57 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:  high                                 |   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 SergeyBiryukov):

 * I'd like to see specific error messages for not meeting minimum WP
 version requirement vs. PHP version, rather then "WordPress and/or PHP".
 `validate_plugin_requirements()` could return `WP_Error` on error, I agree
 with @TimothyBlynJacobs in comment:33 here. That can probably be adjusted
 after beta though.
 * Introducing `wp_is_*_compatible()` wrappers doesn't seem to bring a huge
 benefit at a glance, as there are only two or three of these checks in
 core. Maybe it will be easier to see once the other instances are updated
 to use the wrappers. I agree they should be prefixed with `wp_`, just in
 case.

 Looks good otherwise.

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


More information about the wp-trac mailing list