钩子文档

wp_title_parts

💡 云策文档标注

概述

wp_title_parts 是一个 WordPress 过滤器,用于修改页面标题的组成部分。它允许开发者在 wp_title() 函数中自定义标题数组。

关键要点

  • 这是一个过滤器,用于过滤页面标题的各个部分。
  • 参数 $title_array 是一个字符串数组,表示页面标题的组成部分。
  • 通过 apply_filters('wp_title_parts', $title_array) 调用。
  • 与 wp_title() 函数相关,用于显示或检索博客所有区域的页面标题。
  • 在 WordPress 4.0.0 版本中引入。

📄 原文内容

Filters the parts of the page title.

Parameters

$title_arraystring[]
Array of parts of the page title.

Source

$title_array = apply_filters( 'wp_title_parts', $title_array );

Changelog

Version Description
4.0.0 Introduced.