can the edit_core edit a same file twice?
i tried
$PL->edit_core('test', 'showthread.php', array('search' => '$query = $db->query("
SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
FROM ".TABLE_PREFIX."posts p
WHERE p.tid=\'$tid\'
$visible
ORDER BY p.dateline
");', 'replace' => '$query = $db->query("SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline, p.optanon_posted FROM ".TABLE_PREFIX."posts p WHERE p.tid=\'$tid\' $visible ORDER BY p.dateline");'),true);
$PL->edit_core('test', 'showthread.php', array('search' => 'htmlspecialchars_uni($post[\'username\'])',
'before' => 'if($post[\'optanon_posted\']) {$post[\'username\'] = \'Anonymoose\';}'),true);
but it only edit one but not the other
figured it out
$PL->edit_core('test', 'showthread.php', [['search' => '$query = $db->query("
SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline
FROM ".TABLE_PREFIX."posts p
WHERE p.tid=\'$tid\'
$visible
ORDER BY p.dateline
");', 'replace' => '$query = $db->query("SELECT p.username, p.uid, p.pid, p.replyto, p.subject, p.dateline, p.optanon_posted FROM ".TABLE_PREFIX."posts p WHERE p.tid=\'$tid\' $visible ORDER BY p.dateline");'],['search' => 'htmlspecialchars_uni($post[\'username\'])',
'before' => 'if($post[\'optanon_posted\']) {$post[\'username\'] = \'Anonymoose\';$post[\'uid\']=0;}']],true);