' . esc_html( $message ) . '

'; if ( ! $values ) { return $out . ''; } $out .= '
'; foreach ( array_slice( $values, 0, 50, true ) as $key => $value ) { $out .= '
' . esc_html( $key ) . '
' . esc_html( is_array( $value ) ? implode( ', ', array_filter( $value, 'is_scalar' ) ) : $value ) . '
'; } return $out . '
'; } /** * Shown instead of the form while it is closed, full or not yet open. * * The message is part of the page, not a change to it, so it needs no * focus move or live region. It keeps the form's heading for context and * its checked colours for contrast. * * @param int $form_id Form post ID. * @param array $schema Form schema. * @return string */ private static function closed( $form_id, array $schema ) { $level = $schema['heading_level'] ?? 'h2'; $out = '
'; if ( 'none' !== $level ) { $tag = in_array( $level, array( 'h2', 'h3', 'h4', 'h5', 'h6' ), true ) ? $level : 'h2'; $out .= '<' . $tag . ' class="af-heading">' . esc_html( $schema['heading'] ) . ''; } return $out . '

' . esc_html( $schema['closed_message'] ) . '

'; } /** * A message for visitors without JavaScript. * * The