Noptin_Form::convert_classic_vars( $data )

Converts classic form variables.


Source Source

File: includes/class-noptin-form.php

	public function convert_classic_vars( $data ) {

		// Convert the borders.
		if ( empty( $data['formBorder'] ) || ! is_array( $data['formBorder'] ) ) {
			$data['formBorder'] = array(
				'style'         => 'solid',
				'border_radius' => intval( $data['formRadius'] ),
				'border_width'  => intval( $data['borderSize'] ),
				'border_color'  => $data['noptinFormBorderColor'],
			);

			extract( $data['formBorder'] );
			$data['formBorder']['generated'] = "border-style: solid; border-radius: {$border_radius}px; border-width: {$border_width}px; border-color: {$border_color};";
		}

		// Image position.
		if ( empty( $data['imageMainPos'] ) ) {
			$data['imageMainPos'] = 'right';
		}

		if ( empty( $data['imageMain'] ) ) {
			$data['imageMain'] = '';
		}

		if ( ! empty( $data['showPostTypes'] ) ) {
			$data['showPlaces']    = array_unique( array_merge( $data['showPlaces'], $data['showPostTypes'] ) );
			$data['showPostTypes'] = array();
		}

		return $data;
	}


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation