钩子文档

global_terms_enabled

💡 云策文档标注

概述

本文档介绍 WordPress 中的 global_terms_enabled 过滤器,用于控制是否启用全局术语功能。通过此过滤器,开发者可以自定义或覆盖站点选项中的设置。

关键要点

  • global_terms_enabled 过滤器允许开发者干预全局术语的启用状态。
  • 如果过滤器返回非空值,将直接使用该值,而忽略 'global_terms_enabled' 站点选项。
  • 此过滤器从 WordPress 3.0.0 版本开始引入。

📄 原文内容

Filters whether global terms are enabled.

Description

Returning a non-null value from the filter will effectively short-circuit the function and return the value of the ‘global_terms_enabled’ site option instead.

Parameters

$enablednull
Whether global terms are enabled.

Source

* @param string   $file          File path.

Changelog

Version Description
3.0.0 Introduced.