rest_{$this->post_type}_item_schema

过滤钩子
apply_filters( "rest_{$this->post_type}_item_schema", $schema )

rest_{$this->post_type}_item_schema: 这是WordPress中的一个过滤钩子,当REST API在生成特定文章类型的单个文章资源的模式时被触发。钩子名称中的”{$this->post_type}”部分被替换为文章类型的实际名称。它允许开发者在文章资源被返回之前修改其模式。

过滤文章的架构。

过滤器的动态部分$this->post_type,指控制器的post-type slug。

可能的钩子名称包括:

  • rest_post_item_schema
  • rest_page_item_schema
  • rest_attachment_item_schema
$schema = apply_filters( "rest_{$this->post_type}_item_schema", $schema );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-06 04:33:09

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: