[wp-hackers] Code formatting

Lutz Schröer latz at elektroelch.de
Tue Jul 5 18:01:55 UTC 2011

> Should be $_POST['link_url']. That said, if it were a variable, then 
> it
> should probably have spaces: $_POST[ $link_url ].

After reading this I looked at the Codex again and saw that it's not 
explained for round brackets neither. In the code there are both 

do_action( 'in_admin_footer' );

(copied and pasted from the core code).

To be consistent these should be written without spaces if it's a pure 
string and with spaces if it's a variable. What if it's a mixture, like 
function('string', $var); I would vote for spaces.

I didn't want a long dicussion but after I started this I can't stop 
;-) After we came to a consensus I'll update the Codex.


More information about the wp-hackers mailing list