钩子文档

is_multi_author

💡 云策文档标注

概述

is_multi_author 是一个 WordPress 过滤器,用于判断网站是否有多个作者发表了文章。它允许开发者修改这个布尔值。

关键要点

  • 过滤器名称:is_multi_author
  • 参数:$is_multi_author(布尔值),表示是否应评估为 true
  • 源调用:apply_filters('is_multi_author', (bool) $is_multi_author)
  • 相关函数:is_multi_author(),位于 wp-includes/author-template.php
  • 版本历史:从 WordPress 3.2.0 引入

📄 原文内容

Filters whether the site has more than one author with published posts.

Parameters

$is_multi_authorbool
Whether $is_multi_author should evaluate as true.

Source

return apply_filters( 'is_multi_author', (bool) $is_multi_author );

Changelog

Version Description
3.2.0 Introduced.