diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index b1167b2e4c..ee1970ea38 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1247,7 +1247,20 @@ function validate_plugin_requirements( $plugin ) { ); } - return true; + /** + * Filters the plugin requirement validation response. + * + * If a plugin fails due to a Core-provided validation (incompatible WP, PHP versions), this + * filter will not fire. A WP_Error response will already be returned. + * + * This filter is intended to add additional validation steps by site administrators. + * + * @since 6.9.0 + * + * @param bool|WP_Error $met_requirements True if the plugin meets requirements, WP_Error if not. + * @param string $plugin Path to the plugin file relative to the plugins directory. + */ + return apply_filters( 'validate_plugin_requirements', true, $plugin ); } /** diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 1a84314777..558bea6ae9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1002,7 +1002,20 @@ function validate_theme_requirements( $stylesheet ) { ); } - return true; + /** + * Filters the theme requirement validation response. + * + * If a theme fails due to a Core-provided validation (incompatible WP, PHP versions), this + * filter will not fire. A WP_Error response will already be returned. + * + * This filter is intended to add additional validation steps by site administrators. + * + * @since 6.9.0 + * + * @param bool|WP_Error $met_requirements True if the theme meets requirements, WP_Error if not. + * @param string $stylesheet Directory name for the theme. + */ + return apply_filters( 'validate_theme_requirements', true, $stylesheet ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index e317d0bb19..65b868e778 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60994'; +$wp_version = '6.9-alpha-60995'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.