'.esc_html($title).'' : '';
return '
'.$title_html.'
'.$body_html.'
';
}
public static function badge($text, $type = 'neutral') {
$type = in_array($type, ['neutral','chapter','component','front','back','utility'], true) ? $type : 'neutral';
return ''.esc_html($text).'';
}
public static function notice($html) {
return ''.$html.'
';
}
public static function h($tag, $text, $class='') {
$tag = preg_replace('/[^a-z0-9]/i', '', (string)$tag);
if ($tag === '') $tag = 'div';
return '<'.$tag.' class="'.esc_attr($class).'">'.esc_html($text).''.$tag.'>';
}
public static function pill($level) {
$level = strtoupper(trim((string) $level));
if ($level === '') { $level = 'PRO'; }
$class = strtolower(preg_replace('/[^a-z0-9]+/i', '-', $level));
return '' . esc_html($level) . '';
}
/**
* Render a simple locked wrapper for the free repository build.
*/
public static function lock_wrap($inner_html, $locked = false, $required_level = 'PRO', $opts = []) {
return '' . $inner_html . '
';
}
}
}