100, 'name' => __('Search'), 'description' => __('Highlight searched words.'), 'ignore' => [], 'class' => ['span.epc-search'], 'replace' => '%s', ]; } protected function initSettings(): array { return [ 'nocase' => true, 'plural' => true, 'style' => ['color: #FFCC66;'], 'notag' => ['h1','h2','h3'], 'tplValues' => ['EntryContent'], 'page' => ['search.html'], ]; } public function publicContent(string $tag, array $args): void { if (empty(App::frontend()->search)) { return; } $searchs = explode(' ', App::frontend()->search); foreach ($searchs as $k => $v) { $args[0] = Epc::replaceString( $v, sprintf($this->replace, '\\1'), $args[0], $this ); } } }