$args ) { $section_groups[$args['status']][$name] = $args; } if ( isset( $section_groups['call-to-action'] ) ) { self::render_sections( 'call-to-action', $section_groups['call-to-action'] ); } if ( isset( $section_groups['action-taken'] ) ) { self::render_sections( 'action-taken', $section_groups['action-taken'] ); } if ( isset( $section_groups['confirmation'] ) ) { self::render_sections( 'confirmation', $section_groups['confirmation'] ); } } private static function render_sections( $status, $sections ) { foreach ( $sections as $name => $args ) { $classes = array( 'itsec-security-check-container', "itsec-security-check-container-$status" ); if ( $args['interactive'] ) { $classes[] = 'itsec-security-check-container-is-interactive'; } echo '
{$entry['value']}
\n"; } } else if ( 'input' === $entry['type'] ) { if ( empty( $entry['input'] ) ) { return; } $defaults = array( 'format' => '%1$s', 'value' => '', 'style_class' => '', 'data' => array(), ); $entry = array_merge( $defaults, $entry ); if ( ! empty( $entry['value_alias'] ) ) { $entry['value'] = self::get_alias_value( $entry['value_alias'] ); } $data_attrs = array(); foreach ( (array) $entry['data'] as $key => $val ) { $key = preg_replace( '/[^a-zA-Z0-9\-_]+/', '', $key ); $val = self::esc_attr( $val ); $data_attrs[] = " data-$key=\"$val\""; } if ( 'select' === $entry['input'] ) { if ( empty( $entry['name'] ) || empty( $entry['options'] ) ) { return; } $options = "\n"; foreach ( $entry['options'] as $value => $description ) { $option = '