Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a very basic question.

In the functions.php file of a theme, what happens to the text that is outside a function and outside the <?php ?> tags? Can I place notes before and after the functions without commenting it and without affecting the system? Or should I at least enclose the out-of-php text in html comments?

For example:

comment/note/reference text
<?php
function my_function() {
code;
return results;
}
?>
more comment/note/reference text
<?php
function my_function_2() {
code;
return results;
}
?>
more comment/note/reference text

cheers,
Gregory

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It will probably throw a 'Headers already sent' error/warning and cause a lot of trouble to everything.

share|improve this answer
    
thank you. that's what I needed to know :-) –  Gregory Apr 28 '12 at 10:23
    
You're welcome! If my answer helped you, please accept it as the correct answer! –  Rutwick Gangurde Apr 28 '12 at 10:48
    
just saw your answer in action, even with html commented text before the first function. cheers. –  Gregory Apr 28 '12 at 12:41
    
No problem mate! It's good you asked, cuz that error is a heck of a pain in the neck! Cheers! :) –  Rutwick Gangurde Apr 28 '12 at 12:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.