MP_Widgets::style_content_widget()

Styles for content widget.

Contents


Source Source

File: mortgage-platform/Inc/MP_Widgets.php

	public static function style_content_widget() {

		$contact_widget_style       = get_option( MortgagePlatform::$prefix . 'contact' )['style_widget'];
		$contact_widget_orientation = get_option( MortgagePlatform::$prefix . 'contact' )['orientation_widget'];
		$contact_widget_position    = get_option( MortgagePlatform::$prefix . 'contact' )['position_widget'];

		if ( 'vertical' === $contact_widget_orientation ) {
			?>
			<style>
				.contact-widget-container {
					flex-direction: column;
				}
				.contact-widget-item{
					margin: 5px;
				}
			</style>
			<?php
		}
		switch ( $contact_widget_style ) {
			case 'style1':
				?>
				<style>

				</style>
				<?php
				break;
			case 'style2':
				?>
				<style>

				</style>
				<?php
				break;

			default:
				?>
				<style>

				</style>
				<?php
				break;
		}

		switch ( $contact_widget_position ) {
			case 'bottomleft':
				?>
				<style>
					.contact-widget-container {
						bottom: 0;
						left: 0;
					}
					.contact-widget-form {
						bottom: 55px;
						left: 20px;
					}
				</style>
				<?php
				break;
			case 'bottomright':
				?>
				<style>
					.contact-widget-container {
						bottom: 0;
						right: 0;
					}
					.contact-widget-form {
						bottom: 55px;
						right: 20px;
					}
				</style>
				<?php
				break;
			case 'left':
				?>
				<style>
					.contact-widget-container {
						bottom: 50%;
						left: 0;
					}
					.contact-widget-form {
						bottom: calc( 50% + 35px);
						left: 40px;
					}
				</style>
				<?php
				break;
			case 'right':
				?>
				<style>
					.contact-widget-container {
						bottom: 50%;
						right: 0;
					}
					.contact-widget-form {
						bottom: calc( 50% + 35px);
						right: 40px;
					}
				</style>
				<?php
				break;

			default:
				?>
				<style>
					.contact-widget-container {
						bottom: 0;
						right: 0;
					}
				</style>
				<?php
				break;
		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.