[wp-trac] [WordPress Trac] #25017: Dont allow empty $src parameter in wp_register_script
WordPress Trac
noreply at wordpress.org
Wed Dec 18 04:42:08 UTC 2013
#25017: Dont allow empty $src parameter in wp_register_script
--------------------------+---------------------
Reporter: oskarhane | Owner: nacin
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.7
Component: General | Version: 3.6
Severity: normal | Resolution: fixed
Keywords: |
--------------------------+---------------------
Comment (by nacin):
benfreke, you make a great point. Thanks for the comment. A change would
mean another string for translators. Not a big deal, but while
[attachment:25017.1.diff] originally had a wp-login.php-specific block, I
just didn't find it to be necessary at the time.
While is_admin() is false on wp-login.php, it's intrinsically part of "the
administration area". It needs to be clear that their is_admin() check
remains wrong and insufficient, and that they should be using the correct
hook. If the message said "don't do this on login" the next thought will
likely be "oh, I'm already excluding the admin, so I should also exclude
login". I'd rather be a little vague upfront (especially since we don't
actually know what they are checking) and unambiguous in how to correct
it.
Alas, I'm most likely reading way too far into the psychology of error
messages.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25017#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list