src/properties/class-papi-property-flexible.php
protected function render_properties( $row, $value ) {
		$has_value     = $value !== false;
		$render_layout = $this->get_setting( 'layout' );
		$layout_slug   = isset( $row['slug'] ) ? $row['slug'] : false;
		$layout_slug   = empty( $layout_slug ) && isset( $value['_layout'] ) ? $value['_layout'] : $layout_slug;
		$layout_slug   = empty( $layout_slug ) && isset( $value[$this->layout_key] ) ? $value[$this->layout_key] : $layout_slug;
		$row           = isset( $row['items'] ) ? $row['items'] : $row;
		$layout        = $this->get_layout( $layout_slug );

		// Render one hidden input for layout slug.
		$this->render_layout_input( $layout_slug );
		?>
		<td class="repeater-column flexible-column <?php echo $render_layout === 'table' ? 'flexible-layout-table' : 'flexible-layout-row'; ?>">
			<div class="repeater-content-open">
				<?php // flexible label table layout ?>
				<?php if ( $render_layout === 'table' && ! empty( $layout['row_label'] ) && isset( $layout['show_label'] ) && $layout['show_label'] ): ?>
					<label class="flexible-row-label"><?php echo esc_html( $layout['row_label'] ); ?></label>
				<?php endif; ?>
				<table class="<?php echo $render_layout === 'table' ? 'flexible-table' : 'papi-table'; ?>">
					<?php
					if ( $render_layout === 'table' ):
						echo '<thead>';
						for ( $i = 0, $l = count( $row ); $i < $l; $i ++ ) {
							// Don't show the property if it's disabled.
							if ( $row[$i]->disabled() ) {
								continue;
							}

							if ( $row[$i]->sidebar ) {
								echo '<th class="' . ( $row[$i]->display() ? '' : 'papi-hide' ) . '">';
								echo sprintf(
									'<label for="%s">%s</label>',
									esc_attr( $this->html_id( $row[$i], $this->counter ) ),
									esc_html( $row[$i]->title )
								);
								echo '</th>';
							}
						}
						echo '</thead>';
					endif;

					echo '<tbody>';

					if ( $render_layout === 'table' ):
						echo '<tr>';
					endif;

					for ( $i = 0, $l = count( $row ); $i < $l; $i ++ ) {
						// Don't show the property if it's disabled.
						if ( $row[$i]->disabled() ) {
							continue;
						}

						$render_property = clone $row[$i]->get_options();
						$value_slug      = $row[$i]->get_slug( true );

						if ( $has_value ) {
							if ( array_key_exists( $value_slug, $value ) ) {
								$render_property->value = $value[$value_slug];
							} else {
								if ( array_key_exists( $row[$i]->get_slug(), $value ) ) {
									$render_property->value = $row[$i]->default_value;
								} else {
									continue;
								}
							}
						}

						$render_property->slug = $this->html_name(
							$render_property,
							$this->counter
						);
						$render_property->raw  = $render_layout === 'table';

						if ( $render_layout === 'table' ) {
							echo '<td class="' . ( $row[$i]->display() ? '' : 'papi-hide' ) . '">';
						} else if ( $i === 0 && ! empty( $layout['row_label'] ) && isset( $layout['show_label'] ) && $layout['show_label'] ) {
							// flexible label row layout
							echo sprintf( '<label class="flexible-row-label">%s</label>', esc_html( $layout['row_label'] ) );
						}

						papi_render_property( $render_property );

						if ( $render_layout === 'table' ) {
							echo '</td>';
						}
					}

					if ( $render_layout === 'table' ):
						echo '</tr>';
					endif;

					echo '</tbody>';
					?>
				</table>
			</div>
			<div class="repeater-content-closed">
				<?php
				if ( ! empty( $layout['title'] ) ) {
					echo esc_html( $layout['title'] );
				}
				?>
			</div>
		</td>
		<?php
	}
protected function render_properties( $row, $value ) {
		$has_value     = $value !== false;
		$render_layout = $this->get_setting( 'layout' );
		$layout_slug   = isset( $row['slug'] ) ? $row['slug'] : false;
		$layout_slug   = empty( $layout_slug ) && isset( $value['_layout'] ) ? $value['_layout'] : $layout_slug;
		$layout_slug   = empty( $layout_slug ) && isset( $value[$this->layout_key] ) ? $value[$this->layout_key] : $layout_slug;
		$row           = isset( $row['items'] ) ? $row['items'] : $row;
		$layout        = $this->get_layout( $layout_slug );

		// Render one hidden input for layout slug.
		$this->render_layout_input( $layout_slug );
		?>
		<td class="repeater-column flexible-column <?php echo $render_layout === 'table' ? 'flexible-layout-table' : 'flexible-layout-row'; ?>">
			<div class="repeater-content-open">
				<?php // flexible label table layout ?>
				<?php if ( $render_layout === 'table' && ! empty( $layout['row_label'] ) && isset( $layout['show_label'] ) && $layout['show_label'] ): ?>
					<label class="flexible-row-label"><?php echo esc_html( $layout['row_label'] ); ?></label>
				<?php endif; ?>
				<table class="<?php echo $render_layout === 'table' ? 'flexible-table' : 'papi-table'; ?>">
					<?php
					if ( $render_layout === 'table' ):
						echo '<thead>';
						for ( $i = 0, $l = count( $row ); $i < $l; $i ++ ) {
							// Don't show the property if it's disabled.
							if ( $row[$i]->disabled() ) {
								continue;
							}

							if ( $row[$i]->sidebar ) {
								echo '<th class="' . ( $row[$i]->display() ? '' : 'papi-hide' ) . '">';
								echo sprintf(
									'<label for="%s">%s</label>',
									esc_attr( $this->html_id( $row[$i], $this->counter ) ),
									esc_html( $row[$i]->title )
								);
								echo '</th>';
							}
						}
						echo '</thead>';
					endif;

					echo '<tbody>';

					if ( $render_layout === 'table' ):
						echo '<tr>';
					endif;

					for ( $i = 0, $l = count( $row ); $i < $l; $i ++ ) {
						// Don't show the property if it's disabled.
						if ( $row[$i]->disabled() ) {
							continue;
						}

						$render_property = clone $row[$i]->get_options();
						$value_slug      = $row[$i]->get_slug( true );

						if ( $has_value ) {
							if ( array_key_exists( $value_slug, $value ) ) {
								$render_property->value = $value[$value_slug];
							} else {
								if ( array_key_exists( $row[$i]->get_slug(), $value ) ) {
									$render_property->value = $row[$i]->default_value;
								} else {
									continue;
								}
							}
						}

						$render_property->slug = $this->html_name(
							$render_property,
							$this->counter
						);
						$render_property->raw  = $render_layout === 'table';

						if ( $render_layout === 'table' ) {
							echo '<td class="' . ( $row[$i]->display() ? '' : 'papi-hide' ) . '">';
						} else if ( $i === 0 && ! empty( $layout['row_label'] ) && isset( $layout['show_label'] ) && $layout['show_label'] ) {
							// flexible label row layout
							echo sprintf( '<label class="flexible-row-label">%s</label>', esc_html( $layout['row_label'] ) );
						}

						papi_render_property( $render_property );

						if ( $render_layout === 'table' ) {
							echo '</td>';
						}
					}

					if ( $render_layout === 'table' ):
						echo '</tr>';
					endif;

					echo '</tbody>';
					?>
				</table>
			</div>
			<div class="repeater-content-closed">
				<?php
				if ( ! empty( $layout['title'] ) ) {
					echo esc_html( $layout['title'] );
				}
				?>
			</div>
		</td>
		<?php
	}
Render properties.

@param array      $row
@param array|bool $value