setProperties([ 'priority' => 200, 'name' => __('Replace'), 'help' => __('Replace some text. First term of the list is the text to replace and second term the replacement.'), 'has_list' => true, 'htmltag' => '', 'class' => ['span.epc-replace'], 'replace' => '%s', ]); $this->setSettings([ 'nocase' => true, 'plural' => true, 'style' => ['font-style: italic;'], 'notag' => 'h1,h2,h3', 'tplValues' => ['EntryContent'], 'pubPages' => ['post.html'], ]); return 'replace'; } public function publicContent(string $tag, array $args): void { while ($this->records()->fetch()) { $args[0] = Epc::replaceString( $this->records()->epc_key, sprintf($this->replace, $this->records()->epc_value, '\\2'), $args[0], $this ); } } }