[wp-trac] [WordPress Trac] #13780: Twenty Thirteen: WordPress Version Requirement Support

WordPress Trac noreply at wordpress.org
Mon Mar 18 11:54:21 UTC 2013


#13780: Twenty Thirteen: WordPress Version Requirement Support
--------------------------------------+-------------------
 Reporter:  kretzschmar               |       Owner:  ryan
     Type:  feature request           |      Status:  new
 Priority:  high                      |   Milestone:  3.6
Component:  WordPress.org site        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  twentythirteen has-patch  |
--------------------------------------+-------------------
Changes (by pdclark):

 * keywords:  needs-patch twentythirteen => twentythirteen has-patch


Comment:

 Uploaded patches for all the cases I could think of.

 [http://core.trac.wordpress.org/attachment/ticket/13780/13780-check-theme-
 version-on-upload.diff 13780-check-theme-version-on-upload.diff​] checks
 theme's minimum required WordPress version not just on upload, but
 ''also'' when a theme is being installed from
 [https://github.com/WordPress/WordPress/blob/master/wp-
 admin/includes/theme.php#L273 themes_api()]. Because of this,
 [http://core.trac.wordpress.org/attachment/ticket/13780/13780-check-theme-
 version-from-api.diff 13780-check-theme-version-from-api.diff] isn't
 really necessary unless modifying the remote API is worth saving a small
 bit of bandwidth.

 [http://core.trac.wordpress.org/attachment/ticket/13780/13780-check-theme-
 version-on-activate.diff 13780-check-theme-version-on-activate.diff​]
 covers cases where a user might have uploaded a theme over FTP – it does a
 check during [https://github.com/WordPress/WordPress/blob/master/wp-
 includes/theme.php#L663 switch_theme()], which should catch when clicking
 "Activate" or doing a theme preview.

 Some things to consider:

 * I used "Requires at least" as the plugin head key to match wordpress.org
 plugin syntax for readme.txt. If matching theme head / plugin head to
 readme.txt isn't necessary, then "Requires" is worth considering.
 * The WP_Error IDs being passed currently match their context --
 `incompatible_archive` and `themes_api_failed`. A more specific error,
 like `requirement_not_met` might be appropriate
 * API revision isn't necessary when
 [http://core.trac.wordpress.org/attachment/ticket/13780/13780-check-theme-
 version-on-upload.diff Theme_Upgrader is patched].

 Items I didn't address:

 * Hiding incompatible themes outright in API search. It seems like a flag
 or warning might be more appropriate.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13780#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list