template = $template; } public function matches( \WP_Post $post ): bool { return PageTemplates::current_slug( $post ) === $this->template; } }