WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 4 weeks ago

Last modified 3 weeks ago

#43650 closed enhancement (fixed)

Add Requires PHP Version to Plugin - View Details

Reported by: xkon Owned by: SergeyBiryukov
Milestone: 4.9.6 Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch has-screenshots commit fixed-major servehappy
Focuses: administration Cc:

Description

It came to my attention today after making some plugin updates that when clicking on the View Details of a Plugin I couldn't find the Requires PHP that was added on Meta.

I'm sure that it'll be handy to more people to be able to easily check PHP requirements within the popup as well before hitting the update button :].

--

I searched around trac just in case there was another ticket for this, but to no avail, sorry if this is a duplicate.

Attachments (3)

43650.jpg (53.4 KB) - added by xkon 2 months ago.
preview
43650.diff (812 bytes) - added by xkon 2 months ago.
43650.2.diff (1.0 KB) - added by flixos90 4 weeks ago.

Download all attachments as: .zip

Change History (17)

@xkon
2 months ago

preview

@xkon
2 months ago

#1 @xkon
2 months ago

  • Keywords has-patch has-screenshots 2nd-opinion added

43650.diff checks if there's a requires_php and adds it to the list as seen on 43650.jpg

#2 @audrasjb
2 months ago

  • Milestone changed from Awaiting Review to 4.9.6

#3 @ocean90
2 months ago

  • Keywords 2nd-opinion removed

Related: #40934, see also the screenshots starting at ticket:40934:27.

#4 @Luciano Croce
6 weeks ago

I love this enhancement!

#5 @desrosj
5 weeks ago

  • Keywords commit added

This looks good to me. I think this can go in before the other UI elements in #40934 because it is purely informational.

#6 @desrosj
5 weeks ago

  • Owner set to flixos90
  • Status changed from new to reviewing

@flixos90
4 weeks ago

#7 @flixos90
4 weeks ago

I just did a quick review. The patch looks good, 43650.2.diff addresses some minor issues. Since the same translation string was already present before (for the WordPress version), I updated the translator comment to be the same for both occurrences (it's simply about the placeholder being a version number).

#8 @flixos90
4 weeks ago

  • Component changed from General to Plugins

#9 @flixos90
4 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 42998:

Plugins: Show the required PHP version in the plugin details view, if specified.

Props xkon.
Fixes #43650.

#10 @flixos90
4 weeks ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

This still needs to be backported to 4.9.6.

#11 @flixos90
4 weeks ago

  • Keywords servehappy added

#12 @flixos90
4 weeks ago

  • Owner changed from flixos90 to SergeyBiryukov
  • Status changed from reopened to assigned

#13 @SergeyBiryukov
4 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43029:

Plugins: Show the required PHP version in the plugin details view, if specified.

Props xkon.
Merges [42998] to the 4.9 branch.
Fixes #43650.

#14 @mnelson4
3 weeks ago

Smart feature @xkon! Wouldn’t the string be more translatable if it used a placeholder instead of assuming all languages want the number to come to the right of the string?

Eg instead of

_e( 'Requires PHP Version:' ); ... printf( __( '%s or higher' ), $api->requires_php );

we should have printf( __( 'Requires PHP Version %s or higher' ), $api->requires_php );

I would think this would he more friendly to right-to-left languages, no? But that will of course add a new string to be translated, and maybe that’s not an option...

Note: See TracTickets for help on using tickets.