wp-content/themes/twentytwenty/inc/template-tags.php:787Filters the archive title and styles the word before the first colon.
$titlestringstringOne hook fires while twentytwenty_get_the_archive_title() runs, in this order:
Filters the regular expression used to style the word before the first colon.
function twentytwenty_get_the_archive_title( $title ) { /** * Filters the regular expression used to style the word before the first colon. * * @since Twenty Twenty 1.0 * * @param array $regex An array of regular expression pattern and replacement. */ $regex = apply_filters( 'twentytwenty_get_the_archive_title_regex', array( 'pattern' => '/(\A[^\:]+\:)/', 'replacement' => '<span class="color-accent">$1</span>', ) ); if ( empty( $regex ) ) { return $title; } return preg_replace( $regex['pattern'], $regex['replacement'], $title );}Introduced in Twenty Twenty 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentytwenty/inc/template-tags.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.