After a prompt from Westi I added a…

After a prompt from Westi I added a note to Comments template standards on the Theme Development Codex page today.

The comments.php template file shouldn’t contain function defines unless in a function_exist() check. Ideally all functions should be in functions.php.

Example case: If comments.php contains function defines and the attachment.php loop assumes only one attachment to display and calls comment_template() each time round, you will get function redefines and fatal PHP errors for “cannot redeclare this function that was previously declared.”

#comments, #standards