[wp-trac] [WordPress Trac] #28574: 'Requires at Least' - New File Header Name for Plugin & Theme Compatibility Checks

WordPress Trac noreply at wordpress.org
Wed Jun 18 14:37:06 UTC 2014


#28574: 'Requires at Least' - New File Header Name for Plugin & Theme Compatibility
Checks
----------------------------+-----------------------------
 Reporter:  Kopepasah       |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Currently plugins have the ability to add 'Requires at Least' in the its
 `readme.txt` file header in order to show on its plugin page the least
 version of WordPress required to use the plugin.

 I am recommending that this name (or something similar) be added as an
 optional item to the file headers of the main files for plugins and
 themes. This addition will add compatibility checks that WordPress can
 handle to prevent users from activating plugins and themes that are not
 compatible with their current version of WordPress.

 Both of the two latest core themes (Twenty Thirteen & Twenty Fourteen)
 implement their own compatibility checks, along with many other plugins
 and themes (including my own). It would be much more efficient for core to
 handle this and plugin and theme developers to add a simple 'name' in its
 file header to check for compatibility.

 == Benefits ==

 * One set of code for compatibility checks for plugins and themes, handled
 by core.
 * Plugins & Themes can easily use this compatibility check.
 * Compatibility checks can happen before the theme or plugin are activated
 to prevent activation of incompatible software.
 * Users have a new reason to keep WordPress updated.

 ----

 == Potential UI ==

 A UI that shows different availabilities for compatible and incompatible
 themes and plugins.

 '''Themes'''

 When you install a broken theme, a small notice appears at the bottom
 stating that the theme is installed, but broken.

 [[Image(http://cld.koopsah.com/image/3X0u3S0H4103/broken-themes.jpg)]]

 Something similar could be implemented for themes that shows that an
 incompatible theme is installed and an update to WordPress is required.

 [[Image(http://cld.koopsah.com/image/3f182O133R1Z/incompatible-
 themes.jpg)]]

 '''Plugins'''

 I imagined something that prevents Activating or Updating the plugin
 unless the current WordPress version is compatible. Perhaps even a new tab
 that lists only 'Incompatible' plugins.

 [[Image(http://cld.koopsah.com/image/0z2b3z320v3u/incompatible-
 plugins.jpg)]]

 ----

 == Potential Issue ==

 '''Updates'''

 Handling updates is probably the biggest challenge I can imagine, as we
 would not want users to have the ability to update a plugin or theme that
 is incompatible with their current version of WordPress.

 ''Scenario''
 A developer updates a plugin or theme, adds some cool new features and
 changes the 'Requires at Least' meta information. This update prompts the
 users to update the plugin or theme on their dashboard; however, this
 particular user is running an incompatible version of WordPress.

 Obviously we cannot update the plugin or theme, as doing so would cause
 the users site to potentially change unexpectedly (e.g. the theme or
 plugin is deactivated).

 My recommendation for this scenario is to notify the user that this update
 would also require an update to core, then prompt the user to update both
 core and the plugin or theme.

 ----

 Overall I think the benefits will be great by adding these compatibility
 checks for plugins and themes. However, I could be missing something.

 What do you all think?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28574>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list