[wp-hackers] Error / Bug on codex.wordpress.org - Not sure where to report

Otto otto at ottodestruct.com
Wed Jan 25 20:54:46 UTC 2012


On Wed, Jan 25, 2012 at 1:28 PM, David Beckley <beckl.d.413 at isg.edu.sa> wrote:
> This is the code causing the error:
>
> <script type="text/javascript">
> (function($){
> $(document).ready(function() {
>        $('#footer a').click(function() {
>                if (this.href.indexOf('wordpress.org') == -1 &&
> this.href.indexOf('http') == 0) {
>                        recordOutboundLink(this, 'Outbound Links', this.href);
>                        return false;
>                }
>        });
> });
> })(jQuery);
> </script>
>
> It's around line 333 in http://codex.wordpress.org 's code.
>
> It seems the function is being closed twice.

No, there's nothing wrong with that script, except poor indentation.

Consider it this way:
(function($) {
	$(document).ready(function() {
	       $('#footer a').click(function() {
		       if (this.href.indexOf('wordpress.org') == -1 &&
			   this.href.indexOf('http') == 0) {
			       recordOutboundLink(this, 'Outbound Links', this.href);
			       return false;
		       }
	       });
	});
})(jQuery);

Perfectly fine, as far as I can tell.

Problem is that jquery.js isn't included in the codex header. I'll fix it.

-Otto


More information about the wp-hackers mailing list