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