rebase on oct-10-2023
This commit is contained in:
@@ -28,12 +28,9 @@ function render_block_core_query_title( $attributes ) {
|
||||
if ( $is_archive ) {
|
||||
$show_prefix = isset( $attributes['showPrefix'] ) ? $attributes['showPrefix'] : true;
|
||||
if ( ! $show_prefix ) {
|
||||
$filter_title = function( $title, $original_title ) {
|
||||
return $original_title;
|
||||
};
|
||||
add_filter( 'get_the_archive_title', $filter_title, 10, 2 );
|
||||
add_filter( 'get_the_archive_title_prefix', '__return_empty_string', 1 );
|
||||
$title = get_the_archive_title();
|
||||
remove_filter( 'get_the_archive_title', $filter_title, 10, 2 );
|
||||
remove_filter( 'get_the_archive_title_prefix', '__return_empty_string', 1 );
|
||||
} else {
|
||||
$title = get_the_archive_title();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user