me di cuenta de que una gran cantidad de guiones tienen este tipo de comentarios:comentarios extraños anteriores declaraciones de funciones 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;
}
Parece que algún tipo de documentación de la función, pero ¿qué pasa con las palabras precedidas por @
?
Me gusta @since, @global, @return, @access, @param etc ...?
Sé lo que significan, pero ¿por qué tienen @ delante de ellos? ¿Deben identificarse con algún tipo de aplicación de documentación?
¡Wow, nunca antes había mirado el código fuente de WP, 'global $ wp_broken_themes' parece un código potencialmente horrible! –
No son "raros". @Wesley: el código de WP es horrendo; bueno, es PHP, así que imagínate. –
@Tomalak con respecto al odio de PHP: No es el automóvil, es el conductor :) –