final public function detect_title( \WP_Query &$wp_query ){
		if( $wp_query->is_main_query() && $this->is_valid_query($wp_query) ){
			add_filter('wp_title', [$this, 'wp_title'], 10, 3);
		}
	}
final public function detect_title( \WP_Query &$wp_query ){
		if( $wp_query->is_main_query() && $this->is_valid_query($wp_query) ){
			add_filter('wp_title', [$this, 'wp_title'], 10, 3);
		}
	}
final public function detect_title ( \ WP_Query & $ wp_query ) { if ( $ wp_query -> is_main_query ( ) && $ this -> is_valid_query ( $ wp_query ) ) { add_filter ( 'wp_title' , [ $ this , 'wp_title' ] , 10 , 3 ) ; } }
Add wp_title filter if required

@param \WP_Query $wp_query
Add wp_title filter if required