Skip to content
Commit 1ce932db authored by Dominik Schilling's avatar Dominik Schilling
Browse files

Themes: Introduce `get_the_archive_title_prefix` filter for changing the...

Themes: Introduce `get_the_archive_title_prefix` filter for changing the prefix used for archive titles.

In `get_the_archive_title()` split the internal `$title` variable into `$title` and `$prefix`. By using the new `get_the_archive_title_prefix` filter the prefix can now wrapped with custom elements or removed completely by using

{{{
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );
}}}

Also, wrap the title part with a `span` element and pass the original title and prefix to the existing `get_the_archive_title` filter, allowing further customization to the archive titles.

Props Kaira, milindmore22, shireling, grapplerulrich, audrasjb, desrosj, Confridin, ramiy, ocean90.
Fixes #31237.
Fixes #38545.
Built from https://develop.svn.wordpress.org/trunk@48294


git-svn-id: https://core.svn.wordpress.org/trunk@48063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 1579e80c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment