Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#44592 closed enhancement (fixed)

Add support for required WP and PHP versions to themes

Reported by: flixos90 Owned by: SergeyBiryukov
Priority: normal Milestone: 5.4
Component: Site Health Version:
Severity: normal Keywords: has-patch servehappy early commit has-dev-note
Cc: Focuses:

Description

As a follow-up to #40934 and accompanying the related meta ticket https://meta.trac.wordpress.org/ticket/3718, themes should be allowed to specify minimum required WordPress / PHP versions.

The scope of this ticket is solely to add support for these two headers to WP_Theme, so that they are parsed correctly. Catching unmet version requirements and preventing theme installations/updates/activations should be part of separate follow-up tickets.

This ticket needs to be tackled in alignment with the above meta ticket, in terms of which names to use for the two new headers.

Attachments (2)

44592.diff (656 bytes ) - added by flixos90 8 years ago.
44592.2.patch (665 bytes ) - added by afragen 7 years ago.
Change to Requires at least

Download all attachments as: .zip

Change History (20)

@flixos90
8 years ago

#1 @flixos90
8 years ago

  • Keywords has-patch added; needs-patch removed

44592.diff adds support for a Requires header (for required WP version) and a Requires PHP header (for required PHP version) to WP_Theme. While we could go with Requires WP, I thought it would make sense to align the names with the names of the plugin headers, so people can remember them easily for both plugins and themes.

Going forward though, let's have the discussion on header names in the meta ticket https://meta.trac.wordpress.org/ticket/3718, and adjust the patch here accordingly as necessary.

This ticket was mentioned in Slack in #core-php by flixos90. View the logs.


8 years ago

This ticket was mentioned in Slack in #core-php by schlessera. View the logs.


8 years ago

#4 @pento
8 years ago

  • Milestone 4.9.9WordPress.org

#5 @afragen
7 years ago

  • Keywords servehappy added

#7 @afragen
7 years ago

I think we should use Requires WP as it is more descriptive and aligns well with Requires PHP.

#8 @afragen
7 years ago

Looks like we should be using Requires at least as that is what was committed in #45546

Version 0, edited 7 years ago by afragen (next)

#9 @spacedmonkey
7 years ago

  • Component ThemesSite Health

@afragen
7 years ago

Change to Requires at least

#10 @afragen
7 years ago

  • Keywords early added
  • Milestone WordPress.org5.4

Patch updated to use Requires at least.

I'm working on testing themes for WordPress and PHP compatibility. Early commit of this ticket is going to be needed or it will end up being in subsequent patches.

This ticket was mentioned in Slack in #core-site-health by afragen. View the logs.


7 years ago

#12 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Status newreviewing

#13 @afragen
7 years ago

  • Keywords commit added

This ticket was mentioned in Slack in #core-site-health by afragen. View the logs.


7 years ago

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


6 years ago

#16 @audrasjb
6 years ago

  • Keywords needs-dev-note added

#17 @SergeyBiryukov
6 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 47145:

Site Health: Add support for required WordPress and PHP versions to themes.

Follow-up to [45546] for plugins.

Props flixos90, afragen.
Fixes #44592. See #40934, #meta3718.

#18 @audrasjb
6 years ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.