WordPress.org

Make WordPress Core

Changeset 48071


Ignore:
Timestamp:
06/17/2020 02:46:23 PM (5 months ago)
Author:
desrosj
Message:

Site Health: Verify PHP version requirements when auto-updating themes.

Follow up of [47819].
See #49653.
Fixes #50411.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r47857 r48071  
    215215        }
    216216
    217         // If updating a plugin, ensure the minimum PHP version requirements are satisfied.
    218         if ( 'plugin' === $type ) {
     217        // If updating a plugin or theme, ensure the minimum PHP version requirements are satisfied.
     218        if ( in_array( $type, array( 'plugin', 'theme' ), true ) ) {
    219219            if ( ! empty( $item->requires_php ) && version_compare( phpversion(), $item->requires_php, '<' ) ) {
    220220                return false;
Note: See TracChangeset for help on using the changeset viewer.