函数文档

do_activate_header()

💡 云策文档标注

概述

do_activate_header() 是一个 WordPress 函数,用于在站点激活页面的 部分触发一个特定的动作钩子。它通过调用 do_action('activate_wp_head') 来执行已添加到该钩子的回调函数。

关键要点

  • 函数 do_activate_header() 在站点激活页面的 部分触发动作钩子。
  • 它调用 do_action('activate_wp_head'),该钩子与 'wp_head' 动作关联。
  • 此函数自 WordPress 3.0.0 版本引入,属于多站点(MU)功能。
  • 相关函数包括 do_action(),用于调用动作钩子的回调函数。

代码示例

function do_activate_header() {
    /**
     * Fires within the <head> section of the Site Activation page.
     *
     * Fires on the 'wp_head' action.
     *
     * @since 3.0.0
     */
    do_action( 'activate_wp_head' );
}

📄 原文内容

Adds an action hook specific to this page.

Description

Fires on ‘wp_head’.

Source

function do_activate_header() {
	/**
	 * Fires within the `<head>` section of the Site Activation page.
	 *
	 * Fires on the 'wp_head' action.
	 *
	 * @since 3.0.0
	 */
	do_action( 'activate_wp_head' );
}

Hooks

do_action( ‘activate_wp_head’ )

Fires within the section of the Site Activation page.

Changelog

Version Description
MU (3.0.0) Introduced.