What is the purpose of the "at" sign in WordPress?


What is the purpose of the "at" sign in WordPress?

我在WordPress上开发了几年,我一直看到"at"(@)登录主题和插件评论。

它是干什么的?它在WordPress中有特殊用途吗?或者它只是一个通用的编程文档?到目前为止,我还没有找到任何关于它的信息。

我在代码中看到的示例:

@see woocommerce_output_product_data_tabs()
@uses load_theme_textdomain() For translation/localization support.
@since Twenty Thirteen 1.0
@return void
@param string $title Default title text for current view.

如果有关于这是什么以及应该如何使用的文档,我很想找到它,因为这个问题已经困扰了我一段时间了。

它们是PHPDoc的标记,PHPDoc是Javadoc的PHP等价物。这些注释块稍后可以通过phpDocumentor等工具进行解析,以生成有用的文档。

它会静音错误消息(插件和主题中的错误消息会阻止它们显示给用户)。有关更多信息,请参阅此StackOverflow线程:https://stackoverflow.com/a/1032169/1293256