s, before callouts can inject any. if ($tier === 'article' || $tier === 'doc') { $html = self::steps($html); } // Shared transforms (safe for every web tier). $html = self::callouts($html); $html = self::wrap_tables($html); // Article + document tiers get the richer components. if ($tier === 'article' || $tier === 'doc') { $html = self::takeaways($html); $html = self::faq($html, $content_type); } $class = 'acb-content'; if ($tier === 'doc') $class .= ' acb-doc'; if ($tier === 'body') $class .= ' acb-body'; return '
\s*\s*(' . $labels . ')\s*:?\s*<\/strong>\s*:?\s*(.+?)<\/p>/is';
$r = preg_replace_callback($patternA, function ($m) use ($vclass) {
return ' ' . trim($m[2]) . ' \s*(' . $labels . ')\s*:\s*(.+?)<\/p>/is';
$r = preg_replace_callback($patternB, function ($m) use ($vclass) {
return ' ' . trim($m[2]) . ']*>.*?<\/table>)/is', '
]*>.*?<\/ul>)/is';
$r = preg_replace_callback($pattern, function ($m) {
return '
beginning "Step N" + its body up to the next heading.
$pattern = '/
]*>\s*Step\s+(\d+)\s*[:.)\-]?\s*(.*?)<\/h3>(.*?)(?=
' . $title . '
' : '';
return ']*>/i', $html, $hm, PREG_OFFSET_CAPTURE)) return $html;
$intro = substr($html, 0, $hm[0][1]);
$body = substr($html, $hm[0][1]);
$acc = self::faq_pairs($body, '[2-6]');
if ($acc === '') return $html;
return $intro . '
' . esc_html($question) . '
'
. '