diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index ce913919da..2b77846f8b 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1119,12 +1119,10 @@ function validate_plugin( $plugin ) { * Uses the information from `Requires at least` and `Requires PHP` headers * defined in the plugin's main PHP file. * - * If the headers are not present in the plugin's main PHP file, - * `readme.txt` is also checked as a fallback. - * * @since 5.2.0 * @since 5.3.0 Added support for reading the headers from the plugin's * main PHP file, with `readme.txt` as a fallback. + * @since 5.8.0 Removed support for using `readme.txt` as a fallback. * * @param string $plugin Path to the plugin file relative to the plugins directory. * @return true|WP_Error True if requirements are met, WP_Error on failure. @@ -1137,21 +1135,6 @@ function validate_plugin_requirements( $plugin ) { 'requires_php' => ! empty( $plugin_headers['RequiresPHP'] ) ? $plugin_headers['RequiresPHP'] : '', ); - $readme_file = WP_PLUGIN_DIR . '/' . dirname( $plugin ) . '/readme.txt'; - - if ( file_exists( $readme_file ) ) { - $readme_headers = get_file_data( - $readme_file, - array( - 'requires' => 'Requires at least', - 'requires_php' => 'Requires PHP', - ), - 'plugin' - ); - - $requirements = array_merge( $readme_headers, $requirements ); - } - $compatible_wp = is_wp_version_compatible( $requirements['requires'] ); $compatible_php = is_php_version_compatible( $requirements['requires_php'] ); diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 458b8e6b3a..7d4b62684b 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -899,10 +899,8 @@ function validate_current_theme() { * Uses the information from `Requires at least` and `Requires PHP` headers * defined in the theme's `style.css` file. * - * If the headers are not present in the theme's stylesheet file, - * `readme.txt` is also checked as a fallback. - * * @since 5.5.0 + * @since 5.8.0 Removed support for using `readme.txt` as a fallback. * * @param string $stylesheet Directory name for the theme. * @return true|WP_Error True if requirements are met, WP_Error on failure. @@ -915,21 +913,6 @@ function validate_theme_requirements( $stylesheet ) { 'requires_php' => ! empty( $theme->get( 'RequiresPHP' ) ) ? $theme->get( 'RequiresPHP' ) : '', ); - $readme_file = $theme->theme_root . '/' . $stylesheet . '/readme.txt'; - - if ( file_exists( $readme_file ) ) { - $readme_headers = get_file_data( - $readme_file, - array( - 'requires' => 'Requires at least', - 'requires_php' => 'Requires PHP', - ), - 'theme' - ); - - $requirements = array_merge( $readme_headers, $requirements ); - } - $compatible_wp = is_wp_version_compatible( $requirements['requires'] ); $compatible_php = is_php_version_compatible( $requirements['requires_php'] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 28164074aa..75d2ef6709 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-51091'; +$wp_version = '5.8-alpha-51092'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.