我注意到很多脚本都有这种类型的注释:
/**
* 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;
}
这似乎是某种函数的文档,但是前面带有 @
的词是什么意思呢?
比如 @since、@global、@return、@access、@param 等等...
我知道它们的含义,但为什么要在它们前面加上 @ 呢?它们需要与某种文档应用程序进行标识吗?
global $wp_broken_themes
听起来好像有一些可怕的代码正在运行! - Wesley Murch