Fixed Function in 3 files#562
Merged
Merged
Conversation
Owner
|
Thank you! |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR corrects the misuse of WordPress translation functions by removing unnecessary echo statements. The translation functions esc_html_e() and esc_attr_e() already echo their output, so using echo with them causes the text to be output twice or in the wrong location.
Key changes:
- Removed
echobeforeesc_html_e()calls for HTML content (option text, link text) - Attempted to remove
echobeforeesc_attr_e()calls for attributes, but introduced bugs by using the wrong function variant - Updated multiple template and widget files to use proper WordPress escaping/translation patterns
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| widgets/class-widget-friend-request.php | Removed echo from translation functions, but incorrectly used esc_attr_e() where esc_attr__() and esc_html_e() should be used |
| templates/admin/edit-rules.php | Correctly removed echo from esc_html_e() calls in option elements |
| includes/class-admin.php | Correctly removed echo from esc_html_e() calls in link text content |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
akirk
approved these changes
Nov 9, 2025
Contributor
Author
|
Hello @akirk When you can, could you take a look at this PR of mine? Thanks. |
1 similar comment
Contributor
Author
|
Hello @akirk When you can, could you take a look at this PR of mine? Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed Function in 3 files