Skip to content

Commit

Permalink
Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jan 5, 2023
1 parent 263cfa1 commit a4b1071
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/experimental/html/class-wp-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1447,12 +1447,13 @@ function get_attribute_names_with_prefix( $prefix ) {
$comparable = strtolower( $prefix );

$matches = array_filter(
array_keys( $this->attributes ),
$this->attributes,
function( $attr ) use ( $comparable ) {
return str_starts_with( $attr, $comparable );
}
},
ARRAY_FILTER_USE_KEY
);
return array_values( $matches );
return array_keys( $matches );
}

/**
Expand Down

0 comments on commit a4b1071

Please sign in to comment.