astra_responsive_spacing( array $option, string $side = '', string $device = 'desktop', string $default = '', string $prefix = '' )
Get Spacing value
Description
Parameters
- $option
-
(array) (Required) CSS value.
- $side
-
(string) (Optional) top | bottom | left | right.
Default value: ''
- $device
-
(string) (Optional) CSS device.
Default value: 'desktop'
- $default
-
(string) (Optional) Default value.
Default value: ''
- $prefix
-
(string) (Optional) Prefix value.
Default value: ''
Return
(mixed)
Source
File: inc/core/common-functions.php
function astra_responsive_spacing( $option, $side = '', $device = 'desktop', $default = '', $prefix = '' ) { if ( isset( $option[ $device ][ $side ] ) && isset( $option[ $device . '-unit' ] ) ) { $spacing = astra_get_css_value( $option[ $device ][ $side ], $option[ $device . '-unit' ], $default ); } elseif ( is_numeric( $option ) ) { $spacing = astra_get_css_value( $option ); } else { $spacing = ( ! is_array( $option ) ) ? $option : ''; } if ( '' !== $prefix && '' !== $spacing ) { return $prefix . $spacing; } return $spacing; }
Expand full source code Collapse full source code View on Trac