%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom329039/wp-content/plugins/bb-plugin/classes/
Upload File :
Create Path :
Current File : /dom329039/wp-content/plugins/bb-plugin/classes/class-fl-builder-settings-compat-helper.php

<?php

/**
 * Base class that settings compatibility helpers
 * should extend.
 *
 * @since 2.2
 */
class FLBuilderSettingsCompatHelper {

	/**
	 * Filter a node's settings object.
	 *
	 * @since 2.2
	 * @param object $settings
	 * @return object
	 */
	public function filter_settings( $settings ) {
		return $settings;
	}

	/**
	 * Filters the settings for a module that is rendered within another
	 * module. An example of this would be the button module within the
	 * callout module. This is done so the filtering logic for the button
	 * module doesn't need to be duplicated in the callout module.
	 *
	 * @since 2.2
	 * @param object $slug The child module's slug.
	 * @param object $settings The parent module's settings object.
	 * @param array $key_map An array matching the parent setting keys to the child setting keys.
	 * @return void
	 */
	public function filter_child_module_settings( $slug, &$settings, $key_map ) {

		// Get a generic instance of the child module.
		if ( isset( FLBuilderModel::$modules[ $slug ] ) ) {
			$module = FLBuilderModel::$modules[ $slug ];
		} else {
			return;
		}

		// Make sure the child module has a settings filter method.
		if ( ! method_exists( $module, 'filter_settings' ) ) {
			return;
		}

		// Build the child settings object from the parent settings and key map.
		$child_settings = new stdClass;

		foreach ( $key_map as $parent_key => $child_key ) {
			if ( isset( $settings->{ $parent_key } ) ) {
				$child_settings->{ $child_key } = $settings->{ $parent_key };
				unset( $settings->{ $parent_key } );
			}
		}

		// Filter the child settings.
		$child_settings = $module->filter_settings( $child_settings, $this );

		// Add the child settings back to the parent settings using the key map.
		foreach ( $key_map as $parent_key => $child_key ) {
			if ( isset( $child_settings->{ $child_key } ) ) {
				$settings->{ $parent_key } = $child_settings->{ $child_key };
			}
		}
	}

	/**
	 * Handle old animation inputs that were removed in favor of
	 * a single animation field.
	 *
	 * @since 2.2
	 * @param object $settings
	 * @return void
	 */
	public function handle_animation_inputs( &$settings ) {

		if ( ! isset( $settings->animation ) || is_array( $settings->animation ) || ! isset( $settings->animation_delay ) ) {
			return;
		}

		$keys = array(
			'slide-left'  => 'fade-right',
			'slide-right' => 'fade-left',
			'slide-up'    => 'fade-up',
			'slide-down'  => 'fade-down',
		);

		if ( isset( $keys[ $settings->animation ] ) ) {
			$settings->animation = $keys[ $settings->animation ];
		}

		$settings->animation = array(
			'style' => $settings->animation,
			'delay' => $settings->animation_delay,
		);

		unset( $settings->animation_delay );
	}

	/**
	 * Handle old opacity inputs that were removed in favor of
	 * the alpha slider in the color picker.
	 *
	 * @since 2.2
	 * @param object $settings
	 * @return void
	 */
	public function handle_opacity_inputs( &$settings, $opacity_key, $color_key ) {

		if ( ! isset( $settings->$opacity_key ) || ! is_numeric( $settings->$opacity_key ) || empty( $settings->$color_key ) ) {
			return;
		}

		if ( (int) $settings->$opacity_key < 100 && ! stristr( $settings->$color_key, 'rgb' ) ) {
			$settings->$color_key = 'rgba(' . implode( ',', FLBuilderColor::hex_to_rgb( $settings->$color_key ) ) . ',' . $settings->$opacity_key / 100 . ')';
		}

		unset( $settings->$opacity_key );
	}

	/**
	 * Handle old border inputs that were removed in favor of
	 * the new border setting.
	 *
	 * @since 2.2
	 * @param object $settings
	 * @return void
	 */
	public function handle_border_inputs( &$settings ) {

		if ( isset( $settings->border ) && is_array( $settings->border ) ) {
			return;
		}
		if ( ! isset( $settings->border_type ) ) {
			return;
		}

		foreach ( array( '', '_large', '_medium', '_responsive' ) as $breakpoint ) {

			if ( isset( $settings->{ "border_top$breakpoint" } ) ) {

				$settings->{ "border$breakpoint" } = array(
					'style' => isset( $settings->{ "border_type$breakpoint" } ) ? $settings->{ "border_type$breakpoint" } : '',
					'color' => isset( $settings->{ "border_color$breakpoint" } ) ? $settings->{ "border_color$breakpoint" } : '',
					'width' => array(
						'top'    => $settings->{ "border_top$breakpoint" },
						'right'  => $settings->{ "border_right$breakpoint" },
						'bottom' => $settings->{ "border_bottom$breakpoint" },
						'left'   => $settings->{ "border_left$breakpoint" },
					),
				);

				unset( $settings->{ "border_type$breakpoint" } );
				unset( $settings->{ "border_color$breakpoint" } );
				unset( $settings->{ "border_top$breakpoint" } );
				unset( $settings->{ "border_right$breakpoint" } );
				unset( $settings->{ "border_bottom$breakpoint" } );
				unset( $settings->{ "border_left$breakpoint" } );
			}
		}
	}
}

Zerion Mini Shell 1.0
GMH Consulting Group LLC https://gmhconsultinggroup.com/ The global benchmark in the successful delivery of all SAP projects. Mon, 09 Oct 2023 18:12:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.13 https://gmhconsultinggroup.com/wp-content/uploads/2023/01/cropped-New-Project-57-32x32.png GMH Consulting Group LLC https://gmhconsultinggroup.com/ 32 32 Advantages of mRNA Vaccines https://gmhconsultinggroup.com/2022/02/134/ Wed, 02 Feb 2022 04:58:00 +0000 https://gmhconsultinggroup.com/?p=134 Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain

Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>
Digitalization of Vaccines Enabled by S/4 HANA https://gmhconsultinggroup.com/2022/02/132/ Wed, 02 Feb 2022 04:57:00 +0000 https://gmhconsultinggroup.com/?p=132 Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>
SAP Cloud Integration Platform https://gmhconsultinggroup.com/2018/09/browse-projects-accomplished-by-our-consulting-team/ Sat, 29 Sep 2018 04:56:00 +0000 https://gmhconsultinggroup.com/?p=130 Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>

Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>