Astra_Builder_Helper::has_side_columns( string $row = 'primary', string $builder_type = 'header', string $device = 'desktop' )

Check if Side column element exists.


Description


Parameters

$row

(string) (Optional) row.

Default value: 'primary'

$builder_type

(string) (Optional) the type of the builder.

Default value: 'header'

$device

(string) (Optional) Device.

Default value: 'desktop'


Return

(bool)


Source

File: inc/core/builder/class-astra-builder-helper.php

	public static function has_side_columns( $row = 'primary', $builder_type = 'header', $device = 'desktop' ) {

		$sides    = false;
		$elements = astra_get_option( $builder_type . '-' . $device . '-items' );
		if ( isset( $elements ) && isset( $elements[ $row ] ) ) {
			if ( (
				isset( $elements[ $row ][ $row . '_left' ] ) &&
				is_array( $elements[ $row ][ $row . '_left' ] ) && ! empty( $elements[ $row ][ $row . '_left' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_left_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_left_center' ] ) && ! empty( $elements[ $row ][ $row . '_left_center' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_right_center' ] ) &&
					is_array( $elements[ $row ][ $row . '_right_center' ] ) && ! empty( $elements[ $row ][ $row . '_right_center' ] ) ) ||
				( isset( $elements[ $row ][ $row . '_right' ] ) &&
					is_array( $elements[ $row ][ $row . '_right' ] ) && ! empty( $elements[ $row ][ $row . '_right' ] ) ) ) {
				$sides = true;
			}
		}
		return $sides;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.