钩子文档

wp_list_comments_args

💡 云策文档标注

概述

wp_list_comments_args 是一个 WordPress 过滤器钩子,用于修改检索评论列表时使用的参数数组。它允许开发者在调用 wp_list_comments() 函数前自定义评论显示设置。

关键要点

  • 这是一个过滤器钩子,名称为 'wp_list_comments_args',用于过滤评论列表的参数。
  • 参数 $parsed_args 是一个数组,包含用于显示评论的配置选项,如分页、样式等。
  • 钩子通过 apply_filters() 调用,开发者可以添加回调函数来修改 $parsed_args。
  • 首次引入于 WordPress 4.0.0 版本,与 wp_list_comments() 函数紧密相关。

📄 原文内容

Filters the arguments used in retrieving the comment list.

Description

See also

Parameters

$parsed_argsarray
An array of arguments for displaying comments.

Source

$parsed_args = apply_filters( 'wp_list_comments_args', $parsed_args );

Changelog

Version Description
4.0.0 Introduced.