WordPress.org

Making WordPress.org

Opened 5 weeks ago

Closed 6 days ago

Last modified 5 days ago

#4514 closed enhancement (fixed)

Add support for 'Requires at least' and 'Requires PHP' headers in the main plugin file

Reported by: SergeyBiryukov Owned by: dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description (last modified by SergeyBiryukov)

Background: #2952 added support for Requires PHP plugin header.

At the time, it made sense to have it defined in the same place as Requires at least, which only exists in readme.txt.

Per discussion with @Otto42 in #WP46938, a decision was made for WP core to read both Requires at least and Requires PHP headers from the plugin's main PHP file as well, and give precedence to those instead of the ones from the readme.txt file.

For consistency, Plugin Directory should do the same.

Change History (3)

#1 @SergeyBiryukov
5 weeks ago

  • Description modified (diff)

#2 @dd32
6 days ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 9050:

Plugin Directory: Preference the Requires PHP and Requires at least headers defined in the Plugins .php header over the readme.txt values.

This also moves the missing fields in the readme.txt to being notes rather than warnings in the readme validator.

This matches the behaviour in WordPress 5.3, see #WP46938.
Fixes #4514.

#3 @dingo_d
5 days ago

Since we kinda want to have the same functionality in themes, how does this affect the themes development?

Should we make a new rule about this in the theme review handbook and themes development handbook to include this in the readme/functions.php file of the theme?

Note: See TracTickets for help on using tickets.