Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance: remove unnecessary repeated function call #44545

Merged
merged 1 commit into from Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/experimental/html/class-wp-html-tag-processor.php
Expand Up @@ -761,7 +761,8 @@ private function class_name_updates_to_attributes_updates() {
$modified = false;

// Remove unwanted classes by only copying the new ones.
while ( $at < strlen( $existing_class ) ) {
$existing_class_length = strlen( $existing_class );
while ( $at < $existing_class_length ) {
// Skip to the first non-whitespace character.
$ws_at = $at;
$ws_length = strspn( $existing_class, " \t\f\r\n", $ws_at );
Expand Down