[wp-trac] [WordPress Trac] #24271: Facilitate PHP versions in themes and plugins

WordPress Trac noreply at wordpress.org
Mon May 6 15:19:33 UTC 2013


#24271: Facilitate PHP versions in themes and plugins
-------------------------+-----------------------------
 Reporter:  ryanve       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 I want to propose a future-proof mechanism for **safely** allowing PHP
 5.3+ in themes and plugins:

 {{{
 /**
  * Theme Name: example
  * Minimum PHP version: 5.3.0
  * ...
  */
 }}}

 Minimum version info could be used on the theme installation page to
 prevent 5.2- users from installing 5.3+ themes. The "Activate" link could
 be subdued or replaced with a link to inform the user that the theme needs
 a higher PHP version. Unspecified minimums would default to the
 [http://wordpress.org/about/requirements/ WP requirement].

 I initiated this discussion in the [http://lists.wordpress.org/ theme-
 reviewers] list. Primary feedback there was to prevent breakage via
 graceful degradation or otherwise. The mechanism above is viable.
 [https://github.com/ryanve/action/blob/05795b0771382381786da875d36bd65598b247e7/functions.php
 Interim solutions are possible] but less seamless.

 Encouraging 5.3+ helps expedite [http://wordpress.org/about/stats/ user
 transition to 5.3+] and thus helps the core too.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24271>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list