钩子文档

install_themes_{$tab}

💡 云策文档标注

概述

install_themes_{$tab} 是一个 WordPress 动作钩子,在安装主题页面的每个选项卡顶部触发。钩子名称中的动态部分 $tab 表示当前的主题安装选项卡。

关键要点

  • 钩子名称是动态的,基于当前选项卡,例如 install_themes_featured、install_themes_search 等。
  • 参数 $paged 表示当前查看的结果页码。
  • 此钩子自 WordPress 2.8.0 引入,并在 6.1.0 版本添加了 install_themes_block-themes 钩子名称。

代码示例

do_action( "install_themes_{$tab}", $paged );

📄 原文内容

Fires at the top of each of the tabs on the Install Themes page.

Description

The dynamic portion of the hook name, $tab, refers to the current theme installation tab.

Possible hook names include:

  • install_themes_block-themes
  • install_themes_dashboard
  • install_themes_featured
  • install_themes_new
  • install_themes_search
  • install_themes_updated
  • install_themes_upload

Parameters

$pagedint
Number of the current page of results being viewed.

Source

do_action( "install_themes_{$tab}", $paged );

Changelog

Version Description
6.1.0 Added the install_themes_block-themes hook name.
2.8.0 Introduced.