Created
March 1, 2022 06:47
-
-
Save pawelkmpt/0b01f4aae331cbe5e4c2ea5a7742a6a3 to your computer and use it in GitHub Desktop.
Do we need so many whitespace?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function page_title( string $title ): string { | |
$endpoint_title = $this->get_endpoint_title(); | |
if ( $endpoint_title && false === strpos( $title, $endpoint_title ) ) { | |
$title = $endpoint_title; | |
remove_filter( 'single_post_title', [ $this, 'page_title' ] ); | |
} | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment