ho notato che un sacco di script hanno questo tipo di commenti:commenti Strano sopra dichiarazioni di funzioni PHP
/**
* Retrieve list of themes with theme data in theme directory.
*
* The theme is broken, if it doesn't have a parent theme and is missing either
* style.css and, or index.php. If the theme has a parent theme then it is
* broken, if it is missing style.css; index.php is optional. The broken theme
* list is saved in the {@link $wp_broken_themes} global, which is displayed on
* the theme list in the administration panels.
*
* @since 1.5.0
* @global array $wp_broken_themes Stores the broken themes.
* @global array $wp_themes Stores the working themes.
*
* @return array Theme list with theme data.
*/
function get_themes() {
global $wp_themes, $wp_broken_themes;
...
return $wp_themes;
}
Sembra una sorta di documentazione per la funzione, ma cosa succede con le parole anteporre con @
?
Come @since, @global, @return, @access, @param ecc ...?
So cosa vogliono dire, ma perché hanno @ di fronte a loro? Devono identificarsi con qualche tipo di app per la documentazione?
Wow Non ho mai guardato il codice sorgente WP in precedenza, "global $ wp_broken_themes' sembra un codice potenzialmente orribile! –
Non sono "strani". @Wesley: il codice WP è orrendo; bene, è PHP quindi vai a capire. –
@Tomalak per quanto riguarda l'odio di PHP: non è l'auto, è l'autista :) –