wp_list_pages_excludes
云策文档标注
概述
wp_list_pages_excludes 是一个 WordPress 过滤器,用于在 wp_list_pages() 函数中排除指定的页面 ID 数组。它允许开发者自定义页面列表的排除项。
关键要点
- 这是一个过滤器,用于修改 wp_list_pages() 函数中要排除的页面 ID 数组。
- 参数 $exclude_array 是一个字符串数组,包含要排除的页面 ID。
- 在 WordPress 2.1.0 版本中引入。
代码示例
$parsed_args['exclude'] = implode( ',', apply_filters( 'wp_list_pages_excludes', $exclude_array ) );
原文内容
Filters the array of pages to exclude from the pages list.
Parameters
$exclude_arraystring[]-
An array of page IDs to exclude.
Source
$parsed_args['exclude'] = implode( ',', apply_filters( 'wp_list_pages_excludes', $exclude_array ) );
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |