WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/18/2020 12:30:04 PM (17 months ago)
Author:
SergeyBiryukov
Message:

Themes: Prevent activation and live preview of themes that require a higher version of PHP or WordPress.

Props afragen, jorbin, TimothyBlynJacobs, SergeyBiryukov.
See #48491.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r47808 r47816  
    35723572        );
    35733573
    3574         $theme->num_ratings = number_format_i18n( $theme->num_ratings );
    3575         $theme->preview_url = set_url_scheme( $theme->preview_url );
     3574        $theme->num_ratings    = number_format_i18n( $theme->num_ratings );
     3575        $theme->preview_url    = set_url_scheme( $theme->preview_url );
     3576        $theme->compatible_wp  = is_wp_version_compatible( $theme->requires );
     3577        $theme->compatible_php = is_php_version_compatible( $theme->requires_php );
    35763578    }
    35773579
Note: See TracChangeset for help on using the changeset viewer.