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 am somewhat familiar with the concept of packages in Java, but I'm new to Wordpress and PHP.

In a template file such as header.php, what is happening when you include the @package notation?

<?php
/*
 * @package MyTheme
 */
share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Those are PHPDoc tags. They are entirely for code documentation purposes.

share|improve this answer
    
The irony is: I thought the asker knew that and wanted to know what happens when it is used. –  toscho Jan 10 '13 at 17:22
    
@toscho, very plausible interpretation :) I waited several hours after I saw your answer, thinking it would be picked as the solution. –  s_ha_dum Jan 10 '13 at 17:27
add comment

Nothing will happen. This PHPDoc tag has no special meaning in WordPress, it is not a header WordPress will parse by default. Use it to group your code internally.

get_file_data() cannot read it because that function needs a : after the identifier (here package).

share|improve this answer
add comment

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.