Opened 12 years ago
Closed 12 years ago
#24212 closed defect (bug) (fixed)
Add missing inline docs for esc_attr_x() and esc_html_x()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | Inline Docs | Keywords: | has-patch |
Focuses: | Cc: |
Description
Attachments (5)
Change History (18)
#6
@
12 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 24825:
#7
follow-up:
↓ 8
@
12 years ago
There is a mistake in this documentation since it states that these functions display string while they just return it.
I've changed first sentence based on existing documentation of i18n escaping functions.
#8
in reply to:
↑ 7
@
12 years ago
- Keywords commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
#9
follow-up:
↓ 10
@
12 years ago
- Changed the description for any text domain variable passed around functions from "Unique identifier for retrieving translated strings." to just "Text domain." as well as all mentions of "domain" to "text domain".
- Simplified @dimadin's short descriptions of esc_attr_x and esc_html_x - we don't need to know the string won't be translated if there is no translation or a domain is not supplied, that's implied behavior and not documented as such in the rest of the translation functions.
#10
in reply to:
↑ 9
;
follow-up:
↓ 11
@
12 years ago
Replying to ericlewis:
- Changed the description for any text domain variable passed around functions from "Unique identifier for retrieving translated strings." to just "Text domain." as well as all mentions of "domain" to "text domain".
- Simplified @dimadin's short descriptions of esc_attr_x and esc_html_x - we don't need to know the string won't be translated if there is no translation or a domain is not supplied, that's implied behavior and not documented as such in the rest of the translation functions.
This ticket is specifically about esc_attr_x()
and esc_html_x()
. I'd suggest submitting your other changes to the l10n.php ticket closed yesterday: #16750
#11
in reply to:
↑ 10
@
12 years ago
Replying to DrewAPicture:
This ticket is specifically about
esc_attr_x()
andesc_html_x()
. I'd suggest submitting your other changes to the l10n.php ticket closed yesterday: #16750
Sure, pardon me.
Note: See
TracTickets for help on using
tickets.
OK I've added inline docs to both functions.
I also spotted an inconsistency with the first argument being named
$single
which does not match what is used in similar functions nor does it even match what is in the Codex.http://codex.wordpress.org/Function_Reference/esc_attr_x
http://codex.wordpress.org/Function_Reference/esc_html_x
So in this patch, I've updated the first argument in both functions to correctly use the var name
$text
.