钩子文档

the_weekday_date

💡 云策文档标注

概述

the_weekday_date 是一个 WordPress 过滤器,用于修改文章本地化星期几的显示输出。它允许开发者在输出星期几前后添加自定义 HTML。

关键要点

  • 过滤器名称:the_weekday_date
  • 参数:$the_weekday_date(星期几字符串)、$before(前导 HTML)、$after(后置 HTML)
  • 用途:自定义文章星期几的显示格式和前后内容
  • 相关函数:the_weekday_date() 用于显示星期几

代码示例

echo apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );

注意事项

  • 该过滤器自 WordPress 0.71 版本引入,兼容性良好
  • 参数 $before 和 $after 可用于添加 HTML 标签或文本,增强显示效果

📄 原文内容

Filters the localized weekday of the post, for display.

Parameters

$the_weekday_datestring
The weekday on which the post was written.
$beforestring
The HTML to output before the date.
$afterstring
The HTML to output after the date.

Source

echo apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );

Changelog

Version Description
0.71 Introduced.