We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d1aa4e commit 15c9632Copy full SHA for 15c9632
1 file changed
src/wp-includes/theme.php
@@ -959,7 +959,20 @@ function validate_theme_requirements( $stylesheet ) {
959
);
960
}
961
962
- return true;
+ /**
963
+ * Filters the theme requirement validation response.
964
+ *
965
+ * If a theme fails due to a Core-provided validation (incompatible WP, PHP versions), this
966
+ * filter will not fire. A WP_Error response will already be returned.
967
968
+ * This filter is intended to add additional validation steps by site administrators.
969
970
+ * @since 6.0.0
971
972
+ * @param bool|WP_Error $met_requirements True if the theme meets requirements, WP_Error if not.
973
+ * @param string $stylesheet Directory name for the theme.
974
+ */
975
+ return apply_filters( 'validate_theme_requirements', true, $stylesheet );
976
977
978
/**
0 commit comments