[wp-trac] [WordPress Trac] #32008: Wrapper method for esc_attr
WordPress Trac
noreply at wordpress.org
Thu Apr 30 20:35:22 UTC 2015
#32008: Wrapper method for esc_attr
------------------------------------------------+------------------
Reporter: welcher | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.3
Component: General | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch dev-feedback 2nd-opinion | Focuses:
------------------------------------------------+------------------
Changes (by jorbin):
* keywords: has-patch dev-feedback => has-patch dev-feedback 2nd-opinion
* milestone: Awaiting Review => 4.3
Comment:
While I generally support unit tests and adding unit tests for new
functions, I'm not sure we need unit tests just to confirm that echo is
working.
As far as naming things, I don't know if I like 'echo_{type}' since it's
not clear that things are being escaped. A couple of ideas:
e_esc_{type} - Prepend e to indicate echo. It could be really easy to
confuse this with the esc_{type}_e functions though.
echo_esc_{type} - Makes it very clear, but doesn't save any characters.
Does however make it possible for autocomplete if your editor supports it.
I'm torn. Would love to hear some other ideas. As of right now, I'm
leaning towards the longer echo_esc_{type} Either way, moving this to 4.3
so that we make a decision here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32008#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list