src/properties/class-papi-property-checkbox.php
public function html() {
		$settings = $this->get_settings();
		$value    = papi_cast_string_value( $this->get_value() );

		// Override selected setting with
		// database value if not empty.
		if ( ! papi_is_empty( $value ) ) {
			$settings->selected = $value;
		}

		$settings->selected = papi_to_array( $settings->selected );

		echo '<div class="papi-property-checkbox">';

		foreach ( $settings->items as $key => $value ) {
			$key = is_numeric( $key ) ? $value : $key;

			papi_render_html_tag( 'p', [
				papi_html_tag( 'label', [
					'class' => 'light',
					'for'   => esc_attr( $this->html_id( $key ) ),

					papi_html_tag( 'input', [
						'id'      => esc_attr( $this->html_id( $key ) ),
						'name'    => esc_attr( $this->html_name() ) . '[]',
						'type'    => 'hidden'
					] ),

					papi_html_tag( 'input', [
						'checked' => in_array( $value, $settings->selected, true ),
						'id'      => esc_attr( $this->html_id( $key ) ),
						'name'    => esc_attr( $this->html_name() ) . '[]',
						'type'    => 'checkbox',
						'value'   => esc_attr( $value )
					] ),

					esc_html( papi_convert_to_string( $key ) )
				] )
			] );
		}

		echo '</div>';
	}
public function html() {
		$settings = $this->get_settings();
		$value    = papi_cast_string_value( $this->get_value() );

		// Override selected setting with
		// database value if not empty.
		if ( ! papi_is_empty( $value ) ) {
			$settings->selected = $value;
		}

		$settings->selected = papi_to_array( $settings->selected );

		echo '<div class="papi-property-checkbox">';

		foreach ( $settings->items as $key => $value ) {
			$key = is_numeric( $key ) ? $value : $key;

			papi_render_html_tag( 'p', [
				papi_html_tag( 'label', [
					'class' => 'light',
					'for'   => esc_attr( $this->html_id( $key ) ),

					papi_html_tag( 'input', [
						'id'      => esc_attr( $this->html_id( $key ) ),
						'name'    => esc_attr( $this->html_name() ) . '[]',
						'type'    => 'hidden'
					] ),

					papi_html_tag( 'input', [
						'checked' => in_array( $value, $settings->selected, true ),
						'id'      => esc_attr( $this->html_id( $key ) ),
						'name'    => esc_attr( $this->html_name() ) . '[]',
						'type'    => 'checkbox',
						'value'   => esc_attr( $value )
					] ),

					esc_html( papi_convert_to_string( $key ) )
				] )
			] );
		}

		echo '</div>';
	}
Render property html.