mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
General: Use static on closures whenever $this is not used to avoid memory leaks.
Props westonruter, jrf, spacedmonkey. Fixes #58323. git-svn-id: https://develop.svn.wordpress.org/trunk@55822 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1177,7 +1177,7 @@ function wp_kses_attr( $element, $attr, $allowed_html, $allowed_protocols ) {
|
||||
// Check if there are attributes that are required.
|
||||
$required_attrs = array_filter(
|
||||
$allowed_html[ $element_low ],
|
||||
function( $required_attr_limits ) {
|
||||
static function( $required_attr_limits ) {
|
||||
return isset( $required_attr_limits['required'] ) && true === $required_attr_limits['required'];
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user