钩子文档

rest_wp_font_family_collection_params

💡 云策文档标注

概述

rest_wp_font_family_collection_params 是一个 WordPress 过滤器钩子,用于修改字体家族控制器的集合参数。它允许开发者在获取字体家族集合时自定义查询参数。

关键要点

  • 这是一个过滤器钩子,用于过滤字体家族控制器的集合参数。
  • 参数 $query_params 是一个数组,包含 JSON Schema 格式的集合参数。
  • 钩子在 WP_REST_Font_Families_Controller::get_collection_params() 方法中被调用,用于检索字体家族集合的查询参数。
  • 该钩子从 WordPress 6.5.0 版本开始引入。

📄 原文内容

Filters collection parameters for the font family controller.

Parameters

$query_paramsarray
JSON Schema-formatted collection parameters.

Source

return apply_filters( 'rest_wp_font_family_collection_params', $query_params );

Changelog

Version Description
6.5.0 Introduced.