Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#49334 closed enhancement (fixed)

[Theme compatibility] WP/PHP compatibility testing for theme activation

Reported by: afragen's profile afragen Owned by:
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-patch early has-screenshots has-dev-note
Focuses: administration Cc:

Description (last modified by afragen)

See #48491 and #48507

WP/PHP compatibility testing for theme activation is the last remaining piece.

Protects from themes that are manually installed like custom or premium themes.

Tries to follow how plugin activation is tested.

Attachments (4)

49334.diff (2.9 KB) - added by afragen 5 years ago.
compatibility testing for theme activation
theme-activation-php-version.gif (1.2 MB) - added by audrasjb 4 years ago.
Testing PHP version requirement
theme-activation-wordpress-version.gif (717.7 KB) - added by audrasjb 4 years ago.
Testing WP version requirement
49334.1.diff (2.8 KB) - added by audrasjb 4 years ago.
Alternative patch: remove <strong>Errors:</strong> from wp_die() as users already know we have an error.

Download all attachments as: .zip

Change History (20)

#1 @afragen
5 years ago

  • Component changed from Upgrade/Install to Site Health

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


5 years ago

#3 @afragen
5 years ago

Pinging @pento as the Upgrade/Install maintainer.

I'm having trouble getting into the data element in the script tag so that I can make the compatibility tests. Any pointers would be appreciated. Thanks.

#4 @afragen
5 years ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Summary changed from [Theme compatibility] WP/PHP compatibility testing for theme installation to [Theme compatibility] WP/PHP compatibility testing for theme activation

@afragen
5 years ago

compatibility testing for theme activation

#5 @afragen
5 years ago

  • Keywords early dev-feedback added
  • Milestone changed from Awaiting Review to 5.5

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


5 years ago

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


5 years ago

@audrasjb
4 years ago

Testing PHP version requirement

@audrasjb
4 years ago

Testing WP version requirement

@audrasjb
4 years ago

Alternative patch: remove <strong>Errors:</strong> from wp_die() as users already know we have an error.

#8 @audrasjb
4 years ago

  • Keywords has-screenshots added; dev-feedback removed

Hi there,

I tested this patch and it works fine to me. Let's add a commit keyword as it need to be committed early.

I also added an alternative patch which remove <strong>Errors:</strong> from wp_die() as users may already know there is an error. See ticket #47656 also slated to milestone 5.5.

#9 @audrasjb
4 years ago

  • Keywords commit added

#10 @afragen
4 years ago

The wp_die message should be consistent with the same message for plugin incompatibility r44978

Last edited 4 years ago by afragen (previous) (diff)

#11 @audrasjb
4 years ago

Yep then let’s commit 49334.diff as it and fix the issue with error messages in #47656 🚀

#12 @afragen
4 years ago

I like that idea.

#13 @SergeyBiryukov
4 years ago

In 47573:

Themes: Block theme activation if it requires a higher version of PHP or WordPress.

Introduce validate_theme_requirements() for validating a theme's WordPress and PHP version requirements.

Follow-up to [44978] and [45546] for plugins.

Props afragen, audrasjb, SergeyBiryukov.
See #49334.

#14 @SergeyBiryukov
4 years ago

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

In 47574:

Plugins: Simplify the logic of validate_plugin_requirements(), update documentation.

This updates the function for consistency with validate_theme_requirements().

Follow-up to [44978], [45546], [47573].

Fixes #43992.

#15 @desrosj
4 years ago

  • Keywords needs-dev-note added; commit removed

#16 @justinahinon
4 years ago

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