[wp-trac] [WordPress Trac] #46065: Add possibility to set a higher recommended php version for the "Update PHP notice"

WordPress Trac noreply at wordpress.org
Mon Mar 4 20:20:28 UTC 2019


#46065: Add possibility to set a higher recommended php version for the "Update PHP
notice"
----------------------------------+-----------------------
 Reporter:  j-falk                |       Owner:  flixos90
     Type:  enhancement           |      Status:  assigned
 Priority:  normal                |   Milestone:  5.1.1
Component:  General               |     Version:  5.1
 Severity:  normal                |  Resolution:
 Keywords:  servehappy has-patch  |     Focuses:
----------------------------------+-----------------------

Comment (by j-falk):

 For me as well.

 I tested it with the with 46065.diff applied on an environment using php
 7.0 and adding the following add_filter and function eg in functions.php:

 {{{#!php
 <?php
 add_filter('wp_is_php_version_acceptable',
 'custom_acceptable_php_version_func', 10, 2);

 function custom_acceptable_php_version_func ( $is_php_version_acceptable ,
 $version ) {

         if (version_compare($version, '7.3.0', '<')) {
                 $is_php_version_acceptable = false;
         }

         return $is_php_version_acceptable;
 }
 }}}

 The update php update box shows then on the dashboard as expected.

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


More information about the wp-trac mailing list