Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Use esc_attr__ instead of esc_attr to make strings translatable. #473

Merged
merged 1 commit into from Sep 21, 2023

Conversation

Soean
Copy link
Member

@Soean Soean commented Sep 21, 2023

Description
Same as #379 before.


This pull request changes the function calls from esc_attr to esc_attr__ to make strings translatable.

esc_attr( string $text ): Escapes for HTML attributes and only accepts one parameter, the $text.

esc_attr__( string $text, string $domain = 'default' ): Retrieves the translation of $text and escapes it for safe use in an attribute.

@MaggieCabrera MaggieCabrera merged commit 6cb19b2 into WordPress:trunk Sep 21, 2023
2 checks passed
@Soean Soean deleted the translate-escape_attribute branch September 21, 2023 13:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants