'input', 'name' => '', 'label' => '', 'desc' => '', 'default' => '', 'attrs' => array(), 'style' => 'vertical', // For radio. 'suffix' => '', // For inputs. 'options' => array(), // For select, radio. 'fields' => array(), // For repeater. ); foreach ( $section['fields'] as $field ) { $counter++; // Merge Settings. $field = array_merge( $default_field, $field ); // Attrs. $attrs = null; if ( ! empty( $field['attrs'] ) ) { foreach ( $field['attrs'] as $key => $value ) { $attrs[] = sprintf( '%s="%s"', $key, $value ); } $attrs = implode( ' ', $attrs ); } // Output by type. switch ( $field['type'] ) { case 'section': ?>