The the_weekday_date filter makes it possible to change the displayed day of the week a post was published, when the function of the same name — the_weekday_date() — is used inside the Loop.
It is located in wp-includes/general-template.php and the_weekday_date() only outputs the day if the current post’s weekday is different from the previous one output (why this would be needed, I have no idea).
The filter accepts three arguments:
- string
$the_weekday_dateThe day of the week - string
$beforeText or markup before - string
$afterText or markup after
The original value of $the_weekday_date is determined using a chain of functions to snag the localized day of the week:
- the
get_weekday()method of theWP_Localeclass mysql2date()
Example:
Let’s say you wanted to convert the day ‘Saturday’ into pirate-speak, something like ‘SatARRRday’ and were using the_weekday_date() to output it in the Loop.
Hate to be that guy, but the correct link for documentation is: https://codex.wordpress.org/Function_Reference/the_weekday_date
nevermind, i’m and idiot. clicked the wrong one. Ignore me!
Week 1 Recap: Filters 1-12 – Filters of the Day