From dedcff38909ce1ac4e2eae21e8a4ce4a6004f3e2 Mon Sep 17 00:00:00 2001 From: StevenDufresne Date: Tue, 23 Jan 2024 15:46:25 +0900 Subject: [PATCH 1/2] Change separator to pipe --- .../wp-content/themes/wporg-main-2022/functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/wp-content/themes/wporg-main-2022/functions.php b/source/wp-content/themes/wporg-main-2022/functions.php index 50c80ed0..2946d66a 100644 --- a/source/wp-content/themes/wporg-main-2022/functions.php +++ b/source/wp-content/themes/wporg-main-2022/functions.php @@ -21,6 +21,7 @@ */ add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_assets' ); add_action( 'init', __NAMESPACE__ . '\register_shortcodes' ); +add_filter( 'document_title_separator', __NAMESPACE__ . '\document_title_separator' ); add_filter( 'wp_img_tag_add_loading_attr', __NAMESPACE__ . '\override_lazy_loading', 10, 2 ); add_filter( 'wporg_block_site_breadcrumbs', __NAMESPACE__ . '\update_site_breadcrumbs' ); add_filter( 'render_block_core/site-title', __NAMESPACE__ . '\use_parent_page_title', 10, 3 ); @@ -323,3 +324,13 @@ function update_header_template_part_class( $block ) { } return $block; } + +/** + * Change document title separator + * + * @param string $title + * @return string + */ +function document_title_separator( $title ) { + return '|'; +} From d0e3366a99fc0b37854b3f4069086496d86e5891 Mon Sep 17 00:00:00 2001 From: Steven Dufresne Date: Wed, 24 Jan 2024 14:56:09 +0900 Subject: [PATCH 2/2] Update source/wp-content/themes/wporg-main-2022/functions.php Co-authored-by: Kelly Dwan --- source/wp-content/themes/wporg-main-2022/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/wp-content/themes/wporg-main-2022/functions.php b/source/wp-content/themes/wporg-main-2022/functions.php index 2946d66a..0fb2b38c 100644 --- a/source/wp-content/themes/wporg-main-2022/functions.php +++ b/source/wp-content/themes/wporg-main-2022/functions.php @@ -328,9 +328,10 @@ function update_header_template_part_class( $block ) { /** * Change document title separator * - * @param string $title + * @param string $sep + * * @return string */ -function document_title_separator( $title ) { +function document_title_separator( $sep ) { return '|'; }