- var_dump: documentation ( source)
- preg_replace_callback: documentation ( source)
<?php
class Foo {
public function bar($arg) {
return 'test' . $arg;
}
}
$content = '<p><a href="{ccm:export:page:/team/faq}">FAQ / Help</a></p>
<p><a href="{ccm:export:page:/portfolio}">Case Studies</a></p>
<p><a href="{ccm:export:page:/blog}">Blog</a></p>
<p><a href="{ccm:export:page:}">Another Link</a></p>';
$content = preg_replace_callback(
'/\{ccm:export:page:(.*?)\}/i',
array('static', 'replacePagePlaceHolderOnImport'),
$content);
var_dump($content);