So after some persistence I was able to track down where to make the edit.
On /include/class.thread.php
FIND:
function toHtml() {
return $this->display('html');
}
REPLACE WITH:
function toHtml() {
//CUSTOMIZATION: ADDED AND MODIFIED
$display_html = $this->display('html');
$display_html_final = preg_replace_callback('/[0-9]{10}/', function($match) {
return sprintf('<a target="_blank" href="https://www.store.com/admin/orders/orderID/%s">%s</a>',
htmlspecialchars($match[0]),
htmlspecialchars($match[0])
);
}, $display_html);
return $display_html_final;
}
The pattern matching regex for our order id's is a 10 digit number, so: /[0-9]{10}/