' . esc_html( $paragraph ) . '
'; } return $html; } /** * @param string[] $items List item strings (plain text). * @param string $heading Heading text, already resolved ('' = none). * @param string $level 'h2' | 'h3' | 'h4'. * @param bool $ordered True for a numbered list, false for bullets. * @return string */ public function renderList( array $items, string $heading, string $level, bool $ordered ): string { $tag = $ordered ? 'ol' : 'ul'; $html = $this->headingHtml( $heading, $level ) . '<' . $tag . '>'; foreach ( $items as $item ) { if ( '' === $item ) { continue; } $html .= '| ' . esc_html( (string) ( $row['label'] ?? '' ) ) . ' | ' . esc_html( (string) ( $row['value'] ?? '' ) ) . ' |
|---|