Passed
Push — master ( b5d6c7...020c1f )
by Stiofan
06:03
created
vendor/ayecode/wp-super-duper/sd-functions.php 1 patch
Indentation   +2490 added lines, -2490 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@  discard block
 block discarded – undo
11 11
  * @return mixed|void
12 12
  */
13 13
 function sd_pagenow_exclude() {
14
-	return apply_filters(
15
-		'sd_pagenow_exclude',
16
-		array(
17
-			'upload.php',
18
-			'edit-comments.php',
19
-			'edit-tags.php',
20
-			'index.php',
21
-			'media-new.php',
22
-			'options-discussion.php',
23
-			'options-writing.php',
24
-			'edit.php',
25
-			'themes.php',
26
-			'users.php',
27
-		)
28
-	);
14
+    return apply_filters(
15
+        'sd_pagenow_exclude',
16
+        array(
17
+            'upload.php',
18
+            'edit-comments.php',
19
+            'edit-tags.php',
20
+            'index.php',
21
+            'media-new.php',
22
+            'options-discussion.php',
23
+            'options-writing.php',
24
+            'edit.php',
25
+            'themes.php',
26
+            'users.php',
27
+        )
28
+    );
29 29
 }
30 30
 
31 31
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
  * @return mixed|void
38 38
  */
39 39
 function sd_widget_exclude() {
40
-	return apply_filters( 'sd_widget_exclude', array() );
40
+    return apply_filters( 'sd_widget_exclude', array() );
41 41
 }
42 42
 
43 43
 
@@ -50,83 +50,83 @@  discard block
 block discarded – undo
50 50
  * @return array
51 51
  */
52 52
 function sd_get_margin_input( $type = 'mt', $overwrite = array(), $include_negatives = true ) {
53
-	global $aui_bs5;
54
-	$options = array(
55
-		''     => __( 'None', 'ayecode-connect' ),
56
-		'auto' => __( 'auto', 'ayecode-connect' ),
57
-		'0'    => '0',
58
-		'1'    => '1',
59
-		'2'    => '2',
60
-		'3'    => '3',
61
-		'4'    => '4',
62
-		'5'    => '5',
63
-		'6'    => '6',
64
-		'7'    => '7',
65
-		'8'    => '8',
66
-		'9'    => '9',
67
-		'10'   => '10',
68
-		'11'   => '11',
69
-		'12'   => '12',
70
-	);
71
-
72
-	if ( $include_negatives ) {
73
-		$options['n1']  = '-1';
74
-		$options['n2']  = '-2';
75
-		$options['n3']  = '-3';
76
-		$options['n4']  = '-4';
77
-		$options['n5']  = '-5';
78
-		$options['n6']  = '-6';
79
-		$options['n7']  = '-7';
80
-		$options['n8']  = '-8';
81
-		$options['n9']  = '-9';
82
-		$options['n10'] = '-10';
83
-		$options['n11'] = '-11';
84
-		$options['n12'] = '-12';
85
-	}
86
-
87
-	$defaults = array(
88
-		'type'     => 'select',
89
-		'title'    => __( 'Margin top', 'ayecode-connect' ),
90
-		'options'  => $options,
91
-		'default'  => '',
92
-		'desc_tip' => true,
93
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
94
-	);
95
-
96
-	// title
97
-	if ( $type == 'mt' ) {
98
-		$defaults['title'] = __( 'Margin top', 'ayecode-connect' );
99
-		$defaults['icon']  = 'box-top';
100
-		$defaults['row']   = array(
101
-			'title' => __( 'Margins', 'ayecode-connect' ),
102
-			'key'   => 'wrapper-margins',
103
-			'open'  => true,
104
-			'class' => 'text-center',
105
-		);
106
-	} elseif ( $type == 'mr' ) {
107
-		$defaults['title'] = __( 'Margin right', 'ayecode-connect' );
108
-		$defaults['icon']  = 'box-right';
109
-		$defaults['row']   = array(
110
-			'key' => 'wrapper-margins',
111
-		);
112
-	} elseif ( $type == 'mb' ) {
113
-		$defaults['title'] = __( 'Margin bottom', 'ayecode-connect' );
114
-		$defaults['icon']  = 'box-bottom';
115
-		$defaults['row']   = array(
116
-			'key' => 'wrapper-margins',
117
-		);
118
-	} elseif ( $type == 'ml' ) {
119
-		$defaults['title'] = __( 'Margin left', 'ayecode-connect' );
120
-		$defaults['icon']  = 'box-left';
121
-		$defaults['row']   = array(
122
-			'key'   => 'wrapper-margins',
123
-			'close' => true,
124
-		);
125
-	}
126
-
127
-	$input = wp_parse_args( $overwrite, $defaults );
128
-
129
-	return $input;
53
+    global $aui_bs5;
54
+    $options = array(
55
+        ''     => __( 'None', 'ayecode-connect' ),
56
+        'auto' => __( 'auto', 'ayecode-connect' ),
57
+        '0'    => '0',
58
+        '1'    => '1',
59
+        '2'    => '2',
60
+        '3'    => '3',
61
+        '4'    => '4',
62
+        '5'    => '5',
63
+        '6'    => '6',
64
+        '7'    => '7',
65
+        '8'    => '8',
66
+        '9'    => '9',
67
+        '10'   => '10',
68
+        '11'   => '11',
69
+        '12'   => '12',
70
+    );
71
+
72
+    if ( $include_negatives ) {
73
+        $options['n1']  = '-1';
74
+        $options['n2']  = '-2';
75
+        $options['n3']  = '-3';
76
+        $options['n4']  = '-4';
77
+        $options['n5']  = '-5';
78
+        $options['n6']  = '-6';
79
+        $options['n7']  = '-7';
80
+        $options['n8']  = '-8';
81
+        $options['n9']  = '-9';
82
+        $options['n10'] = '-10';
83
+        $options['n11'] = '-11';
84
+        $options['n12'] = '-12';
85
+    }
86
+
87
+    $defaults = array(
88
+        'type'     => 'select',
89
+        'title'    => __( 'Margin top', 'ayecode-connect' ),
90
+        'options'  => $options,
91
+        'default'  => '',
92
+        'desc_tip' => true,
93
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
94
+    );
95
+
96
+    // title
97
+    if ( $type == 'mt' ) {
98
+        $defaults['title'] = __( 'Margin top', 'ayecode-connect' );
99
+        $defaults['icon']  = 'box-top';
100
+        $defaults['row']   = array(
101
+            'title' => __( 'Margins', 'ayecode-connect' ),
102
+            'key'   => 'wrapper-margins',
103
+            'open'  => true,
104
+            'class' => 'text-center',
105
+        );
106
+    } elseif ( $type == 'mr' ) {
107
+        $defaults['title'] = __( 'Margin right', 'ayecode-connect' );
108
+        $defaults['icon']  = 'box-right';
109
+        $defaults['row']   = array(
110
+            'key' => 'wrapper-margins',
111
+        );
112
+    } elseif ( $type == 'mb' ) {
113
+        $defaults['title'] = __( 'Margin bottom', 'ayecode-connect' );
114
+        $defaults['icon']  = 'box-bottom';
115
+        $defaults['row']   = array(
116
+            'key' => 'wrapper-margins',
117
+        );
118
+    } elseif ( $type == 'ml' ) {
119
+        $defaults['title'] = __( 'Margin left', 'ayecode-connect' );
120
+        $defaults['icon']  = 'box-left';
121
+        $defaults['row']   = array(
122
+            'key'   => 'wrapper-margins',
123
+            'close' => true,
124
+        );
125
+    }
126
+
127
+    $input = wp_parse_args( $overwrite, $defaults );
128
+
129
+    return $input;
130 130
 }
131 131
 
132 132
 /**
@@ -138,67 +138,67 @@  discard block
 block discarded – undo
138 138
  * @return array
139 139
  */
140 140
 function sd_get_padding_input( $type = 'pt', $overwrite = array() ) {
141
-	$options = array(
142
-		''   => __( 'None', 'ayecode-connect' ),
143
-		'0'  => '0',
144
-		'1'  => '1',
145
-		'2'  => '2',
146
-		'3'  => '3',
147
-		'4'  => '4',
148
-		'5'  => '5',
149
-		'6'  => '6',
150
-		'7'  => '7',
151
-		'8'  => '8',
152
-		'9'  => '9',
153
-		'10' => '10',
154
-		'11' => '11',
155
-		'12' => '12',
156
-	);
157
-
158
-	$defaults = array(
159
-		'type'     => 'select',
160
-		'title'    => __( 'Padding top', 'ayecode-connect' ),
161
-		'options'  => $options,
162
-		'default'  => '',
163
-		'desc_tip' => true,
164
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
165
-	);
166
-
167
-	// title
168
-	if ( $type == 'pt' ) {
169
-		$defaults['title'] = __( 'Padding top', 'ayecode-connect' );
170
-		$defaults['icon']  = 'box-top';
171
-		$defaults['row']   = array(
172
-			'title' => __( 'Padding', 'ayecode-connect' ),
173
-			'key'   => 'wrapper-padding',
174
-			'open'  => true,
175
-			'class' => 'text-center',
176
-		);
177
-	} elseif ( $type == 'pr' ) {
178
-		$defaults['title'] = __( 'Padding right', 'ayecode-connect' );
179
-		$defaults['icon']  = 'box-right';
180
-		$defaults['row']   = array(
181
-			'key' => 'wrapper-padding',
182
-		);
183
-	} elseif ( $type == 'pb' ) {
184
-		$defaults['title'] = __( 'Padding bottom', 'ayecode-connect' );
185
-		$defaults['icon']  = 'box-bottom';
186
-		$defaults['row']   = array(
187
-			'key' => 'wrapper-padding',
188
-		);
189
-	} elseif ( $type == 'pl' ) {
190
-		$defaults['title'] = __( 'Padding left', 'ayecode-connect' );
191
-		$defaults['icon']  = 'box-left';
192
-		$defaults['row']   = array(
193
-			'key'   => 'wrapper-padding',
194
-			'close' => true,
195
-
196
-		);
197
-	}
198
-
199
-	$input = wp_parse_args( $overwrite, $defaults );
200
-
201
-	return $input;
141
+    $options = array(
142
+        ''   => __( 'None', 'ayecode-connect' ),
143
+        '0'  => '0',
144
+        '1'  => '1',
145
+        '2'  => '2',
146
+        '3'  => '3',
147
+        '4'  => '4',
148
+        '5'  => '5',
149
+        '6'  => '6',
150
+        '7'  => '7',
151
+        '8'  => '8',
152
+        '9'  => '9',
153
+        '10' => '10',
154
+        '11' => '11',
155
+        '12' => '12',
156
+    );
157
+
158
+    $defaults = array(
159
+        'type'     => 'select',
160
+        'title'    => __( 'Padding top', 'ayecode-connect' ),
161
+        'options'  => $options,
162
+        'default'  => '',
163
+        'desc_tip' => true,
164
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
165
+    );
166
+
167
+    // title
168
+    if ( $type == 'pt' ) {
169
+        $defaults['title'] = __( 'Padding top', 'ayecode-connect' );
170
+        $defaults['icon']  = 'box-top';
171
+        $defaults['row']   = array(
172
+            'title' => __( 'Padding', 'ayecode-connect' ),
173
+            'key'   => 'wrapper-padding',
174
+            'open'  => true,
175
+            'class' => 'text-center',
176
+        );
177
+    } elseif ( $type == 'pr' ) {
178
+        $defaults['title'] = __( 'Padding right', 'ayecode-connect' );
179
+        $defaults['icon']  = 'box-right';
180
+        $defaults['row']   = array(
181
+            'key' => 'wrapper-padding',
182
+        );
183
+    } elseif ( $type == 'pb' ) {
184
+        $defaults['title'] = __( 'Padding bottom', 'ayecode-connect' );
185
+        $defaults['icon']  = 'box-bottom';
186
+        $defaults['row']   = array(
187
+            'key' => 'wrapper-padding',
188
+        );
189
+    } elseif ( $type == 'pl' ) {
190
+        $defaults['title'] = __( 'Padding left', 'ayecode-connect' );
191
+        $defaults['icon']  = 'box-left';
192
+        $defaults['row']   = array(
193
+            'key'   => 'wrapper-padding',
194
+            'close' => true,
195
+
196
+        );
197
+    }
198
+
199
+    $input = wp_parse_args( $overwrite, $defaults );
200
+
201
+    return $input;
202 202
 }
203 203
 
204 204
 /**
@@ -210,97 +210,97 @@  discard block
 block discarded – undo
210 210
  * @return array
211 211
  */
212 212
 function sd_get_border_input( $type = 'border', $overwrite = array() ) {
213
-	global $aui_bs5;
214
-
215
-	$defaults = array(
216
-		'type'     => 'select',
217
-		'title'    => __( 'Border', 'ayecode-connect' ),
218
-		'options'  => array(),
219
-		'default'  => '',
220
-		'desc_tip' => true,
221
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
222
-	);
223
-
224
-	// title
225
-	if ( 'rounded' === $type ) {
226
-		$defaults['title']           = __( 'Border radius type', 'ayecode-connect' );
227
-		$defaults['options']         = array(
228
-			''               => __( 'Default', 'ayecode-connect' ),
229
-			'rounded'        => 'rounded',
230
-			'rounded-top'    => 'rounded-top',
231
-			'rounded-right'  => 'rounded-right',
232
-			'rounded-bottom' => 'rounded-bottom',
233
-			'rounded-left'   => 'rounded-left',
234
-		);
235
-		$defaults['element_require'] = '[%border%]';
236
-	} elseif ( 'rounded_size' === $type ) {
237
-		$defaults['title'] = __( 'Border radius size', 'ayecode-connect' );
238
-
239
-		if ( $aui_bs5 ) {
240
-			$defaults['options'] = array(
241
-				''       => __( 'Default', 'ayecode-connect' ),
242
-				'0'      => '0',
243
-				'1'      => '1',
244
-				'2'      => '2',
245
-				'3'      => '3',
246
-				'4'      => '4',
247
-				'circle' => 'circle',
248
-				'pill'   => 'pill',
249
-			);
250
-		} else {
251
-			$defaults['options'] = array(
252
-				''   => __( 'Default', 'ayecode-connect' ),
253
-				'sm' => __( 'Small', 'ayecode-connect' ),
254
-				'lg' => __( 'Large', 'ayecode-connect' ),
255
-			);
256
-		}
257
-		$defaults['element_require'] = '[%border%]';
258
-	} elseif ( 'width' === $type ) { // BS%
259
-		$defaults['title']           = __( 'Border width', 'ayecode-connect' );
260
-		$defaults['options']         = array(
261
-			''         => __( 'Default', 'ayecode-connect' ),
262
-			'border-2' => '2',
263
-			'border-3' => '3',
264
-			'border-4' => '4',
265
-			'border-5' => '5',
266
-		);
267
-		$defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
268
-	} elseif ( 'opacity' === $type ) { // BS%
269
-		$defaults['title']           = __( 'Border opacity', 'ayecode-connect' );
270
-		$defaults['options']         = array(
271
-			''                  => __( 'Default', 'ayecode-connect' ),
272
-			'border-opacity-75' => '75%',
273
-			'border-opacity-50' => '50%',
274
-			'border-opacity-25' => '25%',
275
-			'border-opacity-10' => '10%',
276
-		);
277
-		$defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
278
-	} elseif ( 'type' === $type ) {
279
-		$defaults['title']           = __( 'Border show', 'ayecode-connect' );
280
-		$defaults['options']         = array(
281
-			'border'          => __( 'Full (set color to show)', 'ayecode-connect' ),
282
-			'border-top'      => __( 'Top', 'ayecode-connect' ),
283
-			'border-bottom'   => __( 'Bottom', 'ayecode-connect' ),
284
-			'border-left'     => __( 'Left', 'ayecode-connect' ),
285
-			'border-right'    => __( 'Right', 'ayecode-connect' ),
286
-			'border-top-0'    => __( '-Top', 'ayecode-connect' ),
287
-			'border-bottom-0' => __( '-Bottom', 'ayecode-connect' ),
288
-			'border-left-0'   => __( '-Left', 'ayecode-connect' ),
289
-			'border-right-0'  => __( '-Right', 'ayecode-connect' ),
290
-		);
291
-		$defaults['element_require'] = '[%border%]';
292
-
293
-	} else {
294
-		$defaults['title']   = __( 'Border color', 'ayecode-connect' );
295
-		$defaults['options'] = array(
296
-			                       ''  => __( 'Default', 'ayecode-connect' ),
297
-			                       '0' => __( 'None', 'ayecode-connect' ),
298
-		                       ) + sd_aui_colors();
299
-	}
300
-
301
-	$input = wp_parse_args( $overwrite, $defaults );
302
-
303
-	return $input;
213
+    global $aui_bs5;
214
+
215
+    $defaults = array(
216
+        'type'     => 'select',
217
+        'title'    => __( 'Border', 'ayecode-connect' ),
218
+        'options'  => array(),
219
+        'default'  => '',
220
+        'desc_tip' => true,
221
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
222
+    );
223
+
224
+    // title
225
+    if ( 'rounded' === $type ) {
226
+        $defaults['title']           = __( 'Border radius type', 'ayecode-connect' );
227
+        $defaults['options']         = array(
228
+            ''               => __( 'Default', 'ayecode-connect' ),
229
+            'rounded'        => 'rounded',
230
+            'rounded-top'    => 'rounded-top',
231
+            'rounded-right'  => 'rounded-right',
232
+            'rounded-bottom' => 'rounded-bottom',
233
+            'rounded-left'   => 'rounded-left',
234
+        );
235
+        $defaults['element_require'] = '[%border%]';
236
+    } elseif ( 'rounded_size' === $type ) {
237
+        $defaults['title'] = __( 'Border radius size', 'ayecode-connect' );
238
+
239
+        if ( $aui_bs5 ) {
240
+            $defaults['options'] = array(
241
+                ''       => __( 'Default', 'ayecode-connect' ),
242
+                '0'      => '0',
243
+                '1'      => '1',
244
+                '2'      => '2',
245
+                '3'      => '3',
246
+                '4'      => '4',
247
+                'circle' => 'circle',
248
+                'pill'   => 'pill',
249
+            );
250
+        } else {
251
+            $defaults['options'] = array(
252
+                ''   => __( 'Default', 'ayecode-connect' ),
253
+                'sm' => __( 'Small', 'ayecode-connect' ),
254
+                'lg' => __( 'Large', 'ayecode-connect' ),
255
+            );
256
+        }
257
+        $defaults['element_require'] = '[%border%]';
258
+    } elseif ( 'width' === $type ) { // BS%
259
+        $defaults['title']           = __( 'Border width', 'ayecode-connect' );
260
+        $defaults['options']         = array(
261
+            ''         => __( 'Default', 'ayecode-connect' ),
262
+            'border-2' => '2',
263
+            'border-3' => '3',
264
+            'border-4' => '4',
265
+            'border-5' => '5',
266
+        );
267
+        $defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
268
+    } elseif ( 'opacity' === $type ) { // BS%
269
+        $defaults['title']           = __( 'Border opacity', 'ayecode-connect' );
270
+        $defaults['options']         = array(
271
+            ''                  => __( 'Default', 'ayecode-connect' ),
272
+            'border-opacity-75' => '75%',
273
+            'border-opacity-50' => '50%',
274
+            'border-opacity-25' => '25%',
275
+            'border-opacity-10' => '10%',
276
+        );
277
+        $defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
278
+    } elseif ( 'type' === $type ) {
279
+        $defaults['title']           = __( 'Border show', 'ayecode-connect' );
280
+        $defaults['options']         = array(
281
+            'border'          => __( 'Full (set color to show)', 'ayecode-connect' ),
282
+            'border-top'      => __( 'Top', 'ayecode-connect' ),
283
+            'border-bottom'   => __( 'Bottom', 'ayecode-connect' ),
284
+            'border-left'     => __( 'Left', 'ayecode-connect' ),
285
+            'border-right'    => __( 'Right', 'ayecode-connect' ),
286
+            'border-top-0'    => __( '-Top', 'ayecode-connect' ),
287
+            'border-bottom-0' => __( '-Bottom', 'ayecode-connect' ),
288
+            'border-left-0'   => __( '-Left', 'ayecode-connect' ),
289
+            'border-right-0'  => __( '-Right', 'ayecode-connect' ),
290
+        );
291
+        $defaults['element_require'] = '[%border%]';
292
+
293
+    } else {
294
+        $defaults['title']   = __( 'Border color', 'ayecode-connect' );
295
+        $defaults['options'] = array(
296
+                                    ''  => __( 'Default', 'ayecode-connect' ),
297
+                                    '0' => __( 'None', 'ayecode-connect' ),
298
+                                ) + sd_aui_colors();
299
+    }
300
+
301
+    $input = wp_parse_args( $overwrite, $defaults );
302
+
303
+    return $input;
304 304
 }
305 305
 
306 306
 /**
@@ -312,25 +312,25 @@  discard block
 block discarded – undo
312 312
  * @return array
313 313
  */
314 314
 function sd_get_shadow_input( $type = 'shadow', $overwrite = array() ) {
315
-	$options = array(
316
-		''          => __( 'None', 'ayecode-connect' ),
317
-		'shadow-sm' => __( 'Small', 'ayecode-connect' ),
318
-		'shadow'    => __( 'Regular', 'ayecode-connect' ),
319
-		'shadow-lg' => __( 'Large', 'ayecode-connect' ),
320
-	);
315
+    $options = array(
316
+        ''          => __( 'None', 'ayecode-connect' ),
317
+        'shadow-sm' => __( 'Small', 'ayecode-connect' ),
318
+        'shadow'    => __( 'Regular', 'ayecode-connect' ),
319
+        'shadow-lg' => __( 'Large', 'ayecode-connect' ),
320
+    );
321 321
 
322
-	$defaults = array(
323
-		'type'     => 'select',
324
-		'title'    => __( 'Shadow', 'ayecode-connect' ),
325
-		'options'  => $options,
326
-		'default'  => '',
327
-		'desc_tip' => true,
328
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
329
-	);
322
+    $defaults = array(
323
+        'type'     => 'select',
324
+        'title'    => __( 'Shadow', 'ayecode-connect' ),
325
+        'options'  => $options,
326
+        'default'  => '',
327
+        'desc_tip' => true,
328
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
329
+    );
330 330
 
331
-	$input = wp_parse_args( $overwrite, $defaults );
331
+    $input = wp_parse_args( $overwrite, $defaults );
332 332
 
333
-	return $input;
333
+    return $input;
334 334
 }
335 335
 
336 336
 /**
@@ -342,23 +342,23 @@  discard block
 block discarded – undo
342 342
  * @return array
343 343
  */
344 344
 function sd_get_background_input( $type = 'bg', $overwrite = array() ) {
345
-	$options = array(
346
-		           ''            => __( 'None', 'ayecode-connect' ),
347
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
348
-	           ) + sd_aui_colors();
345
+    $options = array(
346
+                    ''            => __( 'None', 'ayecode-connect' ),
347
+                    'transparent' => __( 'Transparent', 'ayecode-connect' ),
348
+                ) + sd_aui_colors();
349 349
 
350
-	$defaults = array(
351
-		'type'     => 'select',
352
-		'title'    => __( 'Background color', 'ayecode-connect' ),
353
-		'options'  => $options,
354
-		'default'  => '',
355
-		'desc_tip' => true,
356
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
357
-	);
350
+    $defaults = array(
351
+        'type'     => 'select',
352
+        'title'    => __( 'Background color', 'ayecode-connect' ),
353
+        'options'  => $options,
354
+        'default'  => '',
355
+        'desc_tip' => true,
356
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
357
+    );
358 358
 
359
-	$input = wp_parse_args( $overwrite, $defaults );
359
+    $input = wp_parse_args( $overwrite, $defaults );
360 360
 
361
-	return $input;
361
+    return $input;
362 362
 }
363 363
 
364 364
 /**
@@ -370,35 +370,35 @@  discard block
 block discarded – undo
370 370
  * @return array
371 371
  */
372 372
 function sd_get_opacity_input( $type = 'opacity', $overwrite = array() ) {
373
-	$options = array(
374
-		''            => __( 'Default', 'ayecode-connect' ),
375
-		'opacity-10'  => '10%',
376
-		'opacity-15'  => '15%',
377
-		'opacity-25'  => '25%',
378
-		'opacity-35'  => '35%',
379
-		'opacity-40'  => '40%',
380
-		'opacity-50'  => '50%',
381
-		'opacity-60'  => '60%',
382
-		'opacity-65'  => '65%',
383
-		'opacity-70'  => '70%',
384
-		'opacity-75'  => '75%',
385
-		'opacity-80'  => '80%',
386
-		'opacity-90'  => '90%',
387
-		'opacity-100' => '100%',
388
-	);
389
-
390
-	$defaults = array(
391
-		'type'     => 'select',
392
-		'title'    => __( 'Opacity', 'ayecode-connect' ),
393
-		'options'  => $options,
394
-		'default'  => '',
395
-		'desc_tip' => true,
396
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
397
-	);
398
-
399
-	$input = wp_parse_args( $overwrite, $defaults );
400
-
401
-	return $input;
373
+    $options = array(
374
+        ''            => __( 'Default', 'ayecode-connect' ),
375
+        'opacity-10'  => '10%',
376
+        'opacity-15'  => '15%',
377
+        'opacity-25'  => '25%',
378
+        'opacity-35'  => '35%',
379
+        'opacity-40'  => '40%',
380
+        'opacity-50'  => '50%',
381
+        'opacity-60'  => '60%',
382
+        'opacity-65'  => '65%',
383
+        'opacity-70'  => '70%',
384
+        'opacity-75'  => '75%',
385
+        'opacity-80'  => '80%',
386
+        'opacity-90'  => '90%',
387
+        'opacity-100' => '100%',
388
+    );
389
+
390
+    $defaults = array(
391
+        'type'     => 'select',
392
+        'title'    => __( 'Opacity', 'ayecode-connect' ),
393
+        'options'  => $options,
394
+        'default'  => '',
395
+        'desc_tip' => true,
396
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
397
+    );
398
+
399
+    $input = wp_parse_args( $overwrite, $defaults );
400
+
401
+    return $input;
402 402
 }
403 403
 
404 404
 /**
@@ -411,124 +411,124 @@  discard block
 block discarded – undo
411 411
  */
412 412
 function sd_get_background_inputs( $type = 'bg', $overwrite = array(), $overwrite_color = array(), $overwrite_gradient = array(), $overwrite_image = array(), $include_button_colors = false ) {
413 413
 
414
-	$color_options = $include_button_colors ? sd_aui_colors( false, true, true, true ) : sd_aui_colors();
415
-
416
-	$options = array(
417
-		           ''            => __( 'None', 'ayecode-connect' ),
418
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
419
-	           ) + $color_options;
420
-
421
-	if ( false !== $overwrite_color ) {
422
-		$options['custom-color'] = __( 'Custom Color', 'ayecode-connect' );
423
-	}
424
-
425
-	if ( false !== $overwrite_gradient ) {
426
-		$options['custom-gradient'] = __( 'Custom Gradient', 'ayecode-connect' );
427
-	}
428
-
429
-	$defaults = array(
430
-		'type'     => 'select',
431
-		'title'    => __( 'Background Color', 'ayecode-connect' ),
432
-		'options'  => $options,
433
-		'default'  => '',
434
-		'desc_tip' => true,
435
-		'group'    => __( 'Background', 'ayecode-connect' ),
436
-	);
437
-
438
-	if ( $overwrite !== false ) {
439
-		$input[ $type ] = wp_parse_args( $overwrite, $defaults );
440
-	}
441
-
442
-	if ( $overwrite_color !== false ) {
443
-		$input[ $type . '_color' ] = wp_parse_args(
444
-			$overwrite_color,
445
-			array(
446
-				'type'            => 'color',
447
-				'title'           => __( 'Custom color', 'ayecode-connect' ),
448
-				'placeholder'     => '',
449
-				'default'         => '#0073aa',
450
-				'desc_tip'        => true,
451
-				'group'           => __( 'Background', 'ayecode-connect' ),
452
-				'element_require' => '[%' . $type . '%]=="custom-color"',
453
-			)
454
-		);
455
-	}
456
-
457
-	if ( $overwrite_gradient !== false ) {
458
-		$input[ $type . '_gradient' ] = wp_parse_args(
459
-			$overwrite_gradient,
460
-			array(
461
-				'type'            => 'gradient',
462
-				'title'           => __( 'Custom gradient', 'ayecode-connect' ),
463
-				'placeholder'     => '',
464
-				'default'         => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
465
-				'desc_tip'        => true,
466
-				'group'           => __( 'Background', 'ayecode-connect' ),
467
-				'element_require' => '[%' . $type . '%]=="custom-gradient"',
468
-			)
469
-		);
470
-	}
471
-
472
-	if ( $overwrite_image !== false ) {
473
-
474
-		$input[ $type . '_image_fixed' ] = array(
475
-			'type'            => 'checkbox',
476
-			'title'           => __( 'Fixed background', 'ayecode-connect' ),
477
-			'default'         => '',
478
-			'desc_tip'        => true,
479
-			'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
480
-			'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
481
-
482
-		);
483
-
484
-		$input[ $type . '_image_use_featured' ] = array(
485
-			'type'            => 'checkbox',
486
-			'title'           => __( 'Use featured image', 'ayecode-connect' ),
487
-			'default'         => '',
488
-			'desc_tip'        => true,
489
-			'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
490
-			'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
491
-
492
-		);
493
-
494
-		$input[ $type . '_image' ] = wp_parse_args(
495
-			$overwrite_image,
496
-			array(
497
-				'type'        => 'image',
498
-				'title'       => __( 'Custom image', 'ayecode-connect' ),
499
-				'placeholder' => '',
500
-				'default'     => '',
501
-				'desc_tip'    => true,
502
-				'group'       => __( 'Background', 'ayecode-connect' ),
503
-				//          'element_require' => ' ![%' . $type . '_image_use_featured%] '
504
-			)
505
-		);
506
-
507
-		$input[ $type . '_image_id' ] = wp_parse_args(
508
-			$overwrite_image,
509
-			array(
510
-				'type'        => 'hidden',
511
-				'hidden_type' => 'number',
512
-				'title'       => '',
513
-				'placeholder' => '',
514
-				'default'     => '',
515
-				'group'       => __( 'Background', 'ayecode-connect' ),
516
-			)
517
-		);
518
-
519
-		$input[ $type . '_image_xy' ] = wp_parse_args(
520
-			$overwrite_image,
521
-			array(
522
-				'type'        => 'image_xy',
523
-				'title'       => '',
524
-				'placeholder' => '',
525
-				'default'     => '',
526
-				'group'       => __( 'Background', 'ayecode-connect' ),
527
-			)
528
-		);
529
-	}
530
-
531
-	return $input;
414
+    $color_options = $include_button_colors ? sd_aui_colors( false, true, true, true ) : sd_aui_colors();
415
+
416
+    $options = array(
417
+                    ''            => __( 'None', 'ayecode-connect' ),
418
+                    'transparent' => __( 'Transparent', 'ayecode-connect' ),
419
+                ) + $color_options;
420
+
421
+    if ( false !== $overwrite_color ) {
422
+        $options['custom-color'] = __( 'Custom Color', 'ayecode-connect' );
423
+    }
424
+
425
+    if ( false !== $overwrite_gradient ) {
426
+        $options['custom-gradient'] = __( 'Custom Gradient', 'ayecode-connect' );
427
+    }
428
+
429
+    $defaults = array(
430
+        'type'     => 'select',
431
+        'title'    => __( 'Background Color', 'ayecode-connect' ),
432
+        'options'  => $options,
433
+        'default'  => '',
434
+        'desc_tip' => true,
435
+        'group'    => __( 'Background', 'ayecode-connect' ),
436
+    );
437
+
438
+    if ( $overwrite !== false ) {
439
+        $input[ $type ] = wp_parse_args( $overwrite, $defaults );
440
+    }
441
+
442
+    if ( $overwrite_color !== false ) {
443
+        $input[ $type . '_color' ] = wp_parse_args(
444
+            $overwrite_color,
445
+            array(
446
+                'type'            => 'color',
447
+                'title'           => __( 'Custom color', 'ayecode-connect' ),
448
+                'placeholder'     => '',
449
+                'default'         => '#0073aa',
450
+                'desc_tip'        => true,
451
+                'group'           => __( 'Background', 'ayecode-connect' ),
452
+                'element_require' => '[%' . $type . '%]=="custom-color"',
453
+            )
454
+        );
455
+    }
456
+
457
+    if ( $overwrite_gradient !== false ) {
458
+        $input[ $type . '_gradient' ] = wp_parse_args(
459
+            $overwrite_gradient,
460
+            array(
461
+                'type'            => 'gradient',
462
+                'title'           => __( 'Custom gradient', 'ayecode-connect' ),
463
+                'placeholder'     => '',
464
+                'default'         => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
465
+                'desc_tip'        => true,
466
+                'group'           => __( 'Background', 'ayecode-connect' ),
467
+                'element_require' => '[%' . $type . '%]=="custom-gradient"',
468
+            )
469
+        );
470
+    }
471
+
472
+    if ( $overwrite_image !== false ) {
473
+
474
+        $input[ $type . '_image_fixed' ] = array(
475
+            'type'            => 'checkbox',
476
+            'title'           => __( 'Fixed background', 'ayecode-connect' ),
477
+            'default'         => '',
478
+            'desc_tip'        => true,
479
+            'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
480
+            'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
481
+
482
+        );
483
+
484
+        $input[ $type . '_image_use_featured' ] = array(
485
+            'type'            => 'checkbox',
486
+            'title'           => __( 'Use featured image', 'ayecode-connect' ),
487
+            'default'         => '',
488
+            'desc_tip'        => true,
489
+            'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
490
+            'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
491
+
492
+        );
493
+
494
+        $input[ $type . '_image' ] = wp_parse_args(
495
+            $overwrite_image,
496
+            array(
497
+                'type'        => 'image',
498
+                'title'       => __( 'Custom image', 'ayecode-connect' ),
499
+                'placeholder' => '',
500
+                'default'     => '',
501
+                'desc_tip'    => true,
502
+                'group'       => __( 'Background', 'ayecode-connect' ),
503
+                //          'element_require' => ' ![%' . $type . '_image_use_featured%] '
504
+            )
505
+        );
506
+
507
+        $input[ $type . '_image_id' ] = wp_parse_args(
508
+            $overwrite_image,
509
+            array(
510
+                'type'        => 'hidden',
511
+                'hidden_type' => 'number',
512
+                'title'       => '',
513
+                'placeholder' => '',
514
+                'default'     => '',
515
+                'group'       => __( 'Background', 'ayecode-connect' ),
516
+            )
517
+        );
518
+
519
+        $input[ $type . '_image_xy' ] = wp_parse_args(
520
+            $overwrite_image,
521
+            array(
522
+                'type'        => 'image_xy',
523
+                'title'       => '',
524
+                'placeholder' => '',
525
+                'default'     => '',
526
+                'group'       => __( 'Background', 'ayecode-connect' ),
527
+            )
528
+        );
529
+    }
530
+
531
+    return $input;
532 532
 }
533 533
 
534 534
 /**
@@ -541,175 +541,175 @@  discard block
 block discarded – undo
541 541
  */
542 542
 function sd_get_shape_divider_inputs( $type = 'sd', $overwrite = array(), $overwrite_color = array(), $overwrite_gradient = array(), $overwrite_image = array() ) {
543 543
 
544
-	$options = array(
545
-		''                      => __( 'None', 'ayecode-connect' ),
546
-		'mountains'             => __( 'Mountains', 'ayecode-connect' ),
547
-		'drops'                 => __( 'Drops', 'ayecode-connect' ),
548
-		'clouds'                => __( 'Clouds', 'ayecode-connect' ),
549
-		'zigzag'                => __( 'Zigzag', 'ayecode-connect' ),
550
-		'pyramids'              => __( 'Pyramids', 'ayecode-connect' ),
551
-		'triangle'              => __( 'Triangle', 'ayecode-connect' ),
552
-		'triangle-asymmetrical' => __( 'Triangle Asymmetrical', 'ayecode-connect' ),
553
-		'tilt'                  => __( 'Tilt', 'ayecode-connect' ),
554
-		'opacity-tilt'          => __( 'Opacity Tilt', 'ayecode-connect' ),
555
-		'opacity-fan'           => __( 'Opacity Fan', 'ayecode-connect' ),
556
-		'curve'                 => __( 'Curve', 'ayecode-connect' ),
557
-		'curve-asymmetrical'    => __( 'Curve Asymmetrical', 'ayecode-connect' ),
558
-		'waves'                 => __( 'Waves', 'ayecode-connect' ),
559
-		'wave-brush'            => __( 'Wave Brush', 'ayecode-connect' ),
560
-		'waves-pattern'         => __( 'Waves Pattern', 'ayecode-connect' ),
561
-		'arrow'                 => __( 'Arrow', 'ayecode-connect' ),
562
-		'split'                 => __( 'Split', 'ayecode-connect' ),
563
-		'book'                  => __( 'Book', 'ayecode-connect' ),
564
-	);
565
-
566
-	$defaults = array(
567
-		'type'     => 'select',
568
-		'title'    => __( 'Type', 'ayecode-connect' ),
569
-		'options'  => $options,
570
-		'default'  => '',
571
-		'desc_tip' => true,
572
-		'group'    => __( 'Shape Divider', 'ayecode-connect' ),
573
-	);
574
-
575
-	$input[ $type ] = wp_parse_args( $overwrite, $defaults );
576
-
577
-	$input[ $type . '_notice' ] = array(
578
-		'type'            => 'notice',
579
-		'desc'            => __( 'Parent element must be position `relative`', 'ayecode-connect' ),
580
-		'status'          => 'warning',
581
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
582
-		'element_require' => '[%' . $type . '%]!=""',
583
-	);
584
-
585
-	$input[ $type . '_position' ] = wp_parse_args(
586
-		$overwrite_color,
587
-		array(
588
-			'type'            => 'select',
589
-			'title'           => __( 'Position', 'ayecode-connect' ),
590
-			'options'         => array(
591
-				'top'    => __( 'Top', 'ayecode-connect' ),
592
-				'bottom' => __( 'Bottom', 'ayecode-connect' ),
593
-			),
594
-			'desc_tip'        => true,
595
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
596
-			'element_require' => '[%' . $type . '%]!=""',
597
-		)
598
-	);
599
-
600
-	$options = array(
601
-		           ''            => __( 'None', 'ayecode-connect' ),
602
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
603
-	           ) + sd_aui_colors()
604
-	           + array(
605
-		           'custom-color' => __( 'Custom Color', 'ayecode-connect' ),
606
-	           );
607
-
608
-	$input[ $type . '_color' ] = wp_parse_args(
609
-		$overwrite_color,
610
-		array(
611
-			'type'            => 'select',
612
-			'title'           => __( 'Color', 'ayecode-connect' ),
613
-			'options'         => $options,
614
-			'desc_tip'        => true,
615
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
616
-			'element_require' => '[%' . $type . '%]!=""',
617
-		)
618
-	);
619
-
620
-	$input[ $type . '_custom_color' ] = wp_parse_args(
621
-		$overwrite_color,
622
-		array(
623
-			'type'            => 'color',
624
-			'title'           => __( 'Custom color', 'ayecode-connect' ),
625
-			'placeholder'     => '',
626
-			'default'         => '#0073aa',
627
-			'desc_tip'        => true,
628
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
629
-			'element_require' => '[%' . $type . '_color%]=="custom-color" && [%' . $type . '%]!=""',
630
-		)
631
-	);
632
-
633
-	$input[ $type . '_width' ] = wp_parse_args(
634
-		$overwrite_gradient,
635
-		array(
636
-			'type'              => 'range',
637
-			'title'             => __( 'Width', 'ayecode-connect' ),
638
-			'placeholder'       => '',
639
-			'default'           => '200',
640
-			'desc_tip'          => true,
641
-			'custom_attributes' => array(
642
-				'min' => 100,
643
-				'max' => 300,
644
-			),
645
-			'group'             => __( 'Shape Divider', 'ayecode-connect' ),
646
-			'element_require'   => '[%' . $type . '%]!=""',
647
-		)
648
-	);
649
-
650
-	$input[ $type . '_height' ] = array(
651
-		'type'              => 'range',
652
-		'title'             => __( 'Height', 'ayecode-connect' ),
653
-		'default'           => '100',
654
-		'desc_tip'          => true,
655
-		'custom_attributes' => array(
656
-			'min' => 0,
657
-			'max' => 500,
658
-		),
659
-		'group'             => __( 'Shape Divider', 'ayecode-connect' ),
660
-		'element_require'   => '[%' . $type . '%]!=""',
661
-	);
662
-
663
-	$requires = array(
664
-		'mountains'             => array( 'flip' ),
665
-		'drops'                 => array( 'flip', 'invert' ),
666
-		'clouds'                => array( 'flip', 'invert' ),
667
-		'zigzag'                => array(),
668
-		'pyramids'              => array( 'flip', 'invert' ),
669
-		'triangle'              => array( 'invert' ),
670
-		'triangle-asymmetrical' => array( 'flip', 'invert' ),
671
-		'tilt'                  => array( 'flip' ),
672
-		'opacity-tilt'          => array( 'flip' ),
673
-		'opacity-fan'           => array(),
674
-		'curve'                 => array( 'invert' ),
675
-		'curve-asymmetrical'    => array( 'flip', 'invert' ),
676
-		'waves'                 => array( 'flip', 'invert' ),
677
-		'wave-brush'            => array( 'flip' ),
678
-		'waves-pattern'         => array( 'flip' ),
679
-		'arrow'                 => array( 'invert' ),
680
-		'split'                 => array( 'invert' ),
681
-		'book'                  => array( 'invert' ),
682
-	);
683
-
684
-	$input[ $type . '_flip' ] = array(
685
-		'type'            => 'checkbox',
686
-		'title'           => __( 'Flip', 'ayecode-connect' ),
687
-		'default'         => '',
688
-		'desc_tip'        => true,
689
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
690
-		'element_require' => sd_get_element_require_string( $requires, 'flip', 'sd' ),
691
-	);
692
-
693
-	$input[ $type . '_invert' ] = array(
694
-		'type'            => 'checkbox',
695
-		'title'           => __( 'Invert', 'ayecode-connect' ),
696
-		'default'         => '',
697
-		'desc_tip'        => true,
698
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
699
-		'element_require' => sd_get_element_require_string( $requires, 'invert', 'sd' ),
700
-	);
701
-
702
-	$input[ $type . '_btf' ] = array(
703
-		'type'            => 'checkbox',
704
-		'title'           => __( 'Bring to front', 'ayecode-connect' ),
705
-		'default'         => '',
706
-		'desc_tip'        => true,
707
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
708
-		'element_require' => '[%' . $type . '%]!=""',
709
-
710
-	);
711
-
712
-	return $input;
544
+    $options = array(
545
+        ''                      => __( 'None', 'ayecode-connect' ),
546
+        'mountains'             => __( 'Mountains', 'ayecode-connect' ),
547
+        'drops'                 => __( 'Drops', 'ayecode-connect' ),
548
+        'clouds'                => __( 'Clouds', 'ayecode-connect' ),
549
+        'zigzag'                => __( 'Zigzag', 'ayecode-connect' ),
550
+        'pyramids'              => __( 'Pyramids', 'ayecode-connect' ),
551
+        'triangle'              => __( 'Triangle', 'ayecode-connect' ),
552
+        'triangle-asymmetrical' => __( 'Triangle Asymmetrical', 'ayecode-connect' ),
553
+        'tilt'                  => __( 'Tilt', 'ayecode-connect' ),
554
+        'opacity-tilt'          => __( 'Opacity Tilt', 'ayecode-connect' ),
555
+        'opacity-fan'           => __( 'Opacity Fan', 'ayecode-connect' ),
556
+        'curve'                 => __( 'Curve', 'ayecode-connect' ),
557
+        'curve-asymmetrical'    => __( 'Curve Asymmetrical', 'ayecode-connect' ),
558
+        'waves'                 => __( 'Waves', 'ayecode-connect' ),
559
+        'wave-brush'            => __( 'Wave Brush', 'ayecode-connect' ),
560
+        'waves-pattern'         => __( 'Waves Pattern', 'ayecode-connect' ),
561
+        'arrow'                 => __( 'Arrow', 'ayecode-connect' ),
562
+        'split'                 => __( 'Split', 'ayecode-connect' ),
563
+        'book'                  => __( 'Book', 'ayecode-connect' ),
564
+    );
565
+
566
+    $defaults = array(
567
+        'type'     => 'select',
568
+        'title'    => __( 'Type', 'ayecode-connect' ),
569
+        'options'  => $options,
570
+        'default'  => '',
571
+        'desc_tip' => true,
572
+        'group'    => __( 'Shape Divider', 'ayecode-connect' ),
573
+    );
574
+
575
+    $input[ $type ] = wp_parse_args( $overwrite, $defaults );
576
+
577
+    $input[ $type . '_notice' ] = array(
578
+        'type'            => 'notice',
579
+        'desc'            => __( 'Parent element must be position `relative`', 'ayecode-connect' ),
580
+        'status'          => 'warning',
581
+        'group'           => __( 'Shape Divider', 'ayecode-connect' ),
582
+        'element_require' => '[%' . $type . '%]!=""',
583
+    );
584
+
585
+    $input[ $type . '_position' ] = wp_parse_args(
586
+        $overwrite_color,
587
+        array(
588
+            'type'            => 'select',
589
+            'title'           => __( 'Position', 'ayecode-connect' ),
590
+            'options'         => array(
591
+                'top'    => __( 'Top', 'ayecode-connect' ),
592
+                'bottom' => __( 'Bottom', 'ayecode-connect' ),
593
+            ),
594
+            'desc_tip'        => true,
595
+            'group'           => __( 'Shape Divider', 'ayecode-connect' ),
596
+            'element_require' => '[%' . $type . '%]!=""',
597
+        )
598
+    );
599
+
600
+    $options = array(
601
+                    ''            => __( 'None', 'ayecode-connect' ),
602
+                    'transparent' => __( 'Transparent', 'ayecode-connect' ),
603
+                ) + sd_aui_colors()
604
+               + array(
605
+                    'custom-color' => __( 'Custom Color', 'ayecode-connect' ),
606
+                );
607
+
608
+    $input[ $type . '_color' ] = wp_parse_args(
609
+        $overwrite_color,
610
+        array(
611
+            'type'            => 'select',
612
+            'title'           => __( 'Color', 'ayecode-connect' ),
613
+            'options'         => $options,
614
+            'desc_tip'        => true,
615
+            'group'           => __( 'Shape Divider', 'ayecode-connect' ),
616
+            'element_require' => '[%' . $type . '%]!=""',
617
+        )
618
+    );
619
+
620
+    $input[ $type . '_custom_color' ] = wp_parse_args(
621
+        $overwrite_color,
622
+        array(
623
+            'type'            => 'color',
624
+            'title'           => __( 'Custom color', 'ayecode-connect' ),
625
+            'placeholder'     => '',
626
+            'default'         => '#0073aa',
627
+            'desc_tip'        => true,
628
+            'group'           => __( 'Shape Divider', 'ayecode-connect' ),
629
+            'element_require' => '[%' . $type . '_color%]=="custom-color" && [%' . $type . '%]!=""',
630
+        )
631
+    );
632
+
633
+    $input[ $type . '_width' ] = wp_parse_args(
634
+        $overwrite_gradient,
635
+        array(
636
+            'type'              => 'range',
637
+            'title'             => __( 'Width', 'ayecode-connect' ),
638
+            'placeholder'       => '',
639
+            'default'           => '200',
640
+            'desc_tip'          => true,
641
+            'custom_attributes' => array(
642
+                'min' => 100,
643
+                'max' => 300,
644
+            ),
645
+            'group'             => __( 'Shape Divider', 'ayecode-connect' ),
646
+            'element_require'   => '[%' . $type . '%]!=""',
647
+        )
648
+    );
649
+
650
+    $input[ $type . '_height' ] = array(
651
+        'type'              => 'range',
652
+        'title'             => __( 'Height', 'ayecode-connect' ),
653
+        'default'           => '100',
654
+        'desc_tip'          => true,
655
+        'custom_attributes' => array(
656
+            'min' => 0,
657
+            'max' => 500,
658
+        ),
659
+        'group'             => __( 'Shape Divider', 'ayecode-connect' ),
660
+        'element_require'   => '[%' . $type . '%]!=""',
661
+    );
662
+
663
+    $requires = array(
664
+        'mountains'             => array( 'flip' ),
665
+        'drops'                 => array( 'flip', 'invert' ),
666
+        'clouds'                => array( 'flip', 'invert' ),
667
+        'zigzag'                => array(),
668
+        'pyramids'              => array( 'flip', 'invert' ),
669
+        'triangle'              => array( 'invert' ),
670
+        'triangle-asymmetrical' => array( 'flip', 'invert' ),
671
+        'tilt'                  => array( 'flip' ),
672
+        'opacity-tilt'          => array( 'flip' ),
673
+        'opacity-fan'           => array(),
674
+        'curve'                 => array( 'invert' ),
675
+        'curve-asymmetrical'    => array( 'flip', 'invert' ),
676
+        'waves'                 => array( 'flip', 'invert' ),
677
+        'wave-brush'            => array( 'flip' ),
678
+        'waves-pattern'         => array( 'flip' ),
679
+        'arrow'                 => array( 'invert' ),
680
+        'split'                 => array( 'invert' ),
681
+        'book'                  => array( 'invert' ),
682
+    );
683
+
684
+    $input[ $type . '_flip' ] = array(
685
+        'type'            => 'checkbox',
686
+        'title'           => __( 'Flip', 'ayecode-connect' ),
687
+        'default'         => '',
688
+        'desc_tip'        => true,
689
+        'group'           => __( 'Shape Divider', 'ayecode-connect' ),
690
+        'element_require' => sd_get_element_require_string( $requires, 'flip', 'sd' ),
691
+    );
692
+
693
+    $input[ $type . '_invert' ] = array(
694
+        'type'            => 'checkbox',
695
+        'title'           => __( 'Invert', 'ayecode-connect' ),
696
+        'default'         => '',
697
+        'desc_tip'        => true,
698
+        'group'           => __( 'Shape Divider', 'ayecode-connect' ),
699
+        'element_require' => sd_get_element_require_string( $requires, 'invert', 'sd' ),
700
+    );
701
+
702
+    $input[ $type . '_btf' ] = array(
703
+        'type'            => 'checkbox',
704
+        'title'           => __( 'Bring to front', 'ayecode-connect' ),
705
+        'default'         => '',
706
+        'desc_tip'        => true,
707
+        'group'           => __( 'Shape Divider', 'ayecode-connect' ),
708
+        'element_require' => '[%' . $type . '%]!=""',
709
+
710
+    );
711
+
712
+    return $input;
713 713
 }
714 714
 
715 715
 /**
@@ -722,22 +722,22 @@  discard block
 block discarded – undo
722 722
  * @return string
723 723
  */
724 724
 function sd_get_element_require_string( $args, $key, $type ) {
725
-	$output   = '';
726
-	$requires = array();
725
+    $output   = '';
726
+    $requires = array();
727 727
 
728
-	if ( ! empty( $args ) ) {
729
-		foreach ( $args as $t => $k ) {
730
-			if ( in_array( $key, $k ) ) {
731
-				$requires[] = '[%' . $type . '%]=="' . $t . '"';
732
-			}
733
-		}
728
+    if ( ! empty( $args ) ) {
729
+        foreach ( $args as $t => $k ) {
730
+            if ( in_array( $key, $k ) ) {
731
+                $requires[] = '[%' . $type . '%]=="' . $t . '"';
732
+            }
733
+        }
734 734
 
735
-		if ( ! empty( $requires ) ) {
736
-			$output = '(' . implode( ' || ', $requires ) . ')';
737
-		}
738
-	}
735
+        if ( ! empty( $requires ) ) {
736
+            $output = '(' . implode( ' || ', $requires ) . ')';
737
+        }
738
+    }
739 739
 
740
-	return $output;
740
+    return $output;
741 741
 }
742 742
 
743 743
 /**
@@ -749,41 +749,41 @@  discard block
 block discarded – undo
749 749
  * @return array
750 750
  */
751 751
 function sd_get_text_color_input( $type = 'text_color', $overwrite = array(), $has_custom = false ) {
752
-	$options = array(
753
-		           '' => __( 'None', 'ayecode-connect' ),
754
-	           ) + sd_aui_colors();
752
+    $options = array(
753
+                    '' => __( 'None', 'ayecode-connect' ),
754
+                ) + sd_aui_colors();
755 755
 
756
-	if ( $has_custom ) {
757
-		$options['custom'] = __( 'Custom color', 'ayecode-connect' );
758
-	}
756
+    if ( $has_custom ) {
757
+        $options['custom'] = __( 'Custom color', 'ayecode-connect' );
758
+    }
759 759
 
760
-	$defaults = array(
761
-		'type'     => 'select',
762
-		'title'    => __( 'Text color', 'ayecode-connect' ),
763
-		'options'  => $options,
764
-		'default'  => '',
765
-		'desc_tip' => true,
766
-		'group'    => __( 'Typography', 'ayecode-connect' ),
767
-	);
760
+    $defaults = array(
761
+        'type'     => 'select',
762
+        'title'    => __( 'Text color', 'ayecode-connect' ),
763
+        'options'  => $options,
764
+        'default'  => '',
765
+        'desc_tip' => true,
766
+        'group'    => __( 'Typography', 'ayecode-connect' ),
767
+    );
768 768
 
769
-	$input = wp_parse_args( $overwrite, $defaults );
769
+    $input = wp_parse_args( $overwrite, $defaults );
770 770
 
771
-	return $input;
771
+    return $input;
772 772
 }
773 773
 
774 774
 function sd_get_text_color_input_group( $type = 'text_color', $overwrite = array(), $overwrite_custom = array() ) {
775
-	$inputs = array();
775
+    $inputs = array();
776 776
 
777
-	if ( $overwrite !== false ) {
778
-		$inputs[ $type ] = sd_get_text_color_input( $type, $overwrite, true );
779
-	}
777
+    if ( $overwrite !== false ) {
778
+        $inputs[ $type ] = sd_get_text_color_input( $type, $overwrite, true );
779
+    }
780 780
 
781
-	if ( $overwrite_custom !== false ) {
782
-		$custom            = $type . '_custom';
783
-		$inputs[ $custom ] = sd_get_custom_color_input( $custom, $overwrite_custom, $type );
784
-	}
781
+    if ( $overwrite_custom !== false ) {
782
+        $custom            = $type . '_custom';
783
+        $inputs[ $custom ] = sd_get_custom_color_input( $custom, $overwrite_custom, $type );
784
+    }
785 785
 
786
-	return $inputs;
786
+    return $inputs;
787 787
 }
788 788
 
789 789
 /**
@@ -796,22 +796,22 @@  discard block
 block discarded – undo
796 796
  */
797 797
 function sd_get_custom_color_input( $type = 'color_custom', $overwrite = array(), $parent_type = '' ) {
798 798
 
799
-	$defaults = array(
800
-		'type'        => 'color',
801
-		'title'       => __( 'Custom color', 'ayecode-connect' ),
802
-		'default'     => '',
803
-		'placeholder' => '',
804
-		'desc_tip'    => true,
805
-		'group'       => __( 'Typography', 'ayecode-connect' ),
806
-	);
799
+    $defaults = array(
800
+        'type'        => 'color',
801
+        'title'       => __( 'Custom color', 'ayecode-connect' ),
802
+        'default'     => '',
803
+        'placeholder' => '',
804
+        'desc_tip'    => true,
805
+        'group'       => __( 'Typography', 'ayecode-connect' ),
806
+    );
807 807
 
808
-	if ( $parent_type ) {
809
-		$defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
810
-	}
808
+    if ( $parent_type ) {
809
+        $defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
810
+    }
811 811
 
812
-	$input = wp_parse_args( $overwrite, $defaults );
812
+    $input = wp_parse_args( $overwrite, $defaults );
813 813
 
814
-	return $input;
814
+    return $input;
815 815
 }
816 816
 
817 817
 /**
@@ -824,44 +824,44 @@  discard block
 block discarded – undo
824 824
  */
825 825
 function sd_get_col_input( $type = 'col', $overwrite = array() ) {
826 826
 
827
-	$device_size = '';
828
-	if ( ! empty( $overwrite['device_type'] ) ) {
829
-		if ( $overwrite['device_type'] == 'Tablet' ) {
830
-			$device_size = '-md';
831
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
832
-			$device_size = '-lg';
833
-		}
834
-	}
835
-	$options = array(
836
-		''     => __( 'Default', 'ayecode-connect' ),
837
-		'auto' => __( 'auto', 'ayecode-connect' ),
838
-		'1'    => '1/12',
839
-		'2'    => '2/12',
840
-		'3'    => '3/12',
841
-		'4'    => '4/12',
842
-		'5'    => '5/12',
843
-		'6'    => '6/12',
844
-		'7'    => '7/12',
845
-		'8'    => '8/12',
846
-		'9'    => '9/12',
847
-		'10'   => '10/12',
848
-		'11'   => '11/12',
849
-		'12'   => '12/12',
850
-	);
851
-
852
-	$defaults = array(
853
-		'type'            => 'select',
854
-		'title'           => __( 'Column width', 'ayecode-connect' ),
855
-		'options'         => $options,
856
-		'default'         => '',
857
-		'desc_tip'        => true,
858
-		'group'           => __( 'Container', 'ayecode-connect' ),
859
-		'element_require' => '[%container%]=="col"',
860
-	);
861
-
862
-	$input = wp_parse_args( $overwrite, $defaults );
863
-
864
-	return $input;
827
+    $device_size = '';
828
+    if ( ! empty( $overwrite['device_type'] ) ) {
829
+        if ( $overwrite['device_type'] == 'Tablet' ) {
830
+            $device_size = '-md';
831
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
832
+            $device_size = '-lg';
833
+        }
834
+    }
835
+    $options = array(
836
+        ''     => __( 'Default', 'ayecode-connect' ),
837
+        'auto' => __( 'auto', 'ayecode-connect' ),
838
+        '1'    => '1/12',
839
+        '2'    => '2/12',
840
+        '3'    => '3/12',
841
+        '4'    => '4/12',
842
+        '5'    => '5/12',
843
+        '6'    => '6/12',
844
+        '7'    => '7/12',
845
+        '8'    => '8/12',
846
+        '9'    => '9/12',
847
+        '10'   => '10/12',
848
+        '11'   => '11/12',
849
+        '12'   => '12/12',
850
+    );
851
+
852
+    $defaults = array(
853
+        'type'            => 'select',
854
+        'title'           => __( 'Column width', 'ayecode-connect' ),
855
+        'options'         => $options,
856
+        'default'         => '',
857
+        'desc_tip'        => true,
858
+        'group'           => __( 'Container', 'ayecode-connect' ),
859
+        'element_require' => '[%container%]=="col"',
860
+    );
861
+
862
+    $input = wp_parse_args( $overwrite, $defaults );
863
+
864
+    return $input;
865 865
 }
866 866
 
867 867
 /**
@@ -874,37 +874,37 @@  discard block
 block discarded – undo
874 874
  */
875 875
 function sd_get_row_cols_input( $type = 'row_cols', $overwrite = array() ) {
876 876
 
877
-	$device_size = '';
878
-	if ( ! empty( $overwrite['device_type'] ) ) {
879
-		if ( $overwrite['device_type'] == 'Tablet' ) {
880
-			$device_size = '-md';
881
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
882
-			$device_size = '-lg';
883
-		}
884
-	}
885
-	$options = array(
886
-		''  => __( 'auto', 'ayecode-connect' ),
887
-		'1' => '1',
888
-		'2' => '2',
889
-		'3' => '3',
890
-		'4' => '4',
891
-		'5' => '5',
892
-		'6' => '6',
893
-	);
894
-
895
-	$defaults = array(
896
-		'type'            => 'select',
897
-		'title'           => __( 'Row columns', 'ayecode-connect' ),
898
-		'options'         => $options,
899
-		'default'         => '',
900
-		'desc_tip'        => true,
901
-		'group'           => __( 'Container', 'ayecode-connect' ),
902
-		'element_require' => '[%container%]=="row"',
903
-	);
904
-
905
-	$input = wp_parse_args( $overwrite, $defaults );
906
-
907
-	return $input;
877
+    $device_size = '';
878
+    if ( ! empty( $overwrite['device_type'] ) ) {
879
+        if ( $overwrite['device_type'] == 'Tablet' ) {
880
+            $device_size = '-md';
881
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
882
+            $device_size = '-lg';
883
+        }
884
+    }
885
+    $options = array(
886
+        ''  => __( 'auto', 'ayecode-connect' ),
887
+        '1' => '1',
888
+        '2' => '2',
889
+        '3' => '3',
890
+        '4' => '4',
891
+        '5' => '5',
892
+        '6' => '6',
893
+    );
894
+
895
+    $defaults = array(
896
+        'type'            => 'select',
897
+        'title'           => __( 'Row columns', 'ayecode-connect' ),
898
+        'options'         => $options,
899
+        'default'         => '',
900
+        'desc_tip'        => true,
901
+        'group'           => __( 'Container', 'ayecode-connect' ),
902
+        'element_require' => '[%container%]=="row"',
903
+    );
904
+
905
+    $input = wp_parse_args( $overwrite, $defaults );
906
+
907
+    return $input;
908 908
 }
909 909
 
910 910
 /**
@@ -917,33 +917,33 @@  discard block
 block discarded – undo
917 917
  */
918 918
 function sd_get_text_align_input( $type = 'text_align', $overwrite = array() ) {
919 919
 
920
-	$device_size = '';
921
-	if ( ! empty( $overwrite['device_type'] ) ) {
922
-		if ( $overwrite['device_type'] == 'Tablet' ) {
923
-			$device_size = '-md';
924
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
925
-			$device_size = '-lg';
926
-		}
927
-	}
928
-	$options = array(
929
-		''                                => __( 'Default', 'ayecode-connect' ),
930
-		'text' . $device_size . '-left'   => __( 'Left', 'ayecode-connect' ),
931
-		'text' . $device_size . '-right'  => __( 'Right', 'ayecode-connect' ),
932
-		'text' . $device_size . '-center' => __( 'Center', 'ayecode-connect' ),
933
-	);
934
-
935
-	$defaults = array(
936
-		'type'     => 'select',
937
-		'title'    => __( 'Text align', 'ayecode-connect' ),
938
-		'options'  => $options,
939
-		'default'  => '',
940
-		'desc_tip' => true,
941
-		'group'    => __( 'Typography', 'ayecode-connect' ),
942
-	);
943
-
944
-	$input = wp_parse_args( $overwrite, $defaults );
945
-
946
-	return $input;
920
+    $device_size = '';
921
+    if ( ! empty( $overwrite['device_type'] ) ) {
922
+        if ( $overwrite['device_type'] == 'Tablet' ) {
923
+            $device_size = '-md';
924
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
925
+            $device_size = '-lg';
926
+        }
927
+    }
928
+    $options = array(
929
+        ''                                => __( 'Default', 'ayecode-connect' ),
930
+        'text' . $device_size . '-left'   => __( 'Left', 'ayecode-connect' ),
931
+        'text' . $device_size . '-right'  => __( 'Right', 'ayecode-connect' ),
932
+        'text' . $device_size . '-center' => __( 'Center', 'ayecode-connect' ),
933
+    );
934
+
935
+    $defaults = array(
936
+        'type'     => 'select',
937
+        'title'    => __( 'Text align', 'ayecode-connect' ),
938
+        'options'  => $options,
939
+        'default'  => '',
940
+        'desc_tip' => true,
941
+        'group'    => __( 'Typography', 'ayecode-connect' ),
942
+    );
943
+
944
+    $input = wp_parse_args( $overwrite, $defaults );
945
+
946
+    return $input;
947 947
 }
948 948
 
949 949
 /**
@@ -956,39 +956,39 @@  discard block
 block discarded – undo
956 956
  */
957 957
 function sd_get_display_input( $type = 'display', $overwrite = array() ) {
958 958
 
959
-	$device_size = '';
960
-	if ( ! empty( $overwrite['device_type'] ) ) {
961
-		if ( $overwrite['device_type'] == 'Tablet' ) {
962
-			$device_size = '-md';
963
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
964
-			$device_size = '-lg';
965
-		}
966
-	}
967
-	$options = array(
968
-		''                                   => __( 'Default', 'ayecode-connect' ),
969
-		'd' . $device_size . '-none'         => 'none',
970
-		'd' . $device_size . '-inline'       => 'inline',
971
-		'd' . $device_size . '-inline-block' => 'inline-block',
972
-		'd' . $device_size . '-block'        => 'block',
973
-		'd' . $device_size . '-table'        => 'table',
974
-		'd' . $device_size . '-table-cell'   => 'table-cell',
975
-		'd' . $device_size . '-table-row'    => 'table-row',
976
-		'd' . $device_size . '-flex'         => 'flex',
977
-		'd' . $device_size . '-inline-flex'  => 'inline-flex',
978
-	);
979
-
980
-	$defaults = array(
981
-		'type'     => 'select',
982
-		'title'    => __( 'Display', 'ayecode-connect' ),
983
-		'options'  => $options,
984
-		'default'  => '',
985
-		'desc_tip' => true,
986
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
987
-	);
988
-
989
-	$input = wp_parse_args( $overwrite, $defaults );
990
-
991
-	return $input;
959
+    $device_size = '';
960
+    if ( ! empty( $overwrite['device_type'] ) ) {
961
+        if ( $overwrite['device_type'] == 'Tablet' ) {
962
+            $device_size = '-md';
963
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
964
+            $device_size = '-lg';
965
+        }
966
+    }
967
+    $options = array(
968
+        ''                                   => __( 'Default', 'ayecode-connect' ),
969
+        'd' . $device_size . '-none'         => 'none',
970
+        'd' . $device_size . '-inline'       => 'inline',
971
+        'd' . $device_size . '-inline-block' => 'inline-block',
972
+        'd' . $device_size . '-block'        => 'block',
973
+        'd' . $device_size . '-table'        => 'table',
974
+        'd' . $device_size . '-table-cell'   => 'table-cell',
975
+        'd' . $device_size . '-table-row'    => 'table-row',
976
+        'd' . $device_size . '-flex'         => 'flex',
977
+        'd' . $device_size . '-inline-flex'  => 'inline-flex',
978
+    );
979
+
980
+    $defaults = array(
981
+        'type'     => 'select',
982
+        'title'    => __( 'Display', 'ayecode-connect' ),
983
+        'options'  => $options,
984
+        'default'  => '',
985
+        'desc_tip' => true,
986
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
987
+    );
988
+
989
+    $input = wp_parse_args( $overwrite, $defaults );
990
+
991
+    return $input;
992 992
 }
993 993
 
994 994
 /**
@@ -1001,17 +1001,17 @@  discard block
 block discarded – undo
1001 1001
  */
1002 1002
 function sd_get_text_justify_input( $type = 'text_justify', $overwrite = array() ) {
1003 1003
 
1004
-	$defaults = array(
1005
-		'type'     => 'checkbox',
1006
-		'title'    => __( 'Text justify', 'ayecode-connect' ),
1007
-		'default'  => '',
1008
-		'desc_tip' => true,
1009
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1010
-	);
1004
+    $defaults = array(
1005
+        'type'     => 'checkbox',
1006
+        'title'    => __( 'Text justify', 'ayecode-connect' ),
1007
+        'default'  => '',
1008
+        'desc_tip' => true,
1009
+        'group'    => __( 'Typography', 'ayecode-connect' ),
1010
+    );
1011 1011
 
1012
-	$input = wp_parse_args( $overwrite, $defaults );
1012
+    $input = wp_parse_args( $overwrite, $defaults );
1013 1013
 
1014
-	return $input;
1014
+    return $input;
1015 1015
 }
1016 1016
 
1017 1017
 /**
@@ -1024,72 +1024,72 @@  discard block
 block discarded – undo
1024 1024
  * @return array
1025 1025
  */
1026 1026
 function sd_aui_colors( $include_branding = false, $include_outlines = false, $outline_button_only_text = false, $include_translucent = false ) {
1027
-	$theme_colors = array();
1028
-
1029
-	$theme_colors['primary']   = __( 'Primary', 'ayecode-connect' );
1030
-	$theme_colors['secondary'] = __( 'Secondary', 'ayecode-connect' );
1031
-	$theme_colors['success']   = __( 'Success', 'ayecode-connect' );
1032
-	$theme_colors['danger']    = __( 'Danger', 'ayecode-connect' );
1033
-	$theme_colors['warning']   = __( 'Warning', 'ayecode-connect' );
1034
-	$theme_colors['info']      = __( 'Info', 'ayecode-connect' );
1035
-	$theme_colors['light']     = __( 'Light', 'ayecode-connect' );
1036
-	$theme_colors['dark']      = __( 'Dark', 'ayecode-connect' );
1037
-	$theme_colors['black']     = __( 'Black', 'ayecode-connect' );
1038
-	$theme_colors['white']     = __( 'White', 'ayecode-connect' );
1039
-	$theme_colors['purple']    = __( 'Purple', 'ayecode-connect' );
1040
-	$theme_colors['salmon']    = __( 'Salmon', 'ayecode-connect' );
1041
-	$theme_colors['cyan']      = __( 'Cyan', 'ayecode-connect' );
1042
-	$theme_colors['gray']      = __( 'Gray', 'ayecode-connect' );
1043
-	$theme_colors['muted']     = __( 'Muted', 'ayecode-connect' );
1044
-	$theme_colors['gray-dark'] = __( 'Gray dark', 'ayecode-connect' );
1045
-	$theme_colors['indigo']    = __( 'Indigo', 'ayecode-connect' );
1046
-	$theme_colors['orange']    = __( 'Orange', 'ayecode-connect' );
1047
-
1048
-	if ( $include_outlines ) {
1049
-		$button_only                       = $outline_button_only_text ? ' ' . __( '(button only)', 'ayecode-connect' ) : '';
1050
-		$theme_colors['outline-primary']   = __( 'Primary outline', 'ayecode-connect' ) . $button_only;
1051
-		$theme_colors['outline-secondary'] = __( 'Secondary outline', 'ayecode-connect' ) . $button_only;
1052
-		$theme_colors['outline-success']   = __( 'Success outline', 'ayecode-connect' ) . $button_only;
1053
-		$theme_colors['outline-danger']    = __( 'Danger outline', 'ayecode-connect' ) . $button_only;
1054
-		$theme_colors['outline-warning']   = __( 'Warning outline', 'ayecode-connect' ) . $button_only;
1055
-		$theme_colors['outline-info']      = __( 'Info outline', 'ayecode-connect' ) . $button_only;
1056
-		$theme_colors['outline-light']     = __( 'Light outline', 'ayecode-connect' ) . $button_only;
1057
-		$theme_colors['outline-dark']      = __( 'Dark outline', 'ayecode-connect' ) . $button_only;
1058
-		$theme_colors['outline-white']     = __( 'White outline', 'ayecode-connect' ) . $button_only;
1059
-		$theme_colors['outline-purple']    = __( 'Purple outline', 'ayecode-connect' ) . $button_only;
1060
-		$theme_colors['outline-salmon']    = __( 'Salmon outline', 'ayecode-connect' ) . $button_only;
1061
-		$theme_colors['outline-cyan']      = __( 'Cyan outline', 'ayecode-connect' ) . $button_only;
1062
-		$theme_colors['outline-gray']      = __( 'Gray outline', 'ayecode-connect' ) . $button_only;
1063
-		$theme_colors['outline-gray-dark'] = __( 'Gray dark outline', 'ayecode-connect' ) . $button_only;
1064
-		$theme_colors['outline-indigo']    = __( 'Indigo outline', 'ayecode-connect' ) . $button_only;
1065
-		$theme_colors['outline-orange']    = __( 'Orange outline', 'ayecode-connect' ) . $button_only;
1066
-	}
1067
-
1068
-	if ( $include_branding ) {
1069
-		$theme_colors = $theme_colors + sd_aui_branding_colors();
1070
-	}
1071
-
1072
-	if ( $include_translucent ) {
1073
-		$button_only                           = $outline_button_only_text ? ' ' . __( '(button only)', 'ayecode-connect' ) : '';
1074
-		$theme_colors['translucent-primary']   = __( 'Primary translucent', 'ayecode-connect' ) . $button_only;
1075
-		$theme_colors['translucent-secondary'] = __( 'Secondary translucent', 'ayecode-connect' ) . $button_only;
1076
-		$theme_colors['translucent-success']   = __( 'Success translucent', 'ayecode-connect' ) . $button_only;
1077
-		$theme_colors['translucent-danger']    = __( 'Danger translucent', 'ayecode-connect' ) . $button_only;
1078
-		$theme_colors['translucent-warning']   = __( 'Warning translucent', 'ayecode-connect' ) . $button_only;
1079
-		$theme_colors['translucent-info']      = __( 'Info translucent', 'ayecode-connect' ) . $button_only;
1080
-		$theme_colors['translucent-light']     = __( 'Light translucent', 'ayecode-connect' ) . $button_only;
1081
-		$theme_colors['translucent-dark']      = __( 'Dark translucent', 'ayecode-connect' ) . $button_only;
1082
-		$theme_colors['translucent-white']     = __( 'White translucent', 'ayecode-connect' ) . $button_only;
1083
-		$theme_colors['translucent-purple']    = __( 'Purple translucent', 'ayecode-connect' ) . $button_only;
1084
-		$theme_colors['translucent-salmon']    = __( 'Salmon translucent', 'ayecode-connect' ) . $button_only;
1085
-		$theme_colors['translucent-cyan']      = __( 'Cyan translucent', 'ayecode-connect' ) . $button_only;
1086
-		$theme_colors['translucent-gray']      = __( 'Gray translucent', 'ayecode-connect' ) . $button_only;
1087
-		$theme_colors['translucent-gray-dark'] = __( 'Gray dark translucent', 'ayecode-connect' ) . $button_only;
1088
-		$theme_colors['translucent-indigo']    = __( 'Indigo translucent', 'ayecode-connect' ) . $button_only;
1089
-		$theme_colors['translucent-orange']    = __( 'Orange translucent', 'ayecode-connect' ) . $button_only;
1090
-	}
1091
-
1092
-	return apply_filters( 'sd_aui_colors', $theme_colors, $include_outlines, $include_branding );
1027
+    $theme_colors = array();
1028
+
1029
+    $theme_colors['primary']   = __( 'Primary', 'ayecode-connect' );
1030
+    $theme_colors['secondary'] = __( 'Secondary', 'ayecode-connect' );
1031
+    $theme_colors['success']   = __( 'Success', 'ayecode-connect' );
1032
+    $theme_colors['danger']    = __( 'Danger', 'ayecode-connect' );
1033
+    $theme_colors['warning']   = __( 'Warning', 'ayecode-connect' );
1034
+    $theme_colors['info']      = __( 'Info', 'ayecode-connect' );
1035
+    $theme_colors['light']     = __( 'Light', 'ayecode-connect' );
1036
+    $theme_colors['dark']      = __( 'Dark', 'ayecode-connect' );
1037
+    $theme_colors['black']     = __( 'Black', 'ayecode-connect' );
1038
+    $theme_colors['white']     = __( 'White', 'ayecode-connect' );
1039
+    $theme_colors['purple']    = __( 'Purple', 'ayecode-connect' );
1040
+    $theme_colors['salmon']    = __( 'Salmon', 'ayecode-connect' );
1041
+    $theme_colors['cyan']      = __( 'Cyan', 'ayecode-connect' );
1042
+    $theme_colors['gray']      = __( 'Gray', 'ayecode-connect' );
1043
+    $theme_colors['muted']     = __( 'Muted', 'ayecode-connect' );
1044
+    $theme_colors['gray-dark'] = __( 'Gray dark', 'ayecode-connect' );
1045
+    $theme_colors['indigo']    = __( 'Indigo', 'ayecode-connect' );
1046
+    $theme_colors['orange']    = __( 'Orange', 'ayecode-connect' );
1047
+
1048
+    if ( $include_outlines ) {
1049
+        $button_only                       = $outline_button_only_text ? ' ' . __( '(button only)', 'ayecode-connect' ) : '';
1050
+        $theme_colors['outline-primary']   = __( 'Primary outline', 'ayecode-connect' ) . $button_only;
1051
+        $theme_colors['outline-secondary'] = __( 'Secondary outline', 'ayecode-connect' ) . $button_only;
1052
+        $theme_colors['outline-success']   = __( 'Success outline', 'ayecode-connect' ) . $button_only;
1053
+        $theme_colors['outline-danger']    = __( 'Danger outline', 'ayecode-connect' ) . $button_only;
1054
+        $theme_colors['outline-warning']   = __( 'Warning outline', 'ayecode-connect' ) . $button_only;
1055
+        $theme_colors['outline-info']      = __( 'Info outline', 'ayecode-connect' ) . $button_only;
1056
+        $theme_colors['outline-light']     = __( 'Light outline', 'ayecode-connect' ) . $button_only;
1057
+        $theme_colors['outline-dark']      = __( 'Dark outline', 'ayecode-connect' ) . $button_only;
1058
+        $theme_colors['outline-white']     = __( 'White outline', 'ayecode-connect' ) . $button_only;
1059
+        $theme_colors['outline-purple']    = __( 'Purple outline', 'ayecode-connect' ) . $button_only;
1060
+        $theme_colors['outline-salmon']    = __( 'Salmon outline', 'ayecode-connect' ) . $button_only;
1061
+        $theme_colors['outline-cyan']      = __( 'Cyan outline', 'ayecode-connect' ) . $button_only;
1062
+        $theme_colors['outline-gray']      = __( 'Gray outline', 'ayecode-connect' ) . $button_only;
1063
+        $theme_colors['outline-gray-dark'] = __( 'Gray dark outline', 'ayecode-connect' ) . $button_only;
1064
+        $theme_colors['outline-indigo']    = __( 'Indigo outline', 'ayecode-connect' ) . $button_only;
1065
+        $theme_colors['outline-orange']    = __( 'Orange outline', 'ayecode-connect' ) . $button_only;
1066
+    }
1067
+
1068
+    if ( $include_branding ) {
1069
+        $theme_colors = $theme_colors + sd_aui_branding_colors();
1070
+    }
1071
+
1072
+    if ( $include_translucent ) {
1073
+        $button_only                           = $outline_button_only_text ? ' ' . __( '(button only)', 'ayecode-connect' ) : '';
1074
+        $theme_colors['translucent-primary']   = __( 'Primary translucent', 'ayecode-connect' ) . $button_only;
1075
+        $theme_colors['translucent-secondary'] = __( 'Secondary translucent', 'ayecode-connect' ) . $button_only;
1076
+        $theme_colors['translucent-success']   = __( 'Success translucent', 'ayecode-connect' ) . $button_only;
1077
+        $theme_colors['translucent-danger']    = __( 'Danger translucent', 'ayecode-connect' ) . $button_only;
1078
+        $theme_colors['translucent-warning']   = __( 'Warning translucent', 'ayecode-connect' ) . $button_only;
1079
+        $theme_colors['translucent-info']      = __( 'Info translucent', 'ayecode-connect' ) . $button_only;
1080
+        $theme_colors['translucent-light']     = __( 'Light translucent', 'ayecode-connect' ) . $button_only;
1081
+        $theme_colors['translucent-dark']      = __( 'Dark translucent', 'ayecode-connect' ) . $button_only;
1082
+        $theme_colors['translucent-white']     = __( 'White translucent', 'ayecode-connect' ) . $button_only;
1083
+        $theme_colors['translucent-purple']    = __( 'Purple translucent', 'ayecode-connect' ) . $button_only;
1084
+        $theme_colors['translucent-salmon']    = __( 'Salmon translucent', 'ayecode-connect' ) . $button_only;
1085
+        $theme_colors['translucent-cyan']      = __( 'Cyan translucent', 'ayecode-connect' ) . $button_only;
1086
+        $theme_colors['translucent-gray']      = __( 'Gray translucent', 'ayecode-connect' ) . $button_only;
1087
+        $theme_colors['translucent-gray-dark'] = __( 'Gray dark translucent', 'ayecode-connect' ) . $button_only;
1088
+        $theme_colors['translucent-indigo']    = __( 'Indigo translucent', 'ayecode-connect' ) . $button_only;
1089
+        $theme_colors['translucent-orange']    = __( 'Orange translucent', 'ayecode-connect' ) . $button_only;
1090
+    }
1091
+
1092
+    return apply_filters( 'sd_aui_colors', $theme_colors, $include_outlines, $include_branding );
1093 1093
 }
1094 1094
 
1095 1095
 /**
@@ -1098,19 +1098,19 @@  discard block
 block discarded – undo
1098 1098
  * @return array
1099 1099
  */
1100 1100
 function sd_aui_branding_colors() {
1101
-	return array(
1102
-		'facebook'  => __( 'Facebook', 'ayecode-connect' ),
1103
-		'twitter'   => __( 'Twitter', 'ayecode-connect' ),
1104
-		'instagram' => __( 'Instagram', 'ayecode-connect' ),
1105
-		'linkedin'  => __( 'Linkedin', 'ayecode-connect' ),
1106
-		'flickr'    => __( 'Flickr', 'ayecode-connect' ),
1107
-		'github'    => __( 'GitHub', 'ayecode-connect' ),
1108
-		'youtube'   => __( 'YouTube', 'ayecode-connect' ),
1109
-		'wordpress' => __( 'WordPress', 'ayecode-connect' ),
1110
-		'google'    => __( 'Google', 'ayecode-connect' ),
1111
-		'yahoo'     => __( 'Yahoo', 'ayecode-connect' ),
1112
-		'vkontakte' => __( 'Vkontakte', 'ayecode-connect' ),
1113
-	);
1101
+    return array(
1102
+        'facebook'  => __( 'Facebook', 'ayecode-connect' ),
1103
+        'twitter'   => __( 'Twitter', 'ayecode-connect' ),
1104
+        'instagram' => __( 'Instagram', 'ayecode-connect' ),
1105
+        'linkedin'  => __( 'Linkedin', 'ayecode-connect' ),
1106
+        'flickr'    => __( 'Flickr', 'ayecode-connect' ),
1107
+        'github'    => __( 'GitHub', 'ayecode-connect' ),
1108
+        'youtube'   => __( 'YouTube', 'ayecode-connect' ),
1109
+        'wordpress' => __( 'WordPress', 'ayecode-connect' ),
1110
+        'google'    => __( 'Google', 'ayecode-connect' ),
1111
+        'yahoo'     => __( 'Yahoo', 'ayecode-connect' ),
1112
+        'vkontakte' => __( 'Vkontakte', 'ayecode-connect' ),
1113
+    );
1114 1114
 }
1115 1115
 
1116 1116
 
@@ -1124,38 +1124,38 @@  discard block
 block discarded – undo
1124 1124
  */
1125 1125
 function sd_get_container_class_input( $type = 'container', $overwrite = array() ) {
1126 1126
 
1127
-	$options = array(
1128
-		'container'       => __( 'container (default)', 'ayecode-connect' ),
1129
-		'container-sm'    => 'container-sm',
1130
-		'container-md'    => 'container-md',
1131
-		'container-lg'    => 'container-lg',
1132
-		'container-xl'    => 'container-xl',
1133
-		'container-xxl'   => 'container-xxl',
1134
-		'container-fluid' => 'container-fluid',
1135
-		'row'             => 'row',
1136
-		'col'             => 'col',
1137
-		'card'            => 'card',
1138
-		'card-header'     => 'card-header',
1139
-		'card-img-top'    => 'card-img-top',
1140
-		'card-body'       => 'card-body',
1141
-		'card-footer'     => 'card-footer',
1142
-		'list-group'      => 'list-group',
1143
-		'list-group-item' => 'list-group-item',
1144
-		''                => __( 'no container class', 'ayecode-connect' ),
1145
-	);
1146
-
1147
-	$defaults = array(
1148
-		'type'     => 'select',
1149
-		'title'    => __( 'Type', 'ayecode-connect' ),
1150
-		'options'  => $options,
1151
-		'default'  => '',
1152
-		'desc_tip' => true,
1153
-		'group'    => __( 'Container', 'ayecode-connect' ),
1154
-	);
1155
-
1156
-	$input = wp_parse_args( $overwrite, $defaults );
1157
-
1158
-	return $input;
1127
+    $options = array(
1128
+        'container'       => __( 'container (default)', 'ayecode-connect' ),
1129
+        'container-sm'    => 'container-sm',
1130
+        'container-md'    => 'container-md',
1131
+        'container-lg'    => 'container-lg',
1132
+        'container-xl'    => 'container-xl',
1133
+        'container-xxl'   => 'container-xxl',
1134
+        'container-fluid' => 'container-fluid',
1135
+        'row'             => 'row',
1136
+        'col'             => 'col',
1137
+        'card'            => 'card',
1138
+        'card-header'     => 'card-header',
1139
+        'card-img-top'    => 'card-img-top',
1140
+        'card-body'       => 'card-body',
1141
+        'card-footer'     => 'card-footer',
1142
+        'list-group'      => 'list-group',
1143
+        'list-group-item' => 'list-group-item',
1144
+        ''                => __( 'no container class', 'ayecode-connect' ),
1145
+    );
1146
+
1147
+    $defaults = array(
1148
+        'type'     => 'select',
1149
+        'title'    => __( 'Type', 'ayecode-connect' ),
1150
+        'options'  => $options,
1151
+        'default'  => '',
1152
+        'desc_tip' => true,
1153
+        'group'    => __( 'Container', 'ayecode-connect' ),
1154
+    );
1155
+
1156
+    $input = wp_parse_args( $overwrite, $defaults );
1157
+
1158
+    return $input;
1159 1159
 }
1160 1160
 
1161 1161
 /**
@@ -1168,30 +1168,30 @@  discard block
 block discarded – undo
1168 1168
  */
1169 1169
 function sd_get_position_class_input( $type = 'position', $overwrite = array() ) {
1170 1170
 
1171
-	$options = array(
1172
-		''                  => __( 'Default', 'ayecode-connect' ),
1173
-		'position-static'   => 'static',
1174
-		'position-relative' => 'relative',
1175
-		'position-absolute' => 'absolute',
1176
-		'position-fixed'    => 'fixed',
1177
-		'position-sticky'   => 'sticky',
1178
-		'fixed-top'         => 'fixed-top',
1179
-		'fixed-bottom'      => 'fixed-bottom',
1180
-		'sticky-top'        => 'sticky-top',
1181
-	);
1171
+    $options = array(
1172
+        ''                  => __( 'Default', 'ayecode-connect' ),
1173
+        'position-static'   => 'static',
1174
+        'position-relative' => 'relative',
1175
+        'position-absolute' => 'absolute',
1176
+        'position-fixed'    => 'fixed',
1177
+        'position-sticky'   => 'sticky',
1178
+        'fixed-top'         => 'fixed-top',
1179
+        'fixed-bottom'      => 'fixed-bottom',
1180
+        'sticky-top'        => 'sticky-top',
1181
+    );
1182 1182
 
1183
-	$defaults = array(
1184
-		'type'     => 'select',
1185
-		'title'    => __( 'Position', 'ayecode-connect' ),
1186
-		'options'  => $options,
1187
-		'default'  => '',
1188
-		'desc_tip' => true,
1189
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1190
-	);
1183
+    $defaults = array(
1184
+        'type'     => 'select',
1185
+        'title'    => __( 'Position', 'ayecode-connect' ),
1186
+        'options'  => $options,
1187
+        'default'  => '',
1188
+        'desc_tip' => true,
1189
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1190
+    );
1191 1191
 
1192
-	$input = wp_parse_args( $overwrite, $defaults );
1192
+    $input = wp_parse_args( $overwrite, $defaults );
1193 1193
 
1194
-	return $input;
1194
+    return $input;
1195 1195
 }
1196 1196
 
1197 1197
 /**
@@ -1202,32 +1202,32 @@  discard block
 block discarded – undo
1202 1202
  */
1203 1203
 function sd_get_absolute_position_input( $type = 'absolute_position', $overwrite = array() ) {
1204 1204
 
1205
-	$options = array(
1206
-		''              => __( 'Default', 'ayecode-connect' ),
1207
-		'top-left'      => 'top-left',
1208
-		'top-center'    => 'top-center',
1209
-		'top-right'     => 'top-right',
1210
-		'center-left'   => 'middle-left',
1211
-		'center'        => 'center',
1212
-		'center-right'  => 'middle-right',
1213
-		'bottom-left'   => 'bottom-left',
1214
-		'bottom-center' => 'bottom-center',
1215
-		'bottom-right'  => 'bottom-right',
1216
-	);
1217
-
1218
-	$defaults = array(
1219
-		'type'            => 'select',
1220
-		'title'           => __( 'Absolute Position', 'ayecode-connect' ),
1221
-		'options'         => $options,
1222
-		'default'         => '',
1223
-		'desc_tip'        => true,
1224
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1225
-		'element_require' => '[%position%]=="position-absolute"',
1226
-	);
1227
-
1228
-	$input = wp_parse_args( $overwrite, $defaults );
1229
-
1230
-	return $input;
1205
+    $options = array(
1206
+        ''              => __( 'Default', 'ayecode-connect' ),
1207
+        'top-left'      => 'top-left',
1208
+        'top-center'    => 'top-center',
1209
+        'top-right'     => 'top-right',
1210
+        'center-left'   => 'middle-left',
1211
+        'center'        => 'center',
1212
+        'center-right'  => 'middle-right',
1213
+        'bottom-left'   => 'bottom-left',
1214
+        'bottom-center' => 'bottom-center',
1215
+        'bottom-right'  => 'bottom-right',
1216
+    );
1217
+
1218
+    $defaults = array(
1219
+        'type'            => 'select',
1220
+        'title'           => __( 'Absolute Position', 'ayecode-connect' ),
1221
+        'options'         => $options,
1222
+        'default'         => '',
1223
+        'desc_tip'        => true,
1224
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1225
+        'element_require' => '[%position%]=="position-absolute"',
1226
+    );
1227
+
1228
+    $input = wp_parse_args( $overwrite, $defaults );
1229
+
1230
+    return $input;
1231 1231
 }
1232 1232
 
1233 1233
 /**
@@ -1240,38 +1240,38 @@  discard block
 block discarded – undo
1240 1240
  */
1241 1241
 function sd_get_sticky_offset_input( $type = 'top', $overwrite = array() ) {
1242 1242
 
1243
-	$defaults = array(
1244
-		'type'            => 'number',
1245
-		'title'           => __( 'Sticky offset', 'ayecode-connect' ),
1246
-		//'desc' =>  __( 'Sticky offset', 'ayecode-connect' ),
1247
-		'default'         => '',
1248
-		'desc_tip'        => true,
1249
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1250
-		'element_require' => '[%position%]=="sticky" || [%position%]=="sticky-top"',
1251
-	);
1252
-
1253
-	// title
1254
-	if ( $type == 'top' ) {
1255
-		$defaults['title'] = __( 'Top offset', 'ayecode-connect' );
1256
-		$defaults['icon']  = 'box-top';
1257
-		$defaults['row']   = array(
1258
-			'title' => __( 'Sticky offset', 'ayecode-connect' ),
1259
-			'key'   => 'sticky-offset',
1260
-			'open'  => true,
1261
-			'class' => 'text-center',
1262
-		);
1263
-	} elseif ( $type == 'bottom' ) {
1264
-		$defaults['title'] = __( 'Bottom offset', 'ayecode-connect' );
1265
-		$defaults['icon']  = 'box-bottom';
1266
-		$defaults['row']   = array(
1267
-			'key'   => 'sticky-offset',
1268
-			'close' => true,
1269
-		);
1270
-	}
1271
-
1272
-	$input = wp_parse_args( $overwrite, $defaults );
1273
-
1274
-	return $input;
1243
+    $defaults = array(
1244
+        'type'            => 'number',
1245
+        'title'           => __( 'Sticky offset', 'ayecode-connect' ),
1246
+        //'desc' =>  __( 'Sticky offset', 'ayecode-connect' ),
1247
+        'default'         => '',
1248
+        'desc_tip'        => true,
1249
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1250
+        'element_require' => '[%position%]=="sticky" || [%position%]=="sticky-top"',
1251
+    );
1252
+
1253
+    // title
1254
+    if ( $type == 'top' ) {
1255
+        $defaults['title'] = __( 'Top offset', 'ayecode-connect' );
1256
+        $defaults['icon']  = 'box-top';
1257
+        $defaults['row']   = array(
1258
+            'title' => __( 'Sticky offset', 'ayecode-connect' ),
1259
+            'key'   => 'sticky-offset',
1260
+            'open'  => true,
1261
+            'class' => 'text-center',
1262
+        );
1263
+    } elseif ( $type == 'bottom' ) {
1264
+        $defaults['title'] = __( 'Bottom offset', 'ayecode-connect' );
1265
+        $defaults['icon']  = 'box-bottom';
1266
+        $defaults['row']   = array(
1267
+            'key'   => 'sticky-offset',
1268
+            'close' => true,
1269
+        );
1270
+    }
1271
+
1272
+    $input = wp_parse_args( $overwrite, $defaults );
1273
+
1274
+    return $input;
1275 1275
 }
1276 1276
 
1277 1277
 /**
@@ -1283,61 +1283,61 @@  discard block
 block discarded – undo
1283 1283
  * @return array
1284 1284
  */
1285 1285
 function sd_get_font_size_input( $type = 'font_size', $overwrite = array(), $has_custom = false ) {
1286
-	global $aui_bs5;
1287
-
1288
-	$options[] = __( 'Inherit from parent', 'ayecode-connect' );
1289
-	if ( $aui_bs5 ) {
1290
-		// responsive font sizes
1291
-		$options['fs-base'] = 'fs-base (body default)';
1292
-		$options['fs-6']    = 'fs-6';
1293
-		$options['fs-5']    = 'fs-5';
1294
-		$options['fs-4']    = 'fs-4';
1295
-		$options['fs-3']    = 'fs-3';
1296
-		$options['fs-2']    = 'fs-2';
1297
-		$options['fs-1']    = 'fs-1';
1298
-
1299
-		// custom
1300
-		$options['fs-lg']  = 'fs-lg';
1301
-		$options['fs-sm']  = 'fs-sm';
1302
-		$options['fs-xs']  = 'fs-xs';
1303
-		$options['fs-xxs'] = 'fs-xxs';
1304
-
1305
-	}
1306
-
1307
-	$options = $options + array(
1308
-			'h6'        => 'h6',
1309
-			'h5'        => 'h5',
1310
-			'h4'        => 'h4',
1311
-			'h3'        => 'h3',
1312
-			'h2'        => 'h2',
1313
-			'h1'        => 'h1',
1314
-			'display-1' => 'display-1',
1315
-			'display-2' => 'display-2',
1316
-			'display-3' => 'display-3',
1317
-			'display-4' => 'display-4',
1318
-		);
1319
-
1320
-	if ( $aui_bs5 ) {
1321
-		$options['display-5'] = 'display-5';
1322
-		$options['display-6'] = 'display-6';
1323
-	}
1324
-
1325
-	if ( $has_custom ) {
1326
-		$options['custom'] = __( 'Custom size', 'ayecode-connect' );
1327
-	}
1328
-
1329
-	$defaults = array(
1330
-		'type'     => 'select',
1331
-		'title'    => __( 'Font size', 'ayecode-connect' ),
1332
-		'options'  => $options,
1333
-		'default'  => '',
1334
-		'desc_tip' => true,
1335
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1336
-	);
1337
-
1338
-	$input = wp_parse_args( $overwrite, $defaults );
1339
-
1340
-	return $input;
1286
+    global $aui_bs5;
1287
+
1288
+    $options[] = __( 'Inherit from parent', 'ayecode-connect' );
1289
+    if ( $aui_bs5 ) {
1290
+        // responsive font sizes
1291
+        $options['fs-base'] = 'fs-base (body default)';
1292
+        $options['fs-6']    = 'fs-6';
1293
+        $options['fs-5']    = 'fs-5';
1294
+        $options['fs-4']    = 'fs-4';
1295
+        $options['fs-3']    = 'fs-3';
1296
+        $options['fs-2']    = 'fs-2';
1297
+        $options['fs-1']    = 'fs-1';
1298
+
1299
+        // custom
1300
+        $options['fs-lg']  = 'fs-lg';
1301
+        $options['fs-sm']  = 'fs-sm';
1302
+        $options['fs-xs']  = 'fs-xs';
1303
+        $options['fs-xxs'] = 'fs-xxs';
1304
+
1305
+    }
1306
+
1307
+    $options = $options + array(
1308
+            'h6'        => 'h6',
1309
+            'h5'        => 'h5',
1310
+            'h4'        => 'h4',
1311
+            'h3'        => 'h3',
1312
+            'h2'        => 'h2',
1313
+            'h1'        => 'h1',
1314
+            'display-1' => 'display-1',
1315
+            'display-2' => 'display-2',
1316
+            'display-3' => 'display-3',
1317
+            'display-4' => 'display-4',
1318
+        );
1319
+
1320
+    if ( $aui_bs5 ) {
1321
+        $options['display-5'] = 'display-5';
1322
+        $options['display-6'] = 'display-6';
1323
+    }
1324
+
1325
+    if ( $has_custom ) {
1326
+        $options['custom'] = __( 'Custom size', 'ayecode-connect' );
1327
+    }
1328
+
1329
+    $defaults = array(
1330
+        'type'     => 'select',
1331
+        'title'    => __( 'Font size', 'ayecode-connect' ),
1332
+        'options'  => $options,
1333
+        'default'  => '',
1334
+        'desc_tip' => true,
1335
+        'group'    => __( 'Typography', 'ayecode-connect' ),
1336
+    );
1337
+
1338
+    $input = wp_parse_args( $overwrite, $defaults );
1339
+
1340
+    return $input;
1341 1341
 }
1342 1342
 
1343 1343
 /**
@@ -1350,27 +1350,27 @@  discard block
 block discarded – undo
1350 1350
  */
1351 1351
 function sd_get_font_custom_size_input( $type = 'font_size_custom', $overwrite = array(), $parent_type = '' ) {
1352 1352
 
1353
-	$defaults = array(
1354
-		'type'              => 'number',
1355
-		'title'             => __( 'Font size (rem)', 'ayecode-connect' ),
1356
-		'default'           => '',
1357
-		'placeholder'       => '1.25',
1358
-		'custom_attributes' => array(
1359
-			'step' => '0.1',
1360
-			'min'  => '0',
1361
-			'max'  => '100',
1362
-		),
1363
-		'desc_tip'          => true,
1364
-		'group'             => __( 'Typography', 'ayecode-connect' ),
1365
-	);
1353
+    $defaults = array(
1354
+        'type'              => 'number',
1355
+        'title'             => __( 'Font size (rem)', 'ayecode-connect' ),
1356
+        'default'           => '',
1357
+        'placeholder'       => '1.25',
1358
+        'custom_attributes' => array(
1359
+            'step' => '0.1',
1360
+            'min'  => '0',
1361
+            'max'  => '100',
1362
+        ),
1363
+        'desc_tip'          => true,
1364
+        'group'             => __( 'Typography', 'ayecode-connect' ),
1365
+    );
1366 1366
 
1367
-	if ( $parent_type ) {
1368
-		$defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
1369
-	}
1367
+    if ( $parent_type ) {
1368
+        $defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
1369
+    }
1370 1370
 
1371
-	$input = wp_parse_args( $overwrite, $defaults );
1371
+    $input = wp_parse_args( $overwrite, $defaults );
1372 1372
 
1373
-	return $input;
1373
+    return $input;
1374 1374
 }
1375 1375
 
1376 1376
 /**
@@ -1383,23 +1383,23 @@  discard block
 block discarded – undo
1383 1383
  */
1384 1384
 function sd_get_font_line_height_input( $type = 'font_line_height', $overwrite = array() ) {
1385 1385
 
1386
-	$defaults = array(
1387
-		'type'              => 'number',
1388
-		'title'             => __( 'Font Line Height', 'ayecode-connect' ),
1389
-		'default'           => '',
1390
-		'placeholder'       => '1.75',
1391
-		'custom_attributes' => array(
1392
-			'step' => '0.1',
1393
-			'min'  => '0',
1394
-			'max'  => '100',
1395
-		),
1396
-		'desc_tip'          => true,
1397
-		'group'             => __( 'Typography', 'ayecode-connect' ),
1398
-	);
1386
+    $defaults = array(
1387
+        'type'              => 'number',
1388
+        'title'             => __( 'Font Line Height', 'ayecode-connect' ),
1389
+        'default'           => '',
1390
+        'placeholder'       => '1.75',
1391
+        'custom_attributes' => array(
1392
+            'step' => '0.1',
1393
+            'min'  => '0',
1394
+            'max'  => '100',
1395
+        ),
1396
+        'desc_tip'          => true,
1397
+        'group'             => __( 'Typography', 'ayecode-connect' ),
1398
+    );
1399 1399
 
1400
-	$input = wp_parse_args( $overwrite, $defaults );
1400
+    $input = wp_parse_args( $overwrite, $defaults );
1401 1401
 
1402
-	return $input;
1402
+    return $input;
1403 1403
 }
1404 1404
 
1405 1405
 /**
@@ -1412,18 +1412,18 @@  discard block
 block discarded – undo
1412 1412
  */
1413 1413
 function sd_get_font_size_input_group( $type = 'font_size', $overwrite = array(), $overwrite_custom = array() ) {
1414 1414
 
1415
-	$inputs = array();
1415
+    $inputs = array();
1416 1416
 
1417
-	if ( $overwrite !== false ) {
1418
-		$inputs[ $type ] = sd_get_font_size_input( $type, $overwrite, true );
1419
-	}
1417
+    if ( $overwrite !== false ) {
1418
+        $inputs[ $type ] = sd_get_font_size_input( $type, $overwrite, true );
1419
+    }
1420 1420
 
1421
-	if ( $overwrite_custom !== false ) {
1422
-		$custom            = $type . '_custom';
1423
-		$inputs[ $custom ] = sd_get_font_custom_size_input( $custom, $overwrite_custom, $type );
1424
-	}
1421
+    if ( $overwrite_custom !== false ) {
1422
+        $custom            = $type . '_custom';
1423
+        $inputs[ $custom ] = sd_get_font_custom_size_input( $custom, $overwrite_custom, $type );
1424
+    }
1425 1425
 
1426
-	return $inputs;
1426
+    return $inputs;
1427 1427
 }
1428 1428
 
1429 1429
 /**
@@ -1436,33 +1436,33 @@  discard block
 block discarded – undo
1436 1436
  */
1437 1437
 function sd_get_font_weight_input( $type = 'font_weight', $overwrite = array() ) {
1438 1438
 
1439
-	$options = array(
1440
-		''                                => __( 'Inherit', 'ayecode-connect' ),
1441
-		'font-weight-bold'                => 'bold',
1442
-		'font-weight-bolder'              => 'bolder',
1443
-		'font-weight-normal'              => 'normal',
1444
-		'font-weight-light'               => 'light',
1445
-		'font-weight-lighter'             => 'lighter',
1446
-		'font-italic'                     => 'italic',
1447
-		'font-weight-bold font-italic'    => 'bold italic',
1448
-		'font-weight-bolder font-italic'  => 'bolder italic',
1449
-		'font-weight-normal font-italic'  => 'normal italic',
1450
-		'font-weight-light font-italic'   => 'light italic',
1451
-		'font-weight-lighter font-italic' => 'lighter italic',
1452
-	);
1453
-
1454
-	$defaults = array(
1455
-		'type'     => 'select',
1456
-		'title'    => __( 'Appearance', 'ayecode-connect' ),
1457
-		'options'  => $options,
1458
-		'default'  => '',
1459
-		'desc_tip' => true,
1460
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1461
-	);
1462
-
1463
-	$input = wp_parse_args( $overwrite, $defaults );
1464
-
1465
-	return $input;
1439
+    $options = array(
1440
+        ''                                => __( 'Inherit', 'ayecode-connect' ),
1441
+        'font-weight-bold'                => 'bold',
1442
+        'font-weight-bolder'              => 'bolder',
1443
+        'font-weight-normal'              => 'normal',
1444
+        'font-weight-light'               => 'light',
1445
+        'font-weight-lighter'             => 'lighter',
1446
+        'font-italic'                     => 'italic',
1447
+        'font-weight-bold font-italic'    => 'bold italic',
1448
+        'font-weight-bolder font-italic'  => 'bolder italic',
1449
+        'font-weight-normal font-italic'  => 'normal italic',
1450
+        'font-weight-light font-italic'   => 'light italic',
1451
+        'font-weight-lighter font-italic' => 'lighter italic',
1452
+    );
1453
+
1454
+    $defaults = array(
1455
+        'type'     => 'select',
1456
+        'title'    => __( 'Appearance', 'ayecode-connect' ),
1457
+        'options'  => $options,
1458
+        'default'  => '',
1459
+        'desc_tip' => true,
1460
+        'group'    => __( 'Typography', 'ayecode-connect' ),
1461
+    );
1462
+
1463
+    $input = wp_parse_args( $overwrite, $defaults );
1464
+
1465
+    return $input;
1466 1466
 }
1467 1467
 
1468 1468
 /**
@@ -1475,25 +1475,25 @@  discard block
 block discarded – undo
1475 1475
  */
1476 1476
 function sd_get_font_case_input( $type = 'font_weight', $overwrite = array() ) {
1477 1477
 
1478
-	$options = array(
1479
-		''                => __( 'Default', 'ayecode-connect' ),
1480
-		'text-lowercase'  => __( 'lowercase', 'ayecode-connect' ),
1481
-		'text-uppercase'  => __( 'UPPERCASE', 'ayecode-connect' ),
1482
-		'text-capitalize' => __( 'Capitalize', 'ayecode-connect' ),
1483
-	);
1478
+    $options = array(
1479
+        ''                => __( 'Default', 'ayecode-connect' ),
1480
+        'text-lowercase'  => __( 'lowercase', 'ayecode-connect' ),
1481
+        'text-uppercase'  => __( 'UPPERCASE', 'ayecode-connect' ),
1482
+        'text-capitalize' => __( 'Capitalize', 'ayecode-connect' ),
1483
+    );
1484 1484
 
1485
-	$defaults = array(
1486
-		'type'     => 'select',
1487
-		'title'    => __( 'Letter case', 'ayecode-connect' ),
1488
-		'options'  => $options,
1489
-		'default'  => '',
1490
-		'desc_tip' => true,
1491
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1492
-	);
1485
+    $defaults = array(
1486
+        'type'     => 'select',
1487
+        'title'    => __( 'Letter case', 'ayecode-connect' ),
1488
+        'options'  => $options,
1489
+        'default'  => '',
1490
+        'desc_tip' => true,
1491
+        'group'    => __( 'Typography', 'ayecode-connect' ),
1492
+    );
1493 1493
 
1494
-	$input = wp_parse_args( $overwrite, $defaults );
1494
+    $input = wp_parse_args( $overwrite, $defaults );
1495 1495
 
1496
-	return $input;
1496
+    return $input;
1497 1497
 }
1498 1498
 
1499 1499
 /**
@@ -1507,23 +1507,23 @@  discard block
 block discarded – undo
1507 1507
  */
1508 1508
 function sd_get_font_italic_input( $type = 'font_italic', $overwrite = array() ) {
1509 1509
 
1510
-	$options = array(
1511
-		''            => __( 'No', 'ayecode-connect' ),
1512
-		'font-italic' => __( 'Yes', 'ayecode-connect' ),
1513
-	);
1510
+    $options = array(
1511
+        ''            => __( 'No', 'ayecode-connect' ),
1512
+        'font-italic' => __( 'Yes', 'ayecode-connect' ),
1513
+    );
1514 1514
 
1515
-	$defaults = array(
1516
-		'type'     => 'select',
1517
-		'title'    => __( 'Font italic', 'ayecode-connect' ),
1518
-		'options'  => $options,
1519
-		'default'  => '',
1520
-		'desc_tip' => true,
1521
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1522
-	);
1515
+    $defaults = array(
1516
+        'type'     => 'select',
1517
+        'title'    => __( 'Font italic', 'ayecode-connect' ),
1518
+        'options'  => $options,
1519
+        'default'  => '',
1520
+        'desc_tip' => true,
1521
+        'group'    => __( 'Typography', 'ayecode-connect' ),
1522
+    );
1523 1523
 
1524
-	$input = wp_parse_args( $overwrite, $defaults );
1524
+    $input = wp_parse_args( $overwrite, $defaults );
1525 1525
 
1526
-	return $input;
1526
+    return $input;
1527 1527
 }
1528 1528
 
1529 1529
 /**
@@ -1536,18 +1536,18 @@  discard block
 block discarded – undo
1536 1536
  */
1537 1537
 function sd_get_anchor_input( $type = 'anchor', $overwrite = array() ) {
1538 1538
 
1539
-	$defaults = array(
1540
-		'type'     => 'text',
1541
-		'title'    => __( 'HTML anchor', 'ayecode-connect' ),
1542
-		'desc'     => __( 'Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.', 'ayecode-connect' ),
1543
-		'default'  => '',
1544
-		'desc_tip' => true,
1545
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1546
-	);
1539
+    $defaults = array(
1540
+        'type'     => 'text',
1541
+        'title'    => __( 'HTML anchor', 'ayecode-connect' ),
1542
+        'desc'     => __( 'Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.', 'ayecode-connect' ),
1543
+        'default'  => '',
1544
+        'desc_tip' => true,
1545
+        'group'    => __( 'Advanced', 'ayecode-connect' ),
1546
+    );
1547 1547
 
1548
-	$input = wp_parse_args( $overwrite, $defaults );
1548
+    $input = wp_parse_args( $overwrite, $defaults );
1549 1549
 
1550
-	return $input;
1550
+    return $input;
1551 1551
 }
1552 1552
 
1553 1553
 /**
@@ -1560,18 +1560,18 @@  discard block
 block discarded – undo
1560 1560
  */
1561 1561
 function sd_get_class_input( $type = 'css_class', $overwrite = array() ) {
1562 1562
 
1563
-	$defaults = array(
1564
-		'type'     => 'text',
1565
-		'title'    => __( 'Additional CSS class(es)', 'ayecode-connect' ),
1566
-		'desc'     => __( 'Separate multiple classes with spaces.', 'ayecode-connect' ),
1567
-		'default'  => '',
1568
-		'desc_tip' => true,
1569
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1570
-	);
1563
+    $defaults = array(
1564
+        'type'     => 'text',
1565
+        'title'    => __( 'Additional CSS class(es)', 'ayecode-connect' ),
1566
+        'desc'     => __( 'Separate multiple classes with spaces.', 'ayecode-connect' ),
1567
+        'default'  => '',
1568
+        'desc_tip' => true,
1569
+        'group'    => __( 'Advanced', 'ayecode-connect' ),
1570
+    );
1571 1571
 
1572
-	$input = wp_parse_args( $overwrite, $defaults );
1572
+    $input = wp_parse_args( $overwrite, $defaults );
1573 1573
 
1574
-	return $input;
1574
+    return $input;
1575 1575
 }
1576 1576
 
1577 1577
 /**
@@ -1584,341 +1584,341 @@  discard block
 block discarded – undo
1584 1584
  */
1585 1585
 function sd_get_hover_animations_input( $type = 'hover_animations', $overwrite = array() ) {
1586 1586
 
1587
-	$options = array(
1588
-		''                 => __( 'none', 'ayecode-connect' ),
1589
-		'hover-zoom'       => __( 'Zoom', 'ayecode-connect' ),
1590
-		'hover-shadow'     => __( 'Shadow', 'ayecode-connect' ),
1591
-		'hover-move-up'    => __( 'Move up', 'ayecode-connect' ),
1592
-		'hover-move-down'  => __( 'Move down', 'ayecode-connect' ),
1593
-		'hover-move-left'  => __( 'Move left', 'ayecode-connect' ),
1594
-		'hover-move-right' => __( 'Move right', 'ayecode-connect' ),
1595
-	);
1587
+    $options = array(
1588
+        ''                 => __( 'none', 'ayecode-connect' ),
1589
+        'hover-zoom'       => __( 'Zoom', 'ayecode-connect' ),
1590
+        'hover-shadow'     => __( 'Shadow', 'ayecode-connect' ),
1591
+        'hover-move-up'    => __( 'Move up', 'ayecode-connect' ),
1592
+        'hover-move-down'  => __( 'Move down', 'ayecode-connect' ),
1593
+        'hover-move-left'  => __( 'Move left', 'ayecode-connect' ),
1594
+        'hover-move-right' => __( 'Move right', 'ayecode-connect' ),
1595
+    );
1596 1596
 
1597
-	$defaults = array(
1598
-		'type'     => 'select',
1599
-		'multiple' => true,
1600
-		'title'    => __( 'Hover Animations', 'ayecode-connect' ),
1601
-		'options'  => $options,
1602
-		'default'  => '',
1603
-		'desc_tip' => true,
1604
-		'group'    => __( 'Hover Animations', 'ayecode-connect' ),
1605
-	);
1597
+    $defaults = array(
1598
+        'type'     => 'select',
1599
+        'multiple' => true,
1600
+        'title'    => __( 'Hover Animations', 'ayecode-connect' ),
1601
+        'options'  => $options,
1602
+        'default'  => '',
1603
+        'desc_tip' => true,
1604
+        'group'    => __( 'Hover Animations', 'ayecode-connect' ),
1605
+    );
1606 1606
 
1607
-	$input = wp_parse_args( $overwrite, $defaults );
1607
+    $input = wp_parse_args( $overwrite, $defaults );
1608 1608
 
1609
-	return $input;
1609
+    return $input;
1610 1610
 }
1611 1611
 
1612 1612
 
1613 1613
 function sd_get_flex_align_items_input( $type = 'align-items', $overwrite = array() ) {
1614
-	$device_size = '';
1615
-	if ( ! empty( $overwrite['device_type'] ) ) {
1616
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1617
-			$device_size = '-md';
1618
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1619
-			$device_size = '-lg';
1620
-		}
1621
-	}
1622
-	$options = array(
1623
-		''                                         => __( 'Default', 'ayecode-connect' ),
1624
-		'align-items' . $device_size . '-start'    => 'align-items-start',
1625
-		'align-items' . $device_size . '-end'      => 'align-items-end',
1626
-		'align-items' . $device_size . '-center'   => 'align-items-center',
1627
-		'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1628
-		'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1629
-	);
1630
-
1631
-	$defaults = array(
1632
-		'type'            => 'select',
1633
-		'title'           => __( 'Vertical Align Items', 'ayecode-connect' ),
1634
-		'options'         => $options,
1635
-		'default'         => '',
1636
-		'desc_tip'        => true,
1637
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1638
-		'element_require' => ' ( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1639
-
1640
-	);
1641
-
1642
-	$input = wp_parse_args( $overwrite, $defaults );
1643
-
1644
-	return $input;
1614
+    $device_size = '';
1615
+    if ( ! empty( $overwrite['device_type'] ) ) {
1616
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1617
+            $device_size = '-md';
1618
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1619
+            $device_size = '-lg';
1620
+        }
1621
+    }
1622
+    $options = array(
1623
+        ''                                         => __( 'Default', 'ayecode-connect' ),
1624
+        'align-items' . $device_size . '-start'    => 'align-items-start',
1625
+        'align-items' . $device_size . '-end'      => 'align-items-end',
1626
+        'align-items' . $device_size . '-center'   => 'align-items-center',
1627
+        'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1628
+        'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1629
+    );
1630
+
1631
+    $defaults = array(
1632
+        'type'            => 'select',
1633
+        'title'           => __( 'Vertical Align Items', 'ayecode-connect' ),
1634
+        'options'         => $options,
1635
+        'default'         => '',
1636
+        'desc_tip'        => true,
1637
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1638
+        'element_require' => ' ( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1639
+
1640
+    );
1641
+
1642
+    $input = wp_parse_args( $overwrite, $defaults );
1643
+
1644
+    return $input;
1645 1645
 }
1646 1646
 
1647 1647
 function sd_get_flex_align_items_input_group( $type = 'flex_align_items', $overwrite = array() ) {
1648
-	$inputs = array();
1649
-	$sizes  = array(
1650
-		''    => 'Mobile',
1651
-		'_md' => 'Tablet',
1652
-		'_lg' => 'Desktop',
1653
-	);
1648
+    $inputs = array();
1649
+    $sizes  = array(
1650
+        ''    => 'Mobile',
1651
+        '_md' => 'Tablet',
1652
+        '_lg' => 'Desktop',
1653
+    );
1654 1654
 
1655
-	if ( $overwrite !== false ) {
1655
+    if ( $overwrite !== false ) {
1656 1656
 
1657
-		foreach ( $sizes as $ds => $dt ) {
1658
-			$overwrite['device_type'] = $dt;
1659
-			$inputs[ $type . $ds ]    = sd_get_flex_align_items_input( $type, $overwrite );
1660
-		}
1661
-	}
1657
+        foreach ( $sizes as $ds => $dt ) {
1658
+            $overwrite['device_type'] = $dt;
1659
+            $inputs[ $type . $ds ]    = sd_get_flex_align_items_input( $type, $overwrite );
1660
+        }
1661
+    }
1662 1662
 
1663
-	return $inputs;
1663
+    return $inputs;
1664 1664
 }
1665 1665
 
1666 1666
 function sd_get_flex_justify_content_input( $type = 'flex_justify_content', $overwrite = array() ) {
1667
-	$device_size = '';
1668
-	if ( ! empty( $overwrite['device_type'] ) ) {
1669
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1670
-			$device_size = '-md';
1671
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1672
-			$device_size = '-lg';
1673
-		}
1674
-	}
1675
-	$options = array(
1676
-		''                                            => __( 'Default', 'ayecode-connect' ),
1677
-		'justify-content' . $device_size . '-start'   => 'justify-content-start',
1678
-		'justify-content' . $device_size . '-end'     => 'justify-content-end',
1679
-		'justify-content' . $device_size . '-center'  => 'justify-content-center',
1680
-		'justify-content' . $device_size . '-between' => 'justify-content-between',
1681
-		'justify-content' . $device_size . '-stretch' => 'justify-content-around',
1682
-	);
1683
-
1684
-	$defaults = array(
1685
-		'type'            => 'select',
1686
-		'title'           => __( 'Justify content', 'ayecode-connect' ),
1687
-		'options'         => $options,
1688
-		'default'         => '',
1689
-		'desc_tip'        => true,
1690
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1691
-		'element_require' => '( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1692
-
1693
-	);
1694
-
1695
-	$input = wp_parse_args( $overwrite, $defaults );
1696
-
1697
-	return $input;
1667
+    $device_size = '';
1668
+    if ( ! empty( $overwrite['device_type'] ) ) {
1669
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1670
+            $device_size = '-md';
1671
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1672
+            $device_size = '-lg';
1673
+        }
1674
+    }
1675
+    $options = array(
1676
+        ''                                            => __( 'Default', 'ayecode-connect' ),
1677
+        'justify-content' . $device_size . '-start'   => 'justify-content-start',
1678
+        'justify-content' . $device_size . '-end'     => 'justify-content-end',
1679
+        'justify-content' . $device_size . '-center'  => 'justify-content-center',
1680
+        'justify-content' . $device_size . '-between' => 'justify-content-between',
1681
+        'justify-content' . $device_size . '-stretch' => 'justify-content-around',
1682
+    );
1683
+
1684
+    $defaults = array(
1685
+        'type'            => 'select',
1686
+        'title'           => __( 'Justify content', 'ayecode-connect' ),
1687
+        'options'         => $options,
1688
+        'default'         => '',
1689
+        'desc_tip'        => true,
1690
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1691
+        'element_require' => '( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1692
+
1693
+    );
1694
+
1695
+    $input = wp_parse_args( $overwrite, $defaults );
1696
+
1697
+    return $input;
1698 1698
 }
1699 1699
 
1700 1700
 function sd_get_flex_justify_content_input_group( $type = 'flex_justify_content', $overwrite = array() ) {
1701
-	$inputs = array();
1702
-	$sizes  = array(
1703
-		''    => 'Mobile',
1704
-		'_md' => 'Tablet',
1705
-		'_lg' => 'Desktop',
1706
-	);
1701
+    $inputs = array();
1702
+    $sizes  = array(
1703
+        ''    => 'Mobile',
1704
+        '_md' => 'Tablet',
1705
+        '_lg' => 'Desktop',
1706
+    );
1707 1707
 
1708
-	if ( $overwrite !== false ) {
1708
+    if ( $overwrite !== false ) {
1709 1709
 
1710
-		foreach ( $sizes as $ds => $dt ) {
1711
-			$overwrite['device_type'] = $dt;
1712
-			$inputs[ $type . $ds ]    = sd_get_flex_justify_content_input( $type, $overwrite );
1713
-		}
1714
-	}
1710
+        foreach ( $sizes as $ds => $dt ) {
1711
+            $overwrite['device_type'] = $dt;
1712
+            $inputs[ $type . $ds ]    = sd_get_flex_justify_content_input( $type, $overwrite );
1713
+        }
1714
+    }
1715 1715
 
1716
-	return $inputs;
1716
+    return $inputs;
1717 1717
 }
1718 1718
 
1719 1719
 
1720 1720
 function sd_get_flex_align_self_input( $type = 'flex_align_self', $overwrite = array() ) {
1721
-	$device_size = '';
1722
-	if ( ! empty( $overwrite['device_type'] ) ) {
1723
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1724
-			$device_size = '-md';
1725
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1726
-			$device_size = '-lg';
1727
-		}
1728
-	}
1729
-	$options = array(
1730
-		''                                         => __( 'Default', 'ayecode-connect' ),
1731
-		'align-items' . $device_size . '-start'    => 'align-items-start',
1732
-		'align-items' . $device_size . '-end'      => 'align-items-end',
1733
-		'align-items' . $device_size . '-center'   => 'align-items-center',
1734
-		'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1735
-		'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1736
-	);
1737
-
1738
-	$defaults = array(
1739
-		'type'            => 'select',
1740
-		'title'           => __( 'Align Self', 'ayecode-connect' ),
1741
-		'options'         => $options,
1742
-		'default'         => '',
1743
-		'desc_tip'        => true,
1744
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1745
-		'element_require' => ' [%container%]=="col" ',
1746
-
1747
-	);
1748
-
1749
-	$input = wp_parse_args( $overwrite, $defaults );
1750
-
1751
-	return $input;
1721
+    $device_size = '';
1722
+    if ( ! empty( $overwrite['device_type'] ) ) {
1723
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1724
+            $device_size = '-md';
1725
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1726
+            $device_size = '-lg';
1727
+        }
1728
+    }
1729
+    $options = array(
1730
+        ''                                         => __( 'Default', 'ayecode-connect' ),
1731
+        'align-items' . $device_size . '-start'    => 'align-items-start',
1732
+        'align-items' . $device_size . '-end'      => 'align-items-end',
1733
+        'align-items' . $device_size . '-center'   => 'align-items-center',
1734
+        'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1735
+        'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1736
+    );
1737
+
1738
+    $defaults = array(
1739
+        'type'            => 'select',
1740
+        'title'           => __( 'Align Self', 'ayecode-connect' ),
1741
+        'options'         => $options,
1742
+        'default'         => '',
1743
+        'desc_tip'        => true,
1744
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1745
+        'element_require' => ' [%container%]=="col" ',
1746
+
1747
+    );
1748
+
1749
+    $input = wp_parse_args( $overwrite, $defaults );
1750
+
1751
+    return $input;
1752 1752
 }
1753 1753
 
1754 1754
 function sd_get_flex_align_self_input_group( $type = 'flex_align_self', $overwrite = array() ) {
1755
-	$inputs = array();
1756
-	$sizes  = array(
1757
-		''    => 'Mobile',
1758
-		'_md' => 'Tablet',
1759
-		'_lg' => 'Desktop',
1760
-	);
1755
+    $inputs = array();
1756
+    $sizes  = array(
1757
+        ''    => 'Mobile',
1758
+        '_md' => 'Tablet',
1759
+        '_lg' => 'Desktop',
1760
+    );
1761 1761
 
1762
-	if ( $overwrite !== false ) {
1762
+    if ( $overwrite !== false ) {
1763 1763
 
1764
-		foreach ( $sizes as $ds => $dt ) {
1765
-			$overwrite['device_type'] = $dt;
1766
-			$inputs[ $type . $ds ]    = sd_get_flex_align_self_input( $type, $overwrite );
1767
-		}
1768
-	}
1764
+        foreach ( $sizes as $ds => $dt ) {
1765
+            $overwrite['device_type'] = $dt;
1766
+            $inputs[ $type . $ds ]    = sd_get_flex_align_self_input( $type, $overwrite );
1767
+        }
1768
+    }
1769 1769
 
1770
-	return $inputs;
1770
+    return $inputs;
1771 1771
 }
1772 1772
 
1773 1773
 function sd_get_flex_order_input( $type = 'flex_order', $overwrite = array() ) {
1774
-	$device_size = '';
1775
-	if ( ! empty( $overwrite['device_type'] ) ) {
1776
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1777
-			$device_size = '-md';
1778
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1779
-			$device_size = '-lg';
1780
-		}
1781
-	}
1782
-	$options = array(
1783
-		'' => __( 'Default', 'ayecode-connect' ),
1784
-	);
1785
-
1786
-	$i = 0;
1787
-	while ( $i <= 5 ) {
1788
-		$options[ 'order' . $device_size . '-' . $i ] = $i;
1789
-		$i++;
1790
-	}
1791
-
1792
-	$defaults = array(
1793
-		'type'            => 'select',
1794
-		'title'           => __( 'Flex Order', 'ayecode-connect' ),
1795
-		'options'         => $options,
1796
-		'default'         => '',
1797
-		'desc_tip'        => true,
1798
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1799
-		'element_require' => ' [%container%]=="col" ',
1800
-
1801
-	);
1802
-
1803
-	$input = wp_parse_args( $overwrite, $defaults );
1804
-
1805
-	return $input;
1774
+    $device_size = '';
1775
+    if ( ! empty( $overwrite['device_type'] ) ) {
1776
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1777
+            $device_size = '-md';
1778
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1779
+            $device_size = '-lg';
1780
+        }
1781
+    }
1782
+    $options = array(
1783
+        '' => __( 'Default', 'ayecode-connect' ),
1784
+    );
1785
+
1786
+    $i = 0;
1787
+    while ( $i <= 5 ) {
1788
+        $options[ 'order' . $device_size . '-' . $i ] = $i;
1789
+        $i++;
1790
+    }
1791
+
1792
+    $defaults = array(
1793
+        'type'            => 'select',
1794
+        'title'           => __( 'Flex Order', 'ayecode-connect' ),
1795
+        'options'         => $options,
1796
+        'default'         => '',
1797
+        'desc_tip'        => true,
1798
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1799
+        'element_require' => ' [%container%]=="col" ',
1800
+
1801
+    );
1802
+
1803
+    $input = wp_parse_args( $overwrite, $defaults );
1804
+
1805
+    return $input;
1806 1806
 }
1807 1807
 
1808 1808
 function sd_get_flex_order_input_group( $type = 'flex_order', $overwrite = array() ) {
1809
-	$inputs = array();
1810
-	$sizes  = array(
1811
-		''    => 'Mobile',
1812
-		'_md' => 'Tablet',
1813
-		'_lg' => 'Desktop',
1814
-	);
1809
+    $inputs = array();
1810
+    $sizes  = array(
1811
+        ''    => 'Mobile',
1812
+        '_md' => 'Tablet',
1813
+        '_lg' => 'Desktop',
1814
+    );
1815 1815
 
1816
-	if ( $overwrite !== false ) {
1816
+    if ( $overwrite !== false ) {
1817 1817
 
1818
-		foreach ( $sizes as $ds => $dt ) {
1819
-			$overwrite['device_type'] = $dt;
1820
-			$inputs[ $type . $ds ]    = sd_get_flex_order_input( $type, $overwrite );
1821
-		}
1822
-	}
1818
+        foreach ( $sizes as $ds => $dt ) {
1819
+            $overwrite['device_type'] = $dt;
1820
+            $inputs[ $type . $ds ]    = sd_get_flex_order_input( $type, $overwrite );
1821
+        }
1822
+    }
1823 1823
 
1824
-	return $inputs;
1824
+    return $inputs;
1825 1825
 }
1826 1826
 
1827 1827
 function sd_get_flex_wrap_group( $type = 'flex_wrap', $overwrite = array() ) {
1828
-	$inputs = array();
1829
-	$sizes  = array(
1830
-		''    => 'Mobile',
1831
-		'_md' => 'Tablet',
1832
-		'_lg' => 'Desktop',
1833
-	);
1828
+    $inputs = array();
1829
+    $sizes  = array(
1830
+        ''    => 'Mobile',
1831
+        '_md' => 'Tablet',
1832
+        '_lg' => 'Desktop',
1833
+    );
1834 1834
 
1835
-	if ( $overwrite !== false ) {
1835
+    if ( $overwrite !== false ) {
1836 1836
 
1837
-		foreach ( $sizes as $ds => $dt ) {
1838
-			$overwrite['device_type'] = $dt;
1839
-			$inputs[ $type . $ds ]    = sd_get_flex_wrap_input( $type, $overwrite );
1840
-		}
1841
-	}
1837
+        foreach ( $sizes as $ds => $dt ) {
1838
+            $overwrite['device_type'] = $dt;
1839
+            $inputs[ $type . $ds ]    = sd_get_flex_wrap_input( $type, $overwrite );
1840
+        }
1841
+    }
1842 1842
 
1843
-	return $inputs;
1843
+    return $inputs;
1844 1844
 }
1845 1845
 
1846 1846
 function sd_get_flex_wrap_input( $type = 'flex_wrap', $overwrite = array() ) {
1847
-	$device_size = '';
1848
-	if ( ! empty( $overwrite['device_type'] ) ) {
1849
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1850
-			$device_size = '-md';
1851
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1852
-			$device_size = '-lg';
1853
-		}
1854
-	}
1855
-	$options = array(
1856
-		''                                      => __( 'Default', 'ayecode-connect' ),
1857
-		'flex' . $device_size . '-nowrap'       => 'nowrap',
1858
-		'flex' . $device_size . '-wrap'         => 'wrap',
1859
-		'flex' . $device_size . '-wrap-reverse' => 'wrap-reverse',
1860
-	);
1861
-
1862
-	$defaults = array(
1863
-		'type'     => 'select',
1864
-		'title'    => __( 'Flex wrap', 'ayecode-connect' ),
1865
-		'options'  => $options,
1866
-		'default'  => '',
1867
-		'desc_tip' => true,
1868
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1869
-	);
1870
-
1871
-	$input = wp_parse_args( $overwrite, $defaults );
1872
-
1873
-	return $input;
1847
+    $device_size = '';
1848
+    if ( ! empty( $overwrite['device_type'] ) ) {
1849
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1850
+            $device_size = '-md';
1851
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1852
+            $device_size = '-lg';
1853
+        }
1854
+    }
1855
+    $options = array(
1856
+        ''                                      => __( 'Default', 'ayecode-connect' ),
1857
+        'flex' . $device_size . '-nowrap'       => 'nowrap',
1858
+        'flex' . $device_size . '-wrap'         => 'wrap',
1859
+        'flex' . $device_size . '-wrap-reverse' => 'wrap-reverse',
1860
+    );
1861
+
1862
+    $defaults = array(
1863
+        'type'     => 'select',
1864
+        'title'    => __( 'Flex wrap', 'ayecode-connect' ),
1865
+        'options'  => $options,
1866
+        'default'  => '',
1867
+        'desc_tip' => true,
1868
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1869
+    );
1870
+
1871
+    $input = wp_parse_args( $overwrite, $defaults );
1872
+
1873
+    return $input;
1874 1874
 }
1875 1875
 
1876 1876
 function sd_get_float_group( $type = 'float', $overwrite = array() ) {
1877
-	$inputs = array();
1878
-	$sizes  = array(
1879
-		''    => 'Mobile',
1880
-		'_md' => 'Tablet',
1881
-		'_lg' => 'Desktop',
1882
-	);
1877
+    $inputs = array();
1878
+    $sizes  = array(
1879
+        ''    => 'Mobile',
1880
+        '_md' => 'Tablet',
1881
+        '_lg' => 'Desktop',
1882
+    );
1883 1883
 
1884
-	if ( $overwrite !== false ) {
1884
+    if ( $overwrite !== false ) {
1885 1885
 
1886
-		foreach ( $sizes as $ds => $dt ) {
1887
-			$overwrite['device_type'] = $dt;
1888
-			$inputs[ $type . $ds ]    = sd_get_float_input( $type, $overwrite );
1889
-		}
1890
-	}
1886
+        foreach ( $sizes as $ds => $dt ) {
1887
+            $overwrite['device_type'] = $dt;
1888
+            $inputs[ $type . $ds ]    = sd_get_float_input( $type, $overwrite );
1889
+        }
1890
+    }
1891 1891
 
1892
-	return $inputs;
1892
+    return $inputs;
1893 1893
 }
1894 1894
 function sd_get_float_input( $type = 'float', $overwrite = array() ) {
1895
-	$device_size = '';
1896
-	if ( ! empty( $overwrite['device_type'] ) ) {
1897
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1898
-			$device_size = '-md';
1899
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1900
-			$device_size = '-lg';
1901
-		}
1902
-	}
1903
-	$options = array(
1904
-		''                                      => __( 'Default', 'ayecode-connect' ),
1905
-		'float' . $device_size . '-start'       => 'left',
1906
-		'float' . $device_size . '-end'         => 'right',
1907
-		'float' . $device_size . '-none' => 'none',
1908
-	);
1909
-
1910
-	$defaults = array(
1911
-		'type'     => 'select',
1912
-		'title'    => __( 'Float', 'ayecode-connect' ),
1913
-		'options'  => $options,
1914
-		'default'  => '',
1915
-		'desc_tip' => true,
1916
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1917
-	);
1918
-
1919
-	$input = wp_parse_args( $overwrite, $defaults );
1920
-
1921
-	return $input;
1895
+    $device_size = '';
1896
+    if ( ! empty( $overwrite['device_type'] ) ) {
1897
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1898
+            $device_size = '-md';
1899
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1900
+            $device_size = '-lg';
1901
+        }
1902
+    }
1903
+    $options = array(
1904
+        ''                                      => __( 'Default', 'ayecode-connect' ),
1905
+        'float' . $device_size . '-start'       => 'left',
1906
+        'float' . $device_size . '-end'         => 'right',
1907
+        'float' . $device_size . '-none' => 'none',
1908
+    );
1909
+
1910
+    $defaults = array(
1911
+        'type'     => 'select',
1912
+        'title'    => __( 'Float', 'ayecode-connect' ),
1913
+        'options'  => $options,
1914
+        'default'  => '',
1915
+        'desc_tip' => true,
1916
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1917
+    );
1918
+
1919
+    $input = wp_parse_args( $overwrite, $defaults );
1920
+
1921
+    return $input;
1922 1922
 }
1923 1923
 
1924 1924
 /**
@@ -1929,26 +1929,26 @@  discard block
 block discarded – undo
1929 1929
  */
1930 1930
 function sd_get_zindex_input( $type = 'zindex', $overwrite = array() ) {
1931 1931
 
1932
-	$options = array(
1933
-		''          => __( 'Default', 'ayecode-connect' ),
1934
-		'zindex-0'  => '0',
1935
-		'zindex-1'  => '1',
1936
-		'zindex-5'  => '5',
1937
-		'zindex-10' => '10',
1938
-	);
1932
+    $options = array(
1933
+        ''          => __( 'Default', 'ayecode-connect' ),
1934
+        'zindex-0'  => '0',
1935
+        'zindex-1'  => '1',
1936
+        'zindex-5'  => '5',
1937
+        'zindex-10' => '10',
1938
+    );
1939 1939
 
1940
-	$defaults = array(
1941
-		'type'     => 'select',
1942
-		'title'    => __( 'Z-index', 'ayecode-connect' ),
1943
-		'options'  => $options,
1944
-		'default'  => '',
1945
-		'desc_tip' => true,
1946
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1947
-	);
1940
+    $defaults = array(
1941
+        'type'     => 'select',
1942
+        'title'    => __( 'Z-index', 'ayecode-connect' ),
1943
+        'options'  => $options,
1944
+        'default'  => '',
1945
+        'desc_tip' => true,
1946
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1947
+    );
1948 1948
 
1949
-	$input = wp_parse_args( $overwrite, $defaults );
1949
+    $input = wp_parse_args( $overwrite, $defaults );
1950 1950
 
1951
-	return $input;
1951
+    return $input;
1952 1952
 }
1953 1953
 
1954 1954
 /**
@@ -1959,26 +1959,26 @@  discard block
 block discarded – undo
1959 1959
  */
1960 1960
 function sd_get_overflow_input( $type = 'overflow', $overwrite = array() ) {
1961 1961
 
1962
-	$options = array(
1963
-		''                 => __( 'Default', 'ayecode-connect' ),
1964
-		'overflow-auto'    => __( 'Auto', 'ayecode-connect' ),
1965
-		'overflow-hidden'  => __( 'Hidden', 'ayecode-connect' ),
1966
-		'overflow-visible' => __( 'Visible', 'ayecode-connect' ),
1967
-		'overflow-scroll'  => __( 'Scroll', 'ayecode-connect' ),
1968
-	);
1962
+    $options = array(
1963
+        ''                 => __( 'Default', 'ayecode-connect' ),
1964
+        'overflow-auto'    => __( 'Auto', 'ayecode-connect' ),
1965
+        'overflow-hidden'  => __( 'Hidden', 'ayecode-connect' ),
1966
+        'overflow-visible' => __( 'Visible', 'ayecode-connect' ),
1967
+        'overflow-scroll'  => __( 'Scroll', 'ayecode-connect' ),
1968
+    );
1969 1969
 
1970
-	$defaults = array(
1971
-		'type'     => 'select',
1972
-		'title'    => __( 'Overflow', 'ayecode-connect' ),
1973
-		'options'  => $options,
1974
-		'default'  => '',
1975
-		'desc_tip' => true,
1976
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1977
-	);
1970
+    $defaults = array(
1971
+        'type'     => 'select',
1972
+        'title'    => __( 'Overflow', 'ayecode-connect' ),
1973
+        'options'  => $options,
1974
+        'default'  => '',
1975
+        'desc_tip' => true,
1976
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1977
+    );
1978 1978
 
1979
-	$input = wp_parse_args( $overwrite, $defaults );
1979
+    $input = wp_parse_args( $overwrite, $defaults );
1980 1980
 
1981
-	return $input;
1981
+    return $input;
1982 1982
 }
1983 1983
 
1984 1984
 /**
@@ -1989,19 +1989,19 @@  discard block
 block discarded – undo
1989 1989
  */
1990 1990
 function sd_get_max_height_input( $type = 'max_height', $overwrite = array() ) {
1991 1991
 
1992
-	$defaults = array(
1993
-		'type'        => 'text',
1994
-		'title'       => __( 'Max height', 'ayecode-connect' ),
1995
-		'value'       => '',
1996
-		'default'     => '',
1997
-		'placeholder' => '',
1998
-		'desc_tip'    => true,
1999
-		'group'       => __( 'Wrapper Styles', 'ayecode-connect' ),
2000
-	);
1992
+    $defaults = array(
1993
+        'type'        => 'text',
1994
+        'title'       => __( 'Max height', 'ayecode-connect' ),
1995
+        'value'       => '',
1996
+        'default'     => '',
1997
+        'placeholder' => '',
1998
+        'desc_tip'    => true,
1999
+        'group'       => __( 'Wrapper Styles', 'ayecode-connect' ),
2000
+    );
2001 2001
 
2002
-	$input = wp_parse_args( $overwrite, $defaults );
2002
+    $input = wp_parse_args( $overwrite, $defaults );
2003 2003
 
2004
-	return $input;
2004
+    return $input;
2005 2005
 }
2006 2006
 
2007 2007
 /**
@@ -2012,23 +2012,23 @@  discard block
 block discarded – undo
2012 2012
  */
2013 2013
 function sd_get_scrollbars_input( $type = 'scrollbars', $overwrite = array() ) {
2014 2014
 
2015
-	$options = array(
2016
-		''               => __( 'Default', 'ayecode-connect' ),
2017
-		'scrollbars-ios' => __( 'IOS Style', 'ayecode-connect' ),
2018
-	);
2015
+    $options = array(
2016
+        ''               => __( 'Default', 'ayecode-connect' ),
2017
+        'scrollbars-ios' => __( 'IOS Style', 'ayecode-connect' ),
2018
+    );
2019 2019
 
2020
-	$defaults = array(
2021
-		'type'     => 'select',
2022
-		'title'    => __( 'Scrollbars', 'ayecode-connect' ),
2023
-		'options'  => $options,
2024
-		'default'  => '',
2025
-		'desc_tip' => true,
2026
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2027
-	);
2020
+    $defaults = array(
2021
+        'type'     => 'select',
2022
+        'title'    => __( 'Scrollbars', 'ayecode-connect' ),
2023
+        'options'  => $options,
2024
+        'default'  => '',
2025
+        'desc_tip' => true,
2026
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2027
+    );
2028 2028
 
2029
-	$input = wp_parse_args( $overwrite, $defaults );
2029
+    $input = wp_parse_args( $overwrite, $defaults );
2030 2030
 
2031
-	return $input;
2031
+    return $input;
2032 2032
 }
2033 2033
 
2034 2034
 /**
@@ -2040,415 +2040,415 @@  discard block
 block discarded – undo
2040 2040
  * @todo find best way to use px- py- or general p-
2041 2041
  */
2042 2042
 function sd_build_aui_class( $args ) {
2043
-	global $aui_bs5;
2044
-
2045
-	$classes = array();
2046
-
2047
-	if ( $aui_bs5 ) {
2048
-		$p_ml = 'ms-';
2049
-		$p_mr = 'me-';
2050
-
2051
-		$p_pl = 'ps-';
2052
-		$p_pr = 'pe-';
2053
-	} else {
2054
-		$p_ml = 'ml-';
2055
-		$p_mr = 'mr-';
2056
-
2057
-		$p_pl = 'pl-';
2058
-		$p_pr = 'pr-';
2059
-	}
2060
-
2061
-	// margins.
2062
-	if ( isset( $args['mt'] ) && $args['mt'] !== '' ) {
2063
-		$classes[] = 'mt-' . sanitize_html_class( $args['mt'] );
2064
-		$mt        = $args['mt'];
2065
-	} else {
2066
-		$mt = null;
2067
-	}
2068
-	if ( isset( $args['mr'] ) && $args['mr'] !== '' ) {
2069
-		$classes[] = $p_mr . sanitize_html_class( $args['mr'] );
2070
-		$mr        = $args['mr'];
2071
-	} else {
2072
-		$mr = null;
2073
-	}
2074
-	if ( isset( $args['mb'] ) && $args['mb'] !== '' ) {
2075
-		$classes[] = 'mb-' . sanitize_html_class( $args['mb'] );
2076
-		$mb        = $args['mb'];
2077
-	} else {
2078
-		$mb = null;
2079
-	}
2080
-	if ( isset( $args['ml'] ) && $args['ml'] !== '' ) {
2081
-		$classes[] = $p_ml . sanitize_html_class( $args['ml'] );
2082
-		$ml        = $args['ml'];
2083
-	} else {
2084
-		$ml = null;
2085
-	}
2086
-
2087
-	// margins tablet.
2088
-	if ( isset( $args['mt_md'] ) && $args['mt_md'] !== '' ) {
2089
-		$classes[] = 'mt-md-' . sanitize_html_class( $args['mt_md'] );
2090
-		$mt_md     = $args['mt_md'];
2091
-	} else {
2092
-		$mt_md = null;
2093
-	}
2094
-	if ( isset( $args['mr_md'] ) && $args['mr_md'] !== '' ) {
2095
-		$classes[] = $p_mr . 'md-' . sanitize_html_class( $args['mr_md'] );
2096
-		$mt_md     = $args['mr_md'];
2097
-	} else {
2098
-		$mr_md = null;
2099
-	}
2100
-	if ( isset( $args['mb_md'] ) && $args['mb_md'] !== '' ) {
2101
-		$classes[] = 'mb-md-' . sanitize_html_class( $args['mb_md'] );
2102
-		$mt_md     = $args['mb_md'];
2103
-	} else {
2104
-		$mb_md = null;
2105
-	}
2106
-	if ( isset( $args['ml_md'] ) && $args['ml_md'] !== '' ) {
2107
-		$classes[] = $p_ml . 'md-' . sanitize_html_class( $args['ml_md'] );
2108
-		$mt_md     = $args['ml_md'];
2109
-	} else {
2110
-		$ml_md = null;
2111
-	}
2112
-
2113
-	// margins desktop.
2114
-	if ( isset( $args['mt_lg'] ) && $args['mt_lg'] !== '' ) {
2115
-		if ( $mt == null && $mt_md == null ) {
2116
-			$classes[] = 'mt-' . sanitize_html_class( $args['mt_lg'] );
2117
-		} else {
2118
-			$classes[] = 'mt-lg-' . sanitize_html_class( $args['mt_lg'] );
2119
-		}
2120
-	}
2121
-	if ( isset( $args['mr_lg'] ) && $args['mr_lg'] !== '' ) {
2122
-		if ( $mr == null && $mr_md == null ) {
2123
-			$classes[] = $p_mr . sanitize_html_class( $args['mr_lg'] );
2124
-		} else {
2125
-			$classes[] = $p_mr . 'lg-' . sanitize_html_class( $args['mr_lg'] );
2126
-		}
2127
-	}
2128
-	if ( isset( $args['mb_lg'] ) && $args['mb_lg'] !== '' ) {
2129
-		if ( $mb == null && $mb_md == null ) {
2130
-			$classes[] = 'mb-' . sanitize_html_class( $args['mb_lg'] );
2131
-		} else {
2132
-			$classes[] = 'mb-lg-' . sanitize_html_class( $args['mb_lg'] );
2133
-		}
2134
-	}
2135
-	if ( isset( $args['ml_lg'] ) && $args['ml_lg'] !== '' ) {
2136
-		if ( $ml == null && $ml_md == null ) {
2137
-			$classes[] = $p_ml . sanitize_html_class( $args['ml_lg'] );
2138
-		} else {
2139
-			$classes[] = $p_ml . 'lg-' . sanitize_html_class( $args['ml_lg'] );
2140
-		}
2141
-	}
2142
-
2143
-	// padding.
2144
-	if ( isset( $args['pt'] ) && $args['pt'] !== '' ) {
2145
-		$classes[] = 'pt-' . sanitize_html_class( $args['pt'] );
2146
-		$pt        = $args['pt'];
2147
-	} else {
2148
-		$pt = null;
2149
-	}
2150
-	if ( isset( $args['pr'] ) && $args['pr'] !== '' ) {
2151
-		$classes[] = $p_pr . sanitize_html_class( $args['pr'] );
2152
-		$pr        = $args['pr'];
2153
-	} else {
2154
-		$pr = null;
2155
-	}
2156
-	if ( isset( $args['pb'] ) && $args['pb'] !== '' ) {
2157
-		$classes[] = 'pb-' . sanitize_html_class( $args['pb'] );
2158
-		$pb        = $args['pb'];
2159
-	} else {
2160
-		$pb = null;
2161
-	}
2162
-	if ( isset( $args['pl'] ) && $args['pl'] !== '' ) {
2163
-		$classes[] = $p_pl . sanitize_html_class( $args['pl'] );
2164
-		$pl        = $args['pl'];
2165
-	} else {
2166
-		$pl = null;
2167
-	}
2168
-
2169
-	// padding tablet.
2170
-	if ( isset( $args['pt_md'] ) && $args['pt_md'] !== '' ) {
2171
-		$classes[] = 'pt-md-' . sanitize_html_class( $args['pt_md'] );
2172
-		$pt_md     = $args['pt_md'];
2173
-	} else {
2174
-		$pt_md = null;
2175
-	}
2176
-	if ( isset( $args['pr_md'] ) && $args['pr_md'] !== '' ) {
2177
-		$classes[] = $p_pr . 'md-' . sanitize_html_class( $args['pr_md'] );
2178
-		$pr_md     = $args['pr_md'];
2179
-	} else {
2180
-		$pr_md = null;
2181
-	}
2182
-	if ( isset( $args['pb_md'] ) && $args['pb_md'] !== '' ) {
2183
-		$classes[] = 'pb-md-' . sanitize_html_class( $args['pb_md'] );
2184
-		$pb_md     = $args['pb_md'];
2185
-	} else {
2186
-		$pb_md = null;
2187
-	}
2188
-	if ( isset( $args['pl_md'] ) && $args['pl_md'] !== '' ) {
2189
-		$classes[] = $p_pl . 'md-' . sanitize_html_class( $args['pl_md'] );
2190
-		$pl_md     = $args['pl_md'];
2191
-	} else {
2192
-		$pl_md = null;
2193
-	}
2194
-
2195
-	// padding desktop.
2196
-	if ( isset( $args['pt_lg'] ) && $args['pt_lg'] !== '' ) {
2197
-		if ( $pt == null && $pt_md == null ) {
2198
-			$classes[] = 'pt-' . sanitize_html_class( $args['pt_lg'] );
2199
-		} else {
2200
-			$classes[] = 'pt-lg-' . sanitize_html_class( $args['pt_lg'] );
2201
-		}
2202
-	}
2203
-	if ( isset( $args['pr_lg'] ) && $args['pr_lg'] !== '' ) {
2204
-		if ( $pr == null && $pr_md == null ) {
2205
-			$classes[] = $p_pr . sanitize_html_class( $args['pr_lg'] );
2206
-		} else {
2207
-			$classes[] = $p_pr . 'lg-' . sanitize_html_class( $args['pr_lg'] );
2208
-		}
2209
-	}
2210
-	if ( isset( $args['pb_lg'] ) && $args['pb_lg'] !== '' ) {
2211
-		if ( $pb == null && $pb_md == null ) {
2212
-			$classes[] = 'pb-' . sanitize_html_class( $args['pb_lg'] );
2213
-		} else {
2214
-			$classes[] = 'pb-lg-' . sanitize_html_class( $args['pb_lg'] );
2215
-		}
2216
-	}
2217
-	if ( isset( $args['pl_lg'] ) && $args['pl_lg'] !== '' ) {
2218
-		if ( $pl == null && $pl_md == null ) {
2219
-			$classes[] = $p_pl . sanitize_html_class( $args['pl_lg'] );
2220
-		} else {
2221
-			$classes[] = $p_pl . 'lg-' . sanitize_html_class( $args['pl_lg'] );
2222
-		}
2223
-	}
2224
-
2225
-	// row cols, mobile, tablet, desktop
2226
-	if ( ! empty( $args['row_cols'] ) && $args['row_cols'] !== '' ) {
2227
-		$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols'] );
2228
-		$row_cols  = $args['row_cols'];
2229
-	} else {
2230
-		$row_cols = null;
2231
-	}
2232
-	if ( ! empty( $args['row_cols_md'] ) && $args['row_cols_md'] !== '' ) {
2233
-		$classes[]   = sanitize_html_class( 'row-cols-md-' . $args['row_cols_md'] );
2234
-		$row_cols_md = $args['row_cols_md'];
2235
-	} else {
2236
-		$row_cols_md = null;
2237
-	}
2238
-	if ( ! empty( $args['row_cols_lg'] ) && $args['row_cols_lg'] !== '' ) {
2239
-		if ( $row_cols == null && $row_cols_md == null ) {
2240
-			$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols_lg'] );
2241
-		} else {
2242
-			$classes[] = sanitize_html_class( 'row-cols-lg-' . $args['row_cols_lg'] );
2243
-		}
2244
-	}
2245
-
2246
-	// columns , mobile, tablet, desktop
2247
-	if ( ! empty( $args['col'] ) && $args['col'] !== '' ) {
2248
-		$classes[] = sanitize_html_class( 'col-' . $args['col'] );
2249
-		$col       = $args['col'];
2250
-	} else {
2251
-		$col = null;
2252
-	}
2253
-	if ( ! empty( $args['col_md'] ) && $args['col_md'] !== '' ) {
2254
-		$classes[] = sanitize_html_class( 'col-md-' . $args['col_md'] );
2255
-		$col_md    = $args['col_md'];
2256
-	} else {
2257
-		$col_md = null;
2258
-	}
2259
-	if ( ! empty( $args['col_lg'] ) && $args['col_lg'] !== '' ) {
2260
-		if ( $col == null && $col_md == null ) {
2261
-			$classes[] = sanitize_html_class( 'col-' . $args['col_lg'] );
2262
-		} else {
2263
-			$classes[] = sanitize_html_class( 'col-lg-' . $args['col_lg'] );
2264
-		}
2265
-	}
2266
-
2267
-	// border
2268
-	if ( isset( $args['border'] ) && ( $args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0 ) ) {
2269
-		$classes[] = 'border-0';
2270
-	} elseif ( ! empty( $args['border'] ) ) {
2271
-		$border_class = 'border';
2272
-		if ( ! empty( $args['border_type'] ) && strpos( $args['border_type'], '-0' ) === false ) {
2273
-			$border_class = '';
2274
-		}
2275
-		$classes[] = $border_class . ' border-' . sanitize_html_class( $args['border'] );
2276
-	}
2277
-
2278
-	// border radius type
2279
-	if ( ! empty( $args['rounded'] ) ) {
2280
-		$classes[] = sanitize_html_class( $args['rounded'] );
2281
-	}
2282
-
2283
-	// border radius size BS4
2284
-	if ( isset( $args['rounded_size'] ) && in_array( $args['rounded_size'], array( 'sm', 'lg' ) ) ) {
2285
-		$classes[] = 'rounded-' . sanitize_html_class( $args['rounded_size'] );
2286
-		// if we set a size then we need to remove "rounded" if set
2287
-		if ( ( $key = array_search( 'rounded', $classes ) ) !== false ) {
2288
-			unset( $classes[ $key ] );
2289
-		}
2290
-	} else {
2291
-
2292
-		// border radius size , mobile, tablet, desktop
2293
-		if ( isset( $args['rounded_size'] ) && $args['rounded_size'] !== '' ) {
2294
-			$classes[]    = sanitize_html_class( 'rounded-' . $args['rounded_size'] );
2295
-			$rounded_size = $args['rounded_size'];
2296
-		} else {
2297
-			$rounded_size = null;
2298
-		}
2299
-		if ( isset( $args['rounded_size_md'] ) && $args['rounded_size_md'] !== '' ) {
2300
-			$classes[]       = sanitize_html_class( 'rounded-md-' . $args['rounded_size_md'] );
2301
-			$rounded_size_md = $args['rounded_size_md'];
2302
-		} else {
2303
-			$rounded_size_md = null;
2304
-		}
2305
-		if ( isset( $args['rounded_size_lg'] ) && $args['rounded_size_lg'] !== '' ) {
2306
-			if ( $rounded_size == null && $rounded_size_md == null ) {
2307
-				$classes[] = sanitize_html_class( 'rounded-' . $args['rounded_size_lg'] );
2308
-			} else {
2309
-				$classes[] = sanitize_html_class( 'rounded-lg-' . $args['rounded_size_lg'] );
2310
-			}
2311
-		}
2312
-	}
2313
-
2314
-	// shadow
2315
-	//if ( !empty( $args['shadow'] ) ) { $classes[] = sanitize_html_class($args['shadow']); }
2316
-
2317
-	// background
2318
-	if ( ! empty( $args['bg'] ) ) {
2319
-		$classes[] = 'bg-' . sanitize_html_class( $args['bg'] );
2320
-	}
2321
-
2322
-	// text_color
2323
-	if ( ! empty( $args['text_color'] ) ) {
2324
-		$classes[] = 'text-' . sanitize_html_class( $args['text_color'] );
2325
-	}
2326
-
2327
-	// text_align
2328
-	if ( ! empty( $args['text_justify'] ) ) {
2329
-		$classes[] = 'text-justify';
2330
-	} else {
2331
-		if ( ! empty( $args['text_align'] ) ) {
2332
-			$classes[]  = sanitize_html_class( $args['text_align'] );
2333
-			$text_align = $args['text_align'];
2334
-		} else {
2335
-			$text_align = null;
2336
-		}
2337
-		if ( ! empty( $args['text_align_md'] ) && $args['text_align_md'] !== '' ) {
2338
-			$classes[]     = sanitize_html_class( $args['text_align_md'] );
2339
-			$text_align_md = $args['text_align_md'];
2340
-		} else {
2341
-			$text_align_md = null;
2342
-		}
2343
-		if ( ! empty( $args['text_align_lg'] ) && $args['text_align_lg'] !== '' ) {
2344
-			if ( $text_align == null && $text_align_md == null ) {
2345
-				$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['text_align_lg'] ) );
2346
-			} else {
2347
-				$classes[] = sanitize_html_class( $args['text_align_lg'] );
2348
-			}
2349
-		}
2350
-	}
2351
-
2352
-	// display
2353
-	if ( ! empty( $args['display'] ) ) {
2354
-		$classes[] = sanitize_html_class( $args['display'] );
2355
-		$display   = $args['display'];
2356
-	} else {
2357
-		$display = null;
2358
-	}
2359
-	if ( ! empty( $args['display_md'] ) && $args['display_md'] !== '' ) {
2360
-		$classes[]  = sanitize_html_class( $args['display_md'] );
2361
-		$display_md = $args['display_md'];
2362
-	} else {
2363
-		$display_md = null;
2364
-	}
2365
-	if ( ! empty( $args['display_lg'] ) && $args['display_lg'] !== '' ) {
2366
-		if ( $display == null && $display_md == null ) {
2367
-			$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['display_lg'] ) );
2368
-		} else {
2369
-			$classes[] = sanitize_html_class( $args['display_lg'] );
2370
-		}
2371
-	}
2372
-
2373
-	// bgtus - background transparent until scroll
2374
-	if ( ! empty( $args['bgtus'] ) ) {
2375
-		$classes[] = sanitize_html_class( 'bg-transparent-until-scroll' );
2376
-	}
2377
-
2378
-	// cscos - change color scheme on scroll
2379
-	if ( ! empty( $args['bgtus'] ) && ! empty( $args['cscos'] ) ) {
2380
-		$classes[] = sanitize_html_class( 'color-scheme-flip-on-scroll' );
2381
-	}
2382
-
2383
-	// hover animations
2384
-	if ( ! empty( $args['hover_animations'] ) ) {
2385
-		$classes[] = sd_sanitize_html_classes( str_replace( ',', ' ', $args['hover_animations'] ) );
2386
-	}
2387
-
2388
-	// absolute_position
2389
-	if ( ! empty( $args['absolute_position'] ) ) {
2390
-		if ( 'top-left' === $args['absolute_position'] ) {
2391
-			$classes[] = 'start-0 top-0';
2392
-		} elseif ( 'top-center' === $args['absolute_position'] ) {
2393
-			$classes[] = 'start-50 top-0 translate-middle';
2394
-		} elseif ( 'top-right' === $args['absolute_position'] ) {
2395
-			$classes[] = 'end-0 top-0';
2396
-		} elseif ( 'center-left' === $args['absolute_position'] ) {
2397
-			$classes[] = 'start-0 top-50';
2398
-		} elseif ( 'center' === $args['absolute_position'] ) {
2399
-			$classes[] = 'start-50 top-50 translate-middle';
2400
-		} elseif ( 'center-right' === $args['absolute_position'] ) {
2401
-			$classes[] = 'end-0 top-50';
2402
-		} elseif ( 'bottom-left' === $args['absolute_position'] ) {
2403
-			$classes[] = 'start-0 bottom-0';
2404
-		} elseif ( 'bottom-center' === $args['absolute_position'] ) {
2405
-			$classes[] = 'start-50 bottom-0 translate-middle';
2406
-		} elseif ( 'bottom-right' === $args['absolute_position'] ) {
2407
-			$classes[] = 'end-0 bottom-0';
2408
-		}
2409
-	}
2410
-
2411
-	// build classes from build keys
2412
-	$build_keys = sd_get_class_build_keys();
2413
-	if ( ! empty( $build_keys ) ) {
2414
-		foreach ( $build_keys as $key ) {
2415
-
2416
-			if ( substr( $key, -4 ) == '-MTD' ) {
2417
-
2418
-				$k = str_replace( '-MTD', '', $key );
2419
-
2420
-				// Mobile, Tablet, Desktop
2421
-				if ( ! empty( $args[ $k ] ) && $args[ $k ] !== '' ) {
2422
-					$classes[] = sanitize_html_class( $args[ $k ] );
2423
-					$v         = $args[ $k ];
2424
-				} else {
2425
-					$v = null;
2426
-				}
2427
-				if ( ! empty( $args[ $k . '_md' ] ) && $args[ $k . '_md' ] !== '' ) {
2428
-					$classes[] = sanitize_html_class( $args[ $k . '_md' ] );
2429
-					$v_md      = $args[ $k . '_md' ];
2430
-				} else {
2431
-					$v_md = null;
2432
-				}
2433
-				if ( ! empty( $args[ $k . '_lg' ] ) && $args[ $k . '_lg' ] !== '' ) {
2434
-					if ( $v == null && $v_md == null ) {
2435
-						$classes[] = sanitize_html_class( str_replace( '-lg', '', $args[ $k . '_lg' ] ) );
2436
-					} else {
2437
-						$classes[] = sanitize_html_class( $args[ $k . '_lg' ] );
2438
-					}
2439
-				}
2440
-			} else {
2441
-				if ( $key == 'font_size' && ! empty( $args[ $key ] ) && $args[ $key ] == 'custom' ) {
2442
-					continue;
2443
-				}
2444
-				if ( ! empty( $args[ $key ] ) ) {
2445
-					$classes[] = sd_sanitize_html_classes( $args[ $key ] );
2446
-				}
2447
-			}
2448
-		}
2449
-	}
2450
-
2451
-	return implode( ' ', $classes );
2043
+    global $aui_bs5;
2044
+
2045
+    $classes = array();
2046
+
2047
+    if ( $aui_bs5 ) {
2048
+        $p_ml = 'ms-';
2049
+        $p_mr = 'me-';
2050
+
2051
+        $p_pl = 'ps-';
2052
+        $p_pr = 'pe-';
2053
+    } else {
2054
+        $p_ml = 'ml-';
2055
+        $p_mr = 'mr-';
2056
+
2057
+        $p_pl = 'pl-';
2058
+        $p_pr = 'pr-';
2059
+    }
2060
+
2061
+    // margins.
2062
+    if ( isset( $args['mt'] ) && $args['mt'] !== '' ) {
2063
+        $classes[] = 'mt-' . sanitize_html_class( $args['mt'] );
2064
+        $mt        = $args['mt'];
2065
+    } else {
2066
+        $mt = null;
2067
+    }
2068
+    if ( isset( $args['mr'] ) && $args['mr'] !== '' ) {
2069
+        $classes[] = $p_mr . sanitize_html_class( $args['mr'] );
2070
+        $mr        = $args['mr'];
2071
+    } else {
2072
+        $mr = null;
2073
+    }
2074
+    if ( isset( $args['mb'] ) && $args['mb'] !== '' ) {
2075
+        $classes[] = 'mb-' . sanitize_html_class( $args['mb'] );
2076
+        $mb        = $args['mb'];
2077
+    } else {
2078
+        $mb = null;
2079
+    }
2080
+    if ( isset( $args['ml'] ) && $args['ml'] !== '' ) {
2081
+        $classes[] = $p_ml . sanitize_html_class( $args['ml'] );
2082
+        $ml        = $args['ml'];
2083
+    } else {
2084
+        $ml = null;
2085
+    }
2086
+
2087
+    // margins tablet.
2088
+    if ( isset( $args['mt_md'] ) && $args['mt_md'] !== '' ) {
2089
+        $classes[] = 'mt-md-' . sanitize_html_class( $args['mt_md'] );
2090
+        $mt_md     = $args['mt_md'];
2091
+    } else {
2092
+        $mt_md = null;
2093
+    }
2094
+    if ( isset( $args['mr_md'] ) && $args['mr_md'] !== '' ) {
2095
+        $classes[] = $p_mr . 'md-' . sanitize_html_class( $args['mr_md'] );
2096
+        $mt_md     = $args['mr_md'];
2097
+    } else {
2098
+        $mr_md = null;
2099
+    }
2100
+    if ( isset( $args['mb_md'] ) && $args['mb_md'] !== '' ) {
2101
+        $classes[] = 'mb-md-' . sanitize_html_class( $args['mb_md'] );
2102
+        $mt_md     = $args['mb_md'];
2103
+    } else {
2104
+        $mb_md = null;
2105
+    }
2106
+    if ( isset( $args['ml_md'] ) && $args['ml_md'] !== '' ) {
2107
+        $classes[] = $p_ml . 'md-' . sanitize_html_class( $args['ml_md'] );
2108
+        $mt_md     = $args['ml_md'];
2109
+    } else {
2110
+        $ml_md = null;
2111
+    }
2112
+
2113
+    // margins desktop.
2114
+    if ( isset( $args['mt_lg'] ) && $args['mt_lg'] !== '' ) {
2115
+        if ( $mt == null && $mt_md == null ) {
2116
+            $classes[] = 'mt-' . sanitize_html_class( $args['mt_lg'] );
2117
+        } else {
2118
+            $classes[] = 'mt-lg-' . sanitize_html_class( $args['mt_lg'] );
2119
+        }
2120
+    }
2121
+    if ( isset( $args['mr_lg'] ) && $args['mr_lg'] !== '' ) {
2122
+        if ( $mr == null && $mr_md == null ) {
2123
+            $classes[] = $p_mr . sanitize_html_class( $args['mr_lg'] );
2124
+        } else {
2125
+            $classes[] = $p_mr . 'lg-' . sanitize_html_class( $args['mr_lg'] );
2126
+        }
2127
+    }
2128
+    if ( isset( $args['mb_lg'] ) && $args['mb_lg'] !== '' ) {
2129
+        if ( $mb == null && $mb_md == null ) {
2130
+            $classes[] = 'mb-' . sanitize_html_class( $args['mb_lg'] );
2131
+        } else {
2132
+            $classes[] = 'mb-lg-' . sanitize_html_class( $args['mb_lg'] );
2133
+        }
2134
+    }
2135
+    if ( isset( $args['ml_lg'] ) && $args['ml_lg'] !== '' ) {
2136
+        if ( $ml == null && $ml_md == null ) {
2137
+            $classes[] = $p_ml . sanitize_html_class( $args['ml_lg'] );
2138
+        } else {
2139
+            $classes[] = $p_ml . 'lg-' . sanitize_html_class( $args['ml_lg'] );
2140
+        }
2141
+    }
2142
+
2143
+    // padding.
2144
+    if ( isset( $args['pt'] ) && $args['pt'] !== '' ) {
2145
+        $classes[] = 'pt-' . sanitize_html_class( $args['pt'] );
2146
+        $pt        = $args['pt'];
2147
+    } else {
2148
+        $pt = null;
2149
+    }
2150
+    if ( isset( $args['pr'] ) && $args['pr'] !== '' ) {
2151
+        $classes[] = $p_pr . sanitize_html_class( $args['pr'] );
2152
+        $pr        = $args['pr'];
2153
+    } else {
2154
+        $pr = null;
2155
+    }
2156
+    if ( isset( $args['pb'] ) && $args['pb'] !== '' ) {
2157
+        $classes[] = 'pb-' . sanitize_html_class( $args['pb'] );
2158
+        $pb        = $args['pb'];
2159
+    } else {
2160
+        $pb = null;
2161
+    }
2162
+    if ( isset( $args['pl'] ) && $args['pl'] !== '' ) {
2163
+        $classes[] = $p_pl . sanitize_html_class( $args['pl'] );
2164
+        $pl        = $args['pl'];
2165
+    } else {
2166
+        $pl = null;
2167
+    }
2168
+
2169
+    // padding tablet.
2170
+    if ( isset( $args['pt_md'] ) && $args['pt_md'] !== '' ) {
2171
+        $classes[] = 'pt-md-' . sanitize_html_class( $args['pt_md'] );
2172
+        $pt_md     = $args['pt_md'];
2173
+    } else {
2174
+        $pt_md = null;
2175
+    }
2176
+    if ( isset( $args['pr_md'] ) && $args['pr_md'] !== '' ) {
2177
+        $classes[] = $p_pr . 'md-' . sanitize_html_class( $args['pr_md'] );
2178
+        $pr_md     = $args['pr_md'];
2179
+    } else {
2180
+        $pr_md = null;
2181
+    }
2182
+    if ( isset( $args['pb_md'] ) && $args['pb_md'] !== '' ) {
2183
+        $classes[] = 'pb-md-' . sanitize_html_class( $args['pb_md'] );
2184
+        $pb_md     = $args['pb_md'];
2185
+    } else {
2186
+        $pb_md = null;
2187
+    }
2188
+    if ( isset( $args['pl_md'] ) && $args['pl_md'] !== '' ) {
2189
+        $classes[] = $p_pl . 'md-' . sanitize_html_class( $args['pl_md'] );
2190
+        $pl_md     = $args['pl_md'];
2191
+    } else {
2192
+        $pl_md = null;
2193
+    }
2194
+
2195
+    // padding desktop.
2196
+    if ( isset( $args['pt_lg'] ) && $args['pt_lg'] !== '' ) {
2197
+        if ( $pt == null && $pt_md == null ) {
2198
+            $classes[] = 'pt-' . sanitize_html_class( $args['pt_lg'] );
2199
+        } else {
2200
+            $classes[] = 'pt-lg-' . sanitize_html_class( $args['pt_lg'] );
2201
+        }
2202
+    }
2203
+    if ( isset( $args['pr_lg'] ) && $args['pr_lg'] !== '' ) {
2204
+        if ( $pr == null && $pr_md == null ) {
2205
+            $classes[] = $p_pr . sanitize_html_class( $args['pr_lg'] );
2206
+        } else {
2207
+            $classes[] = $p_pr . 'lg-' . sanitize_html_class( $args['pr_lg'] );
2208
+        }
2209
+    }
2210
+    if ( isset( $args['pb_lg'] ) && $args['pb_lg'] !== '' ) {
2211
+        if ( $pb == null && $pb_md == null ) {
2212
+            $classes[] = 'pb-' . sanitize_html_class( $args['pb_lg'] );
2213
+        } else {
2214
+            $classes[] = 'pb-lg-' . sanitize_html_class( $args['pb_lg'] );
2215
+        }
2216
+    }
2217
+    if ( isset( $args['pl_lg'] ) && $args['pl_lg'] !== '' ) {
2218
+        if ( $pl == null && $pl_md == null ) {
2219
+            $classes[] = $p_pl . sanitize_html_class( $args['pl_lg'] );
2220
+        } else {
2221
+            $classes[] = $p_pl . 'lg-' . sanitize_html_class( $args['pl_lg'] );
2222
+        }
2223
+    }
2224
+
2225
+    // row cols, mobile, tablet, desktop
2226
+    if ( ! empty( $args['row_cols'] ) && $args['row_cols'] !== '' ) {
2227
+        $classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols'] );
2228
+        $row_cols  = $args['row_cols'];
2229
+    } else {
2230
+        $row_cols = null;
2231
+    }
2232
+    if ( ! empty( $args['row_cols_md'] ) && $args['row_cols_md'] !== '' ) {
2233
+        $classes[]   = sanitize_html_class( 'row-cols-md-' . $args['row_cols_md'] );
2234
+        $row_cols_md = $args['row_cols_md'];
2235
+    } else {
2236
+        $row_cols_md = null;
2237
+    }
2238
+    if ( ! empty( $args['row_cols_lg'] ) && $args['row_cols_lg'] !== '' ) {
2239
+        if ( $row_cols == null && $row_cols_md == null ) {
2240
+            $classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols_lg'] );
2241
+        } else {
2242
+            $classes[] = sanitize_html_class( 'row-cols-lg-' . $args['row_cols_lg'] );
2243
+        }
2244
+    }
2245
+
2246
+    // columns , mobile, tablet, desktop
2247
+    if ( ! empty( $args['col'] ) && $args['col'] !== '' ) {
2248
+        $classes[] = sanitize_html_class( 'col-' . $args['col'] );
2249
+        $col       = $args['col'];
2250
+    } else {
2251
+        $col = null;
2252
+    }
2253
+    if ( ! empty( $args['col_md'] ) && $args['col_md'] !== '' ) {
2254
+        $classes[] = sanitize_html_class( 'col-md-' . $args['col_md'] );
2255
+        $col_md    = $args['col_md'];
2256
+    } else {
2257
+        $col_md = null;
2258
+    }
2259
+    if ( ! empty( $args['col_lg'] ) && $args['col_lg'] !== '' ) {
2260
+        if ( $col == null && $col_md == null ) {
2261
+            $classes[] = sanitize_html_class( 'col-' . $args['col_lg'] );
2262
+        } else {
2263
+            $classes[] = sanitize_html_class( 'col-lg-' . $args['col_lg'] );
2264
+        }
2265
+    }
2266
+
2267
+    // border
2268
+    if ( isset( $args['border'] ) && ( $args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0 ) ) {
2269
+        $classes[] = 'border-0';
2270
+    } elseif ( ! empty( $args['border'] ) ) {
2271
+        $border_class = 'border';
2272
+        if ( ! empty( $args['border_type'] ) && strpos( $args['border_type'], '-0' ) === false ) {
2273
+            $border_class = '';
2274
+        }
2275
+        $classes[] = $border_class . ' border-' . sanitize_html_class( $args['border'] );
2276
+    }
2277
+
2278
+    // border radius type
2279
+    if ( ! empty( $args['rounded'] ) ) {
2280
+        $classes[] = sanitize_html_class( $args['rounded'] );
2281
+    }
2282
+
2283
+    // border radius size BS4
2284
+    if ( isset( $args['rounded_size'] ) && in_array( $args['rounded_size'], array( 'sm', 'lg' ) ) ) {
2285
+        $classes[] = 'rounded-' . sanitize_html_class( $args['rounded_size'] );
2286
+        // if we set a size then we need to remove "rounded" if set
2287
+        if ( ( $key = array_search( 'rounded', $classes ) ) !== false ) {
2288
+            unset( $classes[ $key ] );
2289
+        }
2290
+    } else {
2291
+
2292
+        // border radius size , mobile, tablet, desktop
2293
+        if ( isset( $args['rounded_size'] ) && $args['rounded_size'] !== '' ) {
2294
+            $classes[]    = sanitize_html_class( 'rounded-' . $args['rounded_size'] );
2295
+            $rounded_size = $args['rounded_size'];
2296
+        } else {
2297
+            $rounded_size = null;
2298
+        }
2299
+        if ( isset( $args['rounded_size_md'] ) && $args['rounded_size_md'] !== '' ) {
2300
+            $classes[]       = sanitize_html_class( 'rounded-md-' . $args['rounded_size_md'] );
2301
+            $rounded_size_md = $args['rounded_size_md'];
2302
+        } else {
2303
+            $rounded_size_md = null;
2304
+        }
2305
+        if ( isset( $args['rounded_size_lg'] ) && $args['rounded_size_lg'] !== '' ) {
2306
+            if ( $rounded_size == null && $rounded_size_md == null ) {
2307
+                $classes[] = sanitize_html_class( 'rounded-' . $args['rounded_size_lg'] );
2308
+            } else {
2309
+                $classes[] = sanitize_html_class( 'rounded-lg-' . $args['rounded_size_lg'] );
2310
+            }
2311
+        }
2312
+    }
2313
+
2314
+    // shadow
2315
+    //if ( !empty( $args['shadow'] ) ) { $classes[] = sanitize_html_class($args['shadow']); }
2316
+
2317
+    // background
2318
+    if ( ! empty( $args['bg'] ) ) {
2319
+        $classes[] = 'bg-' . sanitize_html_class( $args['bg'] );
2320
+    }
2321
+
2322
+    // text_color
2323
+    if ( ! empty( $args['text_color'] ) ) {
2324
+        $classes[] = 'text-' . sanitize_html_class( $args['text_color'] );
2325
+    }
2326
+
2327
+    // text_align
2328
+    if ( ! empty( $args['text_justify'] ) ) {
2329
+        $classes[] = 'text-justify';
2330
+    } else {
2331
+        if ( ! empty( $args['text_align'] ) ) {
2332
+            $classes[]  = sanitize_html_class( $args['text_align'] );
2333
+            $text_align = $args['text_align'];
2334
+        } else {
2335
+            $text_align = null;
2336
+        }
2337
+        if ( ! empty( $args['text_align_md'] ) && $args['text_align_md'] !== '' ) {
2338
+            $classes[]     = sanitize_html_class( $args['text_align_md'] );
2339
+            $text_align_md = $args['text_align_md'];
2340
+        } else {
2341
+            $text_align_md = null;
2342
+        }
2343
+        if ( ! empty( $args['text_align_lg'] ) && $args['text_align_lg'] !== '' ) {
2344
+            if ( $text_align == null && $text_align_md == null ) {
2345
+                $classes[] = sanitize_html_class( str_replace( '-lg', '', $args['text_align_lg'] ) );
2346
+            } else {
2347
+                $classes[] = sanitize_html_class( $args['text_align_lg'] );
2348
+            }
2349
+        }
2350
+    }
2351
+
2352
+    // display
2353
+    if ( ! empty( $args['display'] ) ) {
2354
+        $classes[] = sanitize_html_class( $args['display'] );
2355
+        $display   = $args['display'];
2356
+    } else {
2357
+        $display = null;
2358
+    }
2359
+    if ( ! empty( $args['display_md'] ) && $args['display_md'] !== '' ) {
2360
+        $classes[]  = sanitize_html_class( $args['display_md'] );
2361
+        $display_md = $args['display_md'];
2362
+    } else {
2363
+        $display_md = null;
2364
+    }
2365
+    if ( ! empty( $args['display_lg'] ) && $args['display_lg'] !== '' ) {
2366
+        if ( $display == null && $display_md == null ) {
2367
+            $classes[] = sanitize_html_class( str_replace( '-lg', '', $args['display_lg'] ) );
2368
+        } else {
2369
+            $classes[] = sanitize_html_class( $args['display_lg'] );
2370
+        }
2371
+    }
2372
+
2373
+    // bgtus - background transparent until scroll
2374
+    if ( ! empty( $args['bgtus'] ) ) {
2375
+        $classes[] = sanitize_html_class( 'bg-transparent-until-scroll' );
2376
+    }
2377
+
2378
+    // cscos - change color scheme on scroll
2379
+    if ( ! empty( $args['bgtus'] ) && ! empty( $args['cscos'] ) ) {
2380
+        $classes[] = sanitize_html_class( 'color-scheme-flip-on-scroll' );
2381
+    }
2382
+
2383
+    // hover animations
2384
+    if ( ! empty( $args['hover_animations'] ) ) {
2385
+        $classes[] = sd_sanitize_html_classes( str_replace( ',', ' ', $args['hover_animations'] ) );
2386
+    }
2387
+
2388
+    // absolute_position
2389
+    if ( ! empty( $args['absolute_position'] ) ) {
2390
+        if ( 'top-left' === $args['absolute_position'] ) {
2391
+            $classes[] = 'start-0 top-0';
2392
+        } elseif ( 'top-center' === $args['absolute_position'] ) {
2393
+            $classes[] = 'start-50 top-0 translate-middle';
2394
+        } elseif ( 'top-right' === $args['absolute_position'] ) {
2395
+            $classes[] = 'end-0 top-0';
2396
+        } elseif ( 'center-left' === $args['absolute_position'] ) {
2397
+            $classes[] = 'start-0 top-50';
2398
+        } elseif ( 'center' === $args['absolute_position'] ) {
2399
+            $classes[] = 'start-50 top-50 translate-middle';
2400
+        } elseif ( 'center-right' === $args['absolute_position'] ) {
2401
+            $classes[] = 'end-0 top-50';
2402
+        } elseif ( 'bottom-left' === $args['absolute_position'] ) {
2403
+            $classes[] = 'start-0 bottom-0';
2404
+        } elseif ( 'bottom-center' === $args['absolute_position'] ) {
2405
+            $classes[] = 'start-50 bottom-0 translate-middle';
2406
+        } elseif ( 'bottom-right' === $args['absolute_position'] ) {
2407
+            $classes[] = 'end-0 bottom-0';
2408
+        }
2409
+    }
2410
+
2411
+    // build classes from build keys
2412
+    $build_keys = sd_get_class_build_keys();
2413
+    if ( ! empty( $build_keys ) ) {
2414
+        foreach ( $build_keys as $key ) {
2415
+
2416
+            if ( substr( $key, -4 ) == '-MTD' ) {
2417
+
2418
+                $k = str_replace( '-MTD', '', $key );
2419
+
2420
+                // Mobile, Tablet, Desktop
2421
+                if ( ! empty( $args[ $k ] ) && $args[ $k ] !== '' ) {
2422
+                    $classes[] = sanitize_html_class( $args[ $k ] );
2423
+                    $v         = $args[ $k ];
2424
+                } else {
2425
+                    $v = null;
2426
+                }
2427
+                if ( ! empty( $args[ $k . '_md' ] ) && $args[ $k . '_md' ] !== '' ) {
2428
+                    $classes[] = sanitize_html_class( $args[ $k . '_md' ] );
2429
+                    $v_md      = $args[ $k . '_md' ];
2430
+                } else {
2431
+                    $v_md = null;
2432
+                }
2433
+                if ( ! empty( $args[ $k . '_lg' ] ) && $args[ $k . '_lg' ] !== '' ) {
2434
+                    if ( $v == null && $v_md == null ) {
2435
+                        $classes[] = sanitize_html_class( str_replace( '-lg', '', $args[ $k . '_lg' ] ) );
2436
+                    } else {
2437
+                        $classes[] = sanitize_html_class( $args[ $k . '_lg' ] );
2438
+                    }
2439
+                }
2440
+            } else {
2441
+                if ( $key == 'font_size' && ! empty( $args[ $key ] ) && $args[ $key ] == 'custom' ) {
2442
+                    continue;
2443
+                }
2444
+                if ( ! empty( $args[ $key ] ) ) {
2445
+                    $classes[] = sd_sanitize_html_classes( $args[ $key ] );
2446
+                }
2447
+            }
2448
+        }
2449
+    }
2450
+
2451
+    return implode( ' ', $classes );
2452 2452
 }
2453 2453
 
2454 2454
 /**
@@ -2460,90 +2460,90 @@  discard block
 block discarded – undo
2460 2460
  */
2461 2461
 function sd_build_aui_styles( $args ) {
2462 2462
 
2463
-	$styles = array();
2464
-
2465
-	// background color
2466
-	if ( ! empty( $args['bg'] ) && $args['bg'] !== '' ) {
2467
-		if ( $args['bg'] == 'custom-color' ) {
2468
-			$styles['background-color'] = $args['bg_color'];
2469
-		} elseif ( $args['bg'] == 'custom-gradient' ) {
2470
-			$styles['background-image'] = $args['bg_gradient'];
2471
-
2472
-			// use background on text.
2473
-			if ( ! empty( $args['bg_on_text'] ) && $args['bg_on_text'] ) {
2474
-				$styles['background-clip']         = 'text';
2475
-				$styles['-webkit-background-clip'] = 'text';
2476
-				$styles['text-fill-color']         = 'transparent';
2477
-				$styles['-webkit-text-fill-color'] = 'transparent';
2478
-			}
2479
-		}
2480
-	}
2481
-
2482
-	if ( ! empty( $args['bg_image'] ) && $args['bg_image'] !== '' ) {
2483
-		$hasImage = true;
2484
-		if ( ! empty( $styles['background-color'] ) && $args['bg'] == 'custom-color' ) {
2485
-			$styles['background-image']      = 'url(' . $args['bg_image'] . ')';
2486
-			$styles['background-blend-mode'] = 'overlay';
2487
-		} elseif ( ! empty( $styles['background-image'] ) && $args['bg'] == 'custom-gradient' ) {
2488
-			$styles['background-image'] .= ',url(' . $args['bg_image'] . ')';
2489
-		} elseif ( ! empty( $args['bg'] ) && $args['bg'] != '' && $args['bg'] != 'transparent' ) {
2490
-			// do nothing as we alreay have a preset
2491
-			$hasImage = false;
2492
-		} else {
2493
-			$styles['background-image'] = 'url(' . $args['bg_image'] . ')';
2494
-		}
2495
-
2496
-		if ( $hasImage ) {
2497
-			$styles['background-size'] = 'cover';
2498
-
2499
-			if ( ! empty( $args['bg_image_fixed'] ) && $args['bg_image_fixed'] ) {
2500
-				$styles['background-attachment'] = 'fixed';
2501
-			}
2502
-		}
2503
-
2504
-		if ( $hasImage && ! empty( $args['bg_image_xy'] ) && ! empty( $args['bg_image_xy']['x'] ) ) {
2505
-			$styles['background-position'] = ( $args['bg_image_xy']['x'] * 100 ) . '% ' . ( $args['bg_image_xy']['y'] * 100 ) . '%';
2506
-		}
2507
-	}
2508
-
2509
-	// sticky offset top
2510
-	if ( ! empty( $args['sticky_offset_top'] ) && $args['sticky_offset_top'] !== '' ) {
2511
-		$styles['top'] = absint( $args['sticky_offset_top'] );
2512
-	}
2513
-
2514
-	// sticky offset bottom
2515
-	if ( ! empty( $args['sticky_offset_bottom'] ) && $args['sticky_offset_bottom'] !== '' ) {
2516
-		$styles['bottom'] = absint( $args['sticky_offset_bottom'] );
2517
-	}
2518
-
2519
-	// font size
2520
-	if ( ! empty( $args['font_size_custom'] ) && $args['font_size_custom'] !== '' ) {
2521
-		$styles['font-size'] = (float) $args['font_size_custom'] . 'rem';
2522
-	}
2523
-
2524
-	// font color
2525
-	if ( ! empty( $args['text_color_custom'] ) && $args['text_color_custom'] !== '' ) {
2526
-		$styles['color'] = esc_attr( $args['text_color_custom'] );
2527
-	}
2528
-
2529
-	// font line height
2530
-	if ( ! empty( $args['font_line_height'] ) && $args['font_line_height'] !== '' ) {
2531
-		$styles['line-height'] = esc_attr( $args['font_line_height'] );
2532
-	}
2533
-
2534
-	// max height
2535
-	if ( ! empty( $args['max_height'] ) && $args['max_height'] !== '' ) {
2536
-		$styles['max-height'] = esc_attr( $args['max_height'] );
2537
-	}
2538
-
2539
-	$style_string = '';
2540
-	if ( ! empty( $styles ) ) {
2541
-		foreach ( $styles as $key => $val ) {
2542
-			$style_string .= esc_attr( $key ) . ':' . esc_attr( $val ) . ';';
2543
-		}
2544
-	}
2545
-
2546
-	return $style_string;
2463
+    $styles = array();
2464
+
2465
+    // background color
2466
+    if ( ! empty( $args['bg'] ) && $args['bg'] !== '' ) {
2467
+        if ( $args['bg'] == 'custom-color' ) {
2468
+            $styles['background-color'] = $args['bg_color'];
2469
+        } elseif ( $args['bg'] == 'custom-gradient' ) {
2470
+            $styles['background-image'] = $args['bg_gradient'];
2471
+
2472
+            // use background on text.
2473
+            if ( ! empty( $args['bg_on_text'] ) && $args['bg_on_text'] ) {
2474
+                $styles['background-clip']         = 'text';
2475
+                $styles['-webkit-background-clip'] = 'text';
2476
+                $styles['text-fill-color']         = 'transparent';
2477
+                $styles['-webkit-text-fill-color'] = 'transparent';
2478
+            }
2479
+        }
2480
+    }
2481
+
2482
+    if ( ! empty( $args['bg_image'] ) && $args['bg_image'] !== '' ) {
2483
+        $hasImage = true;
2484
+        if ( ! empty( $styles['background-color'] ) && $args['bg'] == 'custom-color' ) {
2485
+            $styles['background-image']      = 'url(' . $args['bg_image'] . ')';
2486
+            $styles['background-blend-mode'] = 'overlay';
2487
+        } elseif ( ! empty( $styles['background-image'] ) && $args['bg'] == 'custom-gradient' ) {
2488
+            $styles['background-image'] .= ',url(' . $args['bg_image'] . ')';
2489
+        } elseif ( ! empty( $args['bg'] ) && $args['bg'] != '' && $args['bg'] != 'transparent' ) {
2490
+            // do nothing as we alreay have a preset
2491
+            $hasImage = false;
2492
+        } else {
2493
+            $styles['background-image'] = 'url(' . $args['bg_image'] . ')';
2494
+        }
2495
+
2496
+        if ( $hasImage ) {
2497
+            $styles['background-size'] = 'cover';
2498
+
2499
+            if ( ! empty( $args['bg_image_fixed'] ) && $args['bg_image_fixed'] ) {
2500
+                $styles['background-attachment'] = 'fixed';
2501
+            }
2502
+        }
2503
+
2504
+        if ( $hasImage && ! empty( $args['bg_image_xy'] ) && ! empty( $args['bg_image_xy']['x'] ) ) {
2505
+            $styles['background-position'] = ( $args['bg_image_xy']['x'] * 100 ) . '% ' . ( $args['bg_image_xy']['y'] * 100 ) . '%';
2506
+        }
2507
+    }
2508
+
2509
+    // sticky offset top
2510
+    if ( ! empty( $args['sticky_offset_top'] ) && $args['sticky_offset_top'] !== '' ) {
2511
+        $styles['top'] = absint( $args['sticky_offset_top'] );
2512
+    }
2513
+
2514
+    // sticky offset bottom
2515
+    if ( ! empty( $args['sticky_offset_bottom'] ) && $args['sticky_offset_bottom'] !== '' ) {
2516
+        $styles['bottom'] = absint( $args['sticky_offset_bottom'] );
2517
+    }
2518
+
2519
+    // font size
2520
+    if ( ! empty( $args['font_size_custom'] ) && $args['font_size_custom'] !== '' ) {
2521
+        $styles['font-size'] = (float) $args['font_size_custom'] . 'rem';
2522
+    }
2523
+
2524
+    // font color
2525
+    if ( ! empty( $args['text_color_custom'] ) && $args['text_color_custom'] !== '' ) {
2526
+        $styles['color'] = esc_attr( $args['text_color_custom'] );
2527
+    }
2528
+
2529
+    // font line height
2530
+    if ( ! empty( $args['font_line_height'] ) && $args['font_line_height'] !== '' ) {
2531
+        $styles['line-height'] = esc_attr( $args['font_line_height'] );
2532
+    }
2533
+
2534
+    // max height
2535
+    if ( ! empty( $args['max_height'] ) && $args['max_height'] !== '' ) {
2536
+        $styles['max-height'] = esc_attr( $args['max_height'] );
2537
+    }
2538
+
2539
+    $style_string = '';
2540
+    if ( ! empty( $styles ) ) {
2541
+        foreach ( $styles as $key => $val ) {
2542
+            $style_string .= esc_attr( $key ) . ':' . esc_attr( $val ) . ';';
2543
+        }
2544
+    }
2545
+
2546
+    return $style_string;
2547 2547
 
2548 2548
 }
2549 2549
 
@@ -2556,34 +2556,34 @@  discard block
 block discarded – undo
2556 2556
  * @return string
2557 2557
  */
2558 2558
 function sd_build_hover_styles( $args, $is_preview = false ) {
2559
-	$rules = '';
2560
-	// text color
2561
-	if ( ! empty( $args['styleid'] ) ) {
2562
-		$styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr( $args['styleid'] ) : 'html .' . esc_attr( $args['styleid'] );
2563
-
2564
-		// text
2565
-		if ( ! empty( $args['text_color_hover'] ) ) {
2566
-			$key    = 'custom' === $args['text_color_hover'] && ! empty( $args['text_color_hover_custom'] ) ? 'text_color_hover_custom' : 'text_color_hover';
2567
-			$color  = sd_get_color_from_var( $args[ $key ] );
2568
-			$rules .= $styleid . ':hover {color: ' . $color . ' !important;} ';
2569
-		}
2570
-
2571
-		// bg
2572
-		if ( ! empty( $args['bg_hover'] ) ) {
2573
-			if ( 'custom-gradient' === $args['bg_hover'] ) {
2574
-				$color  = $args['bg_hover_gradient'];
2575
-				$rules .= $styleid . ':hover {background-image: ' . $color . ' !important;} ';
2576
-				$rules .= $styleid . '.btn:hover {border-color: transparent !important;} ';
2577
-			} else {
2578
-				$key    = 'custom-color' === $args['bg_hover'] ? 'bg_hover_color' : 'bg_hover';
2579
-				$color  = sd_get_color_from_var( $args[ $key ] );
2580
-				$rules .= $styleid . ':hover {background: ' . $color . ' !important;} ';
2581
-				$rules .= $styleid . '.btn:hover {border-color: ' . $color . ' !important;} ';
2582
-			}
2583
-		}
2584
-	}
2585
-
2586
-	return $rules ? '<style>' . $rules . '</style>' : '';
2559
+    $rules = '';
2560
+    // text color
2561
+    if ( ! empty( $args['styleid'] ) ) {
2562
+        $styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr( $args['styleid'] ) : 'html .' . esc_attr( $args['styleid'] );
2563
+
2564
+        // text
2565
+        if ( ! empty( $args['text_color_hover'] ) ) {
2566
+            $key    = 'custom' === $args['text_color_hover'] && ! empty( $args['text_color_hover_custom'] ) ? 'text_color_hover_custom' : 'text_color_hover';
2567
+            $color  = sd_get_color_from_var( $args[ $key ] );
2568
+            $rules .= $styleid . ':hover {color: ' . $color . ' !important;} ';
2569
+        }
2570
+
2571
+        // bg
2572
+        if ( ! empty( $args['bg_hover'] ) ) {
2573
+            if ( 'custom-gradient' === $args['bg_hover'] ) {
2574
+                $color  = $args['bg_hover_gradient'];
2575
+                $rules .= $styleid . ':hover {background-image: ' . $color . ' !important;} ';
2576
+                $rules .= $styleid . '.btn:hover {border-color: transparent !important;} ';
2577
+            } else {
2578
+                $key    = 'custom-color' === $args['bg_hover'] ? 'bg_hover_color' : 'bg_hover';
2579
+                $color  = sd_get_color_from_var( $args[ $key ] );
2580
+                $rules .= $styleid . ':hover {background: ' . $color . ' !important;} ';
2581
+                $rules .= $styleid . '.btn:hover {border-color: ' . $color . ' !important;} ';
2582
+            }
2583
+        }
2584
+    }
2585
+
2586
+    return $rules ? '<style>' . $rules . '</style>' : '';
2587 2587
 }
2588 2588
 
2589 2589
 /**
@@ -2595,12 +2595,12 @@  discard block
 block discarded – undo
2595 2595
  */
2596 2596
 function sd_get_color_from_var( $var ) {
2597 2597
 
2598
-	//sanitize_hex_color() @todo this does not cover transparency
2599
-	if ( strpos( $var, '#' ) === false ) {
2600
-		$var = defined( 'BLOCKSTRAP_BLOCKS_VERSION' ) ? 'var(--wp--preset--color--' . esc_attr( $var ) . ')' : 'var(--' . esc_attr( $var ) . ')';
2601
-	}
2598
+    //sanitize_hex_color() @todo this does not cover transparency
2599
+    if ( strpos( $var, '#' ) === false ) {
2600
+        $var = defined( 'BLOCKSTRAP_BLOCKS_VERSION' ) ? 'var(--wp--preset--color--' . esc_attr( $var ) . ')' : 'var(--' . esc_attr( $var ) . ')';
2601
+    }
2602 2602
 
2603
-	return $var;
2603
+    return $var;
2604 2604
 }
2605 2605
 
2606 2606
 /**
@@ -2612,19 +2612,19 @@  discard block
 block discarded – undo
2612 2612
  * @return string
2613 2613
  */
2614 2614
 function sd_sanitize_html_classes( $classes, $sep = ' ' ) {
2615
-	$return = '';
2615
+    $return = '';
2616 2616
 
2617
-	if ( ! is_array( $classes ) ) {
2618
-		$classes = explode( $sep, $classes );
2619
-	}
2617
+    if ( ! is_array( $classes ) ) {
2618
+        $classes = explode( $sep, $classes );
2619
+    }
2620 2620
 
2621
-	if ( ! empty( $classes ) ) {
2622
-		foreach ( $classes as $class ) {
2623
-			$return .= sanitize_html_class( $class ) . ' ';
2624
-		}
2625
-	}
2621
+    if ( ! empty( $classes ) ) {
2622
+        foreach ( $classes as $class ) {
2623
+            $return .= sanitize_html_class( $class ) . ' ';
2624
+        }
2625
+    }
2626 2626
 
2627
-	return $return;
2627
+    return $return;
2628 2628
 }
2629 2629
 
2630 2630
 
@@ -2634,38 +2634,38 @@  discard block
 block discarded – undo
2634 2634
  * @return void
2635 2635
  */
2636 2636
 function sd_get_class_build_keys() {
2637
-	$keys = array(
2638
-		'container',
2639
-		'position',
2640
-		'flex_direction',
2641
-		'shadow',
2642
-		'rounded',
2643
-		'nav_style',
2644
-		'horizontal_alignment',
2645
-		'nav_fill',
2646
-		'width',
2647
-		'font_weight',
2648
-		'font_size',
2649
-		'font_case',
2650
-		'css_class',
2651
-		'flex_align_items-MTD',
2652
-		'flex_justify_content-MTD',
2653
-		'flex_align_self-MTD',
2654
-		'flex_order-MTD',
2655
-		'styleid',
2656
-		'border_opacity',
2657
-		'border_width',
2658
-		'border_type',
2659
-		'opacity',
2660
-		'zindex',
2661
-		'flex_wrap-MTD',
2662
-		'h100',
2663
-		'overflow',
2664
-		'scrollbars',
2665
-		'float-MTD'
2666
-	);
2667
-
2668
-	return apply_filters( 'sd_class_build_keys', $keys );
2637
+    $keys = array(
2638
+        'container',
2639
+        'position',
2640
+        'flex_direction',
2641
+        'shadow',
2642
+        'rounded',
2643
+        'nav_style',
2644
+        'horizontal_alignment',
2645
+        'nav_fill',
2646
+        'width',
2647
+        'font_weight',
2648
+        'font_size',
2649
+        'font_case',
2650
+        'css_class',
2651
+        'flex_align_items-MTD',
2652
+        'flex_justify_content-MTD',
2653
+        'flex_align_self-MTD',
2654
+        'flex_order-MTD',
2655
+        'styleid',
2656
+        'border_opacity',
2657
+        'border_width',
2658
+        'border_type',
2659
+        'opacity',
2660
+        'zindex',
2661
+        'flex_wrap-MTD',
2662
+        'h100',
2663
+        'overflow',
2664
+        'scrollbars',
2665
+        'float-MTD'
2666
+    );
2667
+
2668
+    return apply_filters( 'sd_class_build_keys', $keys );
2669 2669
 }
2670 2670
 
2671 2671
 /**
@@ -2677,18 +2677,18 @@  discard block
 block discarded – undo
2677 2677
  * @return array
2678 2678
  */
2679 2679
 function sd_get_visibility_conditions_input( $type = 'visibility_conditions', $overwrite = array() ) {
2680
-	$defaults = array(
2681
-		'type'         => 'visibility_conditions',
2682
-		'title'        => __( 'Block Visibility', 'ayecode-connect' ),
2683
-		'button_title' => __( 'Set Block Visibility', 'ayecode-connect' ),
2684
-		'default'      => '',
2685
-		'desc_tip'     => true,
2686
-		'group'        => __( 'Visibility Conditions', 'ayecode-connect' ),
2687
-	);
2680
+    $defaults = array(
2681
+        'type'         => 'visibility_conditions',
2682
+        'title'        => __( 'Block Visibility', 'ayecode-connect' ),
2683
+        'button_title' => __( 'Set Block Visibility', 'ayecode-connect' ),
2684
+        'default'      => '',
2685
+        'desc_tip'     => true,
2686
+        'group'        => __( 'Visibility Conditions', 'ayecode-connect' ),
2687
+    );
2688 2688
 
2689
-	$input = wp_parse_args( $overwrite, $defaults );
2689
+    $input = wp_parse_args( $overwrite, $defaults );
2690 2690
 
2691
-	return $input;
2691
+    return $input;
2692 2692
 }
2693 2693
 
2694 2694
 /**
@@ -2700,21 +2700,21 @@  discard block
 block discarded – undo
2700 2700
  * @return array An array of roles.
2701 2701
  */
2702 2702
 function sd_user_roles_options( $exclude = array() ) {
2703
-	$user_roles = array();
2703
+    $user_roles = array();
2704 2704
 
2705
-	if ( !function_exists('get_editable_roles') ) {
2706
-		require_once( ABSPATH . '/wp-admin/includes/user.php' );
2707
-	}
2705
+    if ( !function_exists('get_editable_roles') ) {
2706
+        require_once( ABSPATH . '/wp-admin/includes/user.php' );
2707
+    }
2708 2708
 
2709
-	$roles = get_editable_roles();
2709
+    $roles = get_editable_roles();
2710 2710
 
2711
-	foreach ( $roles as $role => $data ) {
2712
-		if ( ! ( ! empty( $exclude ) && in_array( $role, $exclude ) ) ) {
2713
-			$user_roles[ esc_attr( $role ) ] = translate_user_role( $data['name'] );
2714
-		}
2715
-	}
2711
+    foreach ( $roles as $role => $data ) {
2712
+        if ( ! ( ! empty( $exclude ) && in_array( $role, $exclude ) ) ) {
2713
+            $user_roles[ esc_attr( $role ) ] = translate_user_role( $data['name'] );
2714
+        }
2715
+    }
2716 2716
 
2717
-	return apply_filters( 'sd_user_roles_options', $user_roles );
2717
+    return apply_filters( 'sd_user_roles_options', $user_roles );
2718 2718
 }
2719 2719
 
2720 2720
 /**
@@ -2725,17 +2725,17 @@  discard block
 block discarded – undo
2725 2725
  * @return array Rule options.
2726 2726
  */
2727 2727
 function sd_visibility_rules_options() {
2728
-	$options = array(
2729
-		'logged_in'  => __( 'Logged In', 'ayecode-connect' ),
2730
-		'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
2731
-		'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
2732
-	);
2728
+    $options = array(
2729
+        'logged_in'  => __( 'Logged In', 'ayecode-connect' ),
2730
+        'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
2731
+        'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
2732
+    );
2733 2733
 
2734
-	if ( class_exists( 'GeoDirectory' ) ) {
2735
-		$options['gd_field'] = __( 'GD Field', 'ayecode-connect' );
2736
-	}
2734
+    if ( class_exists( 'GeoDirectory' ) ) {
2735
+        $options['gd_field'] = __( 'GD Field', 'ayecode-connect' );
2736
+    }
2737 2737
 
2738
-	return apply_filters( 'sd_visibility_rules_options', $options );
2738
+    return apply_filters( 'sd_visibility_rules_options', $options );
2739 2739
 }
2740 2740
 
2741 2741
 /**
@@ -2744,37 +2744,37 @@  discard block
 block discarded – undo
2744 2744
  * @return array
2745 2745
  */
2746 2746
 function sd_visibility_gd_field_options(){
2747
-	$fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );
2747
+    $fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );
2748 2748
 
2749
-	$keys = array();
2750
-	if ( ! empty( $fields ) ) {
2751
-		foreach( $fields as $field ) {
2752
-			if ( apply_filters( 'geodir_badge_field_skip_key', false, $field ) ) {
2753
-				continue;
2754
-			}
2749
+    $keys = array();
2750
+    if ( ! empty( $fields ) ) {
2751
+        foreach( $fields as $field ) {
2752
+            if ( apply_filters( 'geodir_badge_field_skip_key', false, $field ) ) {
2753
+                continue;
2754
+            }
2755 2755
 
2756
-			$keys[ $field['htmlvar_name'] ] = $field['htmlvar_name'] . ' ( ' . __( $field['admin_title'], 'geodirectory' ) . ' )';
2756
+            $keys[ $field['htmlvar_name'] ] = $field['htmlvar_name'] . ' ( ' . __( $field['admin_title'], 'geodirectory' ) . ' )';
2757 2757
 
2758
-			// Extra address fields
2759
-			if ( $field['htmlvar_name'] == 'address' && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
2760
-				foreach ( $address_fields as $_field => $args ) {
2761
-					if ( $_field != 'map_directions' && $_field != 'street' ) {
2762
-						$keys[ $_field ] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2763
-					}
2764
-				}
2765
-			}
2766
-		}
2767
-	}
2758
+            // Extra address fields
2759
+            if ( $field['htmlvar_name'] == 'address' && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
2760
+                foreach ( $address_fields as $_field => $args ) {
2761
+                    if ( $_field != 'map_directions' && $_field != 'street' ) {
2762
+                        $keys[ $_field ] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2763
+                    }
2764
+                }
2765
+            }
2766
+        }
2767
+    }
2768 2768
 
2769
-	$keys['post_date'] = 'post_date ( ' . __( 'post date', 'geodirectory' ) . ' )';
2770
-	$keys['post_modified'] = 'post_modified ( ' . __( 'post modified', 'geodirectory' ) . ' )';
2771
-	$keys['default_category'] = 'default_category ( ' . __( 'Default Category', 'geodirectory' ) . ' )';
2772
-	$keys['post_id'] = 'post_id ( ' . __( 'post id', 'geodirectory' ) . ' )';
2773
-	$keys['post_status'] = 'post_status ( ' . __( 'Post Status', 'geodirectory' ) . ' )';
2769
+    $keys['post_date'] = 'post_date ( ' . __( 'post date', 'geodirectory' ) . ' )';
2770
+    $keys['post_modified'] = 'post_modified ( ' . __( 'post modified', 'geodirectory' ) . ' )';
2771
+    $keys['default_category'] = 'default_category ( ' . __( 'Default Category', 'geodirectory' ) . ' )';
2772
+    $keys['post_id'] = 'post_id ( ' . __( 'post id', 'geodirectory' ) . ' )';
2773
+    $keys['post_status'] = 'post_status ( ' . __( 'Post Status', 'geodirectory' ) . ' )';
2774 2774
 
2775
-	$options = apply_filters( 'geodir_badge_field_keys', $keys );
2775
+    $options = apply_filters( 'geodir_badge_field_keys', $keys );
2776 2776
 
2777
-	return apply_filters( 'sd_visibility_gd_field_options', $options );
2777
+    return apply_filters( 'sd_visibility_gd_field_options', $options );
2778 2778
 }
2779 2779
 
2780 2780
 /**
@@ -2783,18 +2783,18 @@  discard block
 block discarded – undo
2783 2783
  * @return array
2784 2784
  */
2785 2785
 function sd_visibility_field_condition_options(){
2786
-	$options = array(
2787
-		'is_empty' => __( 'is empty', 'ayecode-connect' ),
2788
-		'is_not_empty' => __( 'is not empty', 'ayecode-connect' ),
2789
-		'is_equal' => __( 'is equal', 'ayecode-connect' ),
2790
-		'is_not_equal' => __( 'is not equal', 'ayecode-connect' ),
2791
-		'is_greater_than' => __( 'is greater than', 'ayecode-connect' ),
2792
-		'is_less_than' => __( 'is less than', 'ayecode-connect' ),
2793
-		'is_contains' => __( 'is contains', 'ayecode-connect' ),
2794
-		'is_not_contains' => __( 'is not contains', 'ayecode-connect' ),
2795
-	);
2786
+    $options = array(
2787
+        'is_empty' => __( 'is empty', 'ayecode-connect' ),
2788
+        'is_not_empty' => __( 'is not empty', 'ayecode-connect' ),
2789
+        'is_equal' => __( 'is equal', 'ayecode-connect' ),
2790
+        'is_not_equal' => __( 'is not equal', 'ayecode-connect' ),
2791
+        'is_greater_than' => __( 'is greater than', 'ayecode-connect' ),
2792
+        'is_less_than' => __( 'is less than', 'ayecode-connect' ),
2793
+        'is_contains' => __( 'is contains', 'ayecode-connect' ),
2794
+        'is_not_contains' => __( 'is not contains', 'ayecode-connect' ),
2795
+    );
2796 2796
 
2797
-	return apply_filters( 'sd_visibility_field_condition_options', $options );
2797
+    return apply_filters( 'sd_visibility_field_condition_options', $options );
2798 2798
 }
2799 2799
 
2800 2800
 /**
@@ -2805,14 +2805,14 @@  discard block
 block discarded – undo
2805 2805
  * @return array Template type options.
2806 2806
  */
2807 2807
 function sd_visibility_output_options() {
2808
-	$options = array(
2809
-		'hide'          => __( 'Hide Block', 'ayecode-connect' ),
2810
-		'message'       => __( 'Show Custom Message', 'ayecode-connect' ),
2811
-		'page'          => __( 'Show Page Content', 'ayecode-connect' ),
2812
-		'template_part' => __( 'Show Template Part', 'ayecode-connect' ),
2813
-	);
2808
+    $options = array(
2809
+        'hide'          => __( 'Hide Block', 'ayecode-connect' ),
2810
+        'message'       => __( 'Show Custom Message', 'ayecode-connect' ),
2811
+        'page'          => __( 'Show Page Content', 'ayecode-connect' ),
2812
+        'template_part' => __( 'Show Template Part', 'ayecode-connect' ),
2813
+    );
2814 2814
 
2815
-	return apply_filters( 'sd_visibility_output_options', $options );
2815
+    return apply_filters( 'sd_visibility_output_options', $options );
2816 2816
 }
2817 2817
 
2818 2818
 /**
@@ -2824,45 +2824,45 @@  discard block
 block discarded – undo
2824 2824
  * @return array Template page options.
2825 2825
  */
2826 2826
 function sd_template_page_options( $args = array() ) {
2827
-	global $sd_tmpl_page_options;
2827
+    global $sd_tmpl_page_options;
2828 2828
 
2829
-	if ( ! empty( $sd_tmpl_page_options ) ) {
2830
-		return $sd_tmpl_page_options;
2831
-	}
2829
+    if ( ! empty( $sd_tmpl_page_options ) ) {
2830
+        return $sd_tmpl_page_options;
2831
+    }
2832 2832
 
2833
-	$args = wp_parse_args( $args, array(
2834
-		'child_of'    => 0,
2835
-		'sort_column' => 'post_title',
2836
-		'sort_order'  => 'ASC'
2837
-	) );
2833
+    $args = wp_parse_args( $args, array(
2834
+        'child_of'    => 0,
2835
+        'sort_column' => 'post_title',
2836
+        'sort_order'  => 'ASC'
2837
+    ) );
2838 2838
 
2839
-	$exclude_pages = array();
2840
-	if ( $page_on_front = get_option( 'page_on_front' ) ) {
2841
-		$exclude_pages[] = $page_on_front;
2842
-	}
2839
+    $exclude_pages = array();
2840
+    if ( $page_on_front = get_option( 'page_on_front' ) ) {
2841
+        $exclude_pages[] = $page_on_front;
2842
+    }
2843 2843
 
2844
-	if ( $page_for_posts = get_option( 'page_for_posts' ) ) {
2845
-		$exclude_pages[] = $page_for_posts;
2846
-	}
2844
+    if ( $page_for_posts = get_option( 'page_for_posts' ) ) {
2845
+        $exclude_pages[] = $page_for_posts;
2846
+    }
2847 2847
 
2848
-	if ( ! empty( $exclude_pages ) ) {
2849
-		$args['exclude'] = $exclude_pages;
2850
-	}
2848
+    if ( ! empty( $exclude_pages ) ) {
2849
+        $args['exclude'] = $exclude_pages;
2850
+    }
2851 2851
 
2852
-	$pages = get_pages( $args );
2852
+    $pages = get_pages( $args );
2853 2853
 
2854
-	$options = array( '' => __( 'Select Page...', 'ayecode-connect' ) );
2855
-	if ( ! empty( $pages ) ) {
2856
-		foreach ( $pages as $page ) {
2857
-			if ( ! empty( $page->ID ) && ! empty( $page->post_title ) ) {
2858
-				$options[ $page->ID ] = $page->post_title . ' (#' . $page->ID . ')';
2859
-			}
2860
-		}
2861
-	}
2854
+    $options = array( '' => __( 'Select Page...', 'ayecode-connect' ) );
2855
+    if ( ! empty( $pages ) ) {
2856
+        foreach ( $pages as $page ) {
2857
+            if ( ! empty( $page->ID ) && ! empty( $page->post_title ) ) {
2858
+                $options[ $page->ID ] = $page->post_title . ' (#' . $page->ID . ')';
2859
+            }
2860
+        }
2861
+    }
2862 2862
 
2863
-	$sd_tmpl_page_options = $options;
2863
+    $sd_tmpl_page_options = $options;
2864 2864
 
2865
-	return apply_filters( 'sd_template_page_options', $options );
2865
+    return apply_filters( 'sd_template_page_options', $options );
2866 2866
 }
2867 2867
 
2868 2868
 /**
@@ -2874,25 +2874,25 @@  discard block
 block discarded – undo
2874 2874
  * @return array Template part options.
2875 2875
  */
2876 2876
 function sd_template_part_options( $args = array() ) {
2877
-	global $sd_tmpl_part_options;
2877
+    global $sd_tmpl_part_options;
2878 2878
 
2879
-	if ( ! empty( $sd_tmpl_part_options ) ) {
2880
-		return $sd_tmpl_part_options;
2881
-	}
2879
+    if ( ! empty( $sd_tmpl_part_options ) ) {
2880
+        return $sd_tmpl_part_options;
2881
+    }
2882 2882
 
2883
-	$options = array( '' => __( 'Select Template Part...', 'ayecode-connect' ) );
2883
+    $options = array( '' => __( 'Select Template Part...', 'ayecode-connect' ) );
2884 2884
 
2885
-	$parts = get_block_templates( array(), 'wp_template_part' );
2885
+    $parts = get_block_templates( array(), 'wp_template_part' );
2886 2886
 
2887
-	if ( ! empty( $parts ) ) {
2888
-		foreach ( $parts as $part ) {
2889
-			$options[ $part->slug ] = $part->title . ' (#' . $part->slug . ')';
2890
-		}
2891
-	}
2887
+    if ( ! empty( $parts ) ) {
2888
+        foreach ( $parts as $part ) {
2889
+            $options[ $part->slug ] = $part->title . ' (#' . $part->slug . ')';
2890
+        }
2891
+    }
2892 2892
 
2893
-	$sd_tmpl_part_options = $options;
2893
+    $sd_tmpl_part_options = $options;
2894 2894
 
2895
-	return apply_filters( 'sd_template_part_options', $options, $args );
2895
+    return apply_filters( 'sd_template_part_options', $options, $args );
2896 2896
 }
2897 2897
 
2898 2898
 /**
@@ -2904,25 +2904,25 @@  discard block
 block discarded – undo
2904 2904
  * @return array Template part object.
2905 2905
  */
2906 2906
 function sd_get_template_part_by_slug( $slug ) {
2907
-	global $bs_tmpl_part_by_slug;
2907
+    global $bs_tmpl_part_by_slug;
2908 2908
 
2909
-	if ( empty( $bs_tmpl_part_by_slug ) ) {
2910
-		$bs_tmpl_part_by_slug = array();
2911
-	}
2909
+    if ( empty( $bs_tmpl_part_by_slug ) ) {
2910
+        $bs_tmpl_part_by_slug = array();
2911
+    }
2912 2912
 
2913
-	if ( isset( $bs_tmpl_part_by_slug[ $slug ] ) ) {
2914
-		return $bs_tmpl_part_by_slug[ $slug ];
2915
-	}
2913
+    if ( isset( $bs_tmpl_part_by_slug[ $slug ] ) ) {
2914
+        return $bs_tmpl_part_by_slug[ $slug ];
2915
+    }
2916 2916
 
2917
-	$template_query = get_block_templates( array( 'slug__in' => array( $slug ) ), 'wp_template_part' );
2917
+    $template_query = get_block_templates( array( 'slug__in' => array( $slug ) ), 'wp_template_part' );
2918 2918
 
2919
-	$query_post = ! empty( $template_query ) ? $template_query[0] : array();
2919
+    $query_post = ! empty( $template_query ) ? $template_query[0] : array();
2920 2920
 
2921
-	$template_part = ! empty( $query_post ) && $query_post->status == 'publish' ? $query_post : array();
2921
+    $template_part = ! empty( $query_post ) && $query_post->status == 'publish' ? $query_post : array();
2922 2922
 
2923
-	$bs_tmpl_part_by_slug[ $slug ] = $template_part;
2923
+    $bs_tmpl_part_by_slug[ $slug ] = $template_part;
2924 2924
 
2925
-	return apply_filters( 'sd_get_template_part_by_slug', $template_part, $slug );
2925
+    return apply_filters( 'sd_get_template_part_by_slug', $template_part, $slug );
2926 2926
 }
2927 2927
 
2928 2928
 /**
@@ -2935,364 +2935,364 @@  discard block
 block discarded – undo
2935 2935
  * @param WP_Block $instance      The block instance.
2936 2936
  */
2937 2937
 function sd_render_block( $block_content, $block, $instance = '' ) {
2938
-	// No block visibility conditions set.
2939
-	if ( empty( $block['attrs']['visibility_conditions'] ) ) {
2940
-		return $block_content;
2941
-	}
2942
-
2943
-	$attributes = json_decode( $block['attrs']['visibility_conditions'], true );
2944
-	$rules = ! empty( $attributes ) ? sd_block_parse_rules( $attributes ) : array();
2945
-
2946
-	// No rules set.
2947
-	if ( empty( $rules ) ) {
2948
-		return $block_content;
2949
-	}
2950
-
2951
-	$_block_content = $block_content;
2952
-
2953
-	if ( ! empty( $rules ) && sd_block_check_rules( $rules ) ) {
2954
-		if ( ! empty( $attributes['output']['type'] ) ) {
2955
-			switch ( $attributes['output']['type'] ) {
2956
-				case 'hide':
2957
-					$valid_type = true;
2958
-					$content = '';
2959
-
2960
-					break;
2961
-				case 'message':
2962
-					$valid_type = true;
2963
-
2964
-					if ( isset( $attributes['output']['message'] ) ) {
2965
-						$content = $attributes['output']['message'] != '' ? __( stripslashes( $attributes['output']['message'] ), 'ayecode-connect' ) : $attributes['output']['message'];
2966
-
2967
-						if ( ! empty( $attributes['output']['message_type'] ) ) {
2968
-							$content = aui()->alert( array(
2969
-									'type'=> $attributes['output']['message_type'],
2970
-									'content'=> $content
2971
-								)
2972
-							);
2973
-						}
2974
-					}
2975
-
2976
-					break;
2977
-				case 'page':
2978
-					$valid_type = true;
2979
-
2980
-					$page_id = ! empty( $attributes['output']['page'] ) ? absint( $attributes['output']['page'] ) : 0;
2981
-					$content = sd_get_page_content( $page_id );
2982
-
2983
-					break;
2984
-				case 'template_part':
2985
-					$valid_type = true;
2986
-
2987
-					$template_part = ! empty( $attributes['output']['template_part'] ) ? $attributes['output']['template_part'] : '';
2988
-					$content = sd_get_template_part_content( $template_part );
2989
-
2990
-					break;
2991
-				default:
2992
-					$valid_type = false;
2993
-					break;
2994
-			}
2995
-
2996
-			if ( $valid_type ) {
2997
-				$block_content = '<div class="' . esc_attr( wp_get_block_default_classname( $instance->name ) ) . ' sd-block-has-rule">' . $content . '</div>';
2998
-			}
2999
-		}
3000
-	}
3001
-
3002
-	return apply_filters( 'sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance );
2938
+    // No block visibility conditions set.
2939
+    if ( empty( $block['attrs']['visibility_conditions'] ) ) {
2940
+        return $block_content;
2941
+    }
2942
+
2943
+    $attributes = json_decode( $block['attrs']['visibility_conditions'], true );
2944
+    $rules = ! empty( $attributes ) ? sd_block_parse_rules( $attributes ) : array();
2945
+
2946
+    // No rules set.
2947
+    if ( empty( $rules ) ) {
2948
+        return $block_content;
2949
+    }
2950
+
2951
+    $_block_content = $block_content;
2952
+
2953
+    if ( ! empty( $rules ) && sd_block_check_rules( $rules ) ) {
2954
+        if ( ! empty( $attributes['output']['type'] ) ) {
2955
+            switch ( $attributes['output']['type'] ) {
2956
+                case 'hide':
2957
+                    $valid_type = true;
2958
+                    $content = '';
2959
+
2960
+                    break;
2961
+                case 'message':
2962
+                    $valid_type = true;
2963
+
2964
+                    if ( isset( $attributes['output']['message'] ) ) {
2965
+                        $content = $attributes['output']['message'] != '' ? __( stripslashes( $attributes['output']['message'] ), 'ayecode-connect' ) : $attributes['output']['message'];
2966
+
2967
+                        if ( ! empty( $attributes['output']['message_type'] ) ) {
2968
+                            $content = aui()->alert( array(
2969
+                                    'type'=> $attributes['output']['message_type'],
2970
+                                    'content'=> $content
2971
+                                )
2972
+                            );
2973
+                        }
2974
+                    }
2975
+
2976
+                    break;
2977
+                case 'page':
2978
+                    $valid_type = true;
2979
+
2980
+                    $page_id = ! empty( $attributes['output']['page'] ) ? absint( $attributes['output']['page'] ) : 0;
2981
+                    $content = sd_get_page_content( $page_id );
2982
+
2983
+                    break;
2984
+                case 'template_part':
2985
+                    $valid_type = true;
2986
+
2987
+                    $template_part = ! empty( $attributes['output']['template_part'] ) ? $attributes['output']['template_part'] : '';
2988
+                    $content = sd_get_template_part_content( $template_part );
2989
+
2990
+                    break;
2991
+                default:
2992
+                    $valid_type = false;
2993
+                    break;
2994
+            }
2995
+
2996
+            if ( $valid_type ) {
2997
+                $block_content = '<div class="' . esc_attr( wp_get_block_default_classname( $instance->name ) ) . ' sd-block-has-rule">' . $content . '</div>';
2998
+            }
2999
+        }
3000
+    }
3001
+
3002
+    return apply_filters( 'sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance );
3003 3003
 }
3004 3004
 add_filter( 'render_block', 'sd_render_block', 9, 3 );
3005 3005
 
3006 3006
 function sd_get_page_content( $page_id ) {
3007
-	$content = $page_id > 0 ? get_post_field( 'post_content', (int) $page_id ) : '';
3007
+    $content = $page_id > 0 ? get_post_field( 'post_content', (int) $page_id ) : '';
3008 3008
 
3009
-	// Maybe bypass content
3010
-	$bypass_content = apply_filters( 'sd_bypass_page_content', '', $content, $page_id );
3011
-	if ( $bypass_content ) {
3012
-		return $bypass_content;
3013
-	}
3009
+    // Maybe bypass content
3010
+    $bypass_content = apply_filters( 'sd_bypass_page_content', '', $content, $page_id );
3011
+    if ( $bypass_content ) {
3012
+        return $bypass_content;
3013
+    }
3014 3014
 
3015
-	// Run the shortcodes on the content.
3016
-	$content = do_shortcode( $content );
3015
+    // Run the shortcodes on the content.
3016
+    $content = do_shortcode( $content );
3017 3017
 
3018
-	// Run block content if its available.
3019
-	if ( function_exists( 'do_blocks' ) ) {
3020
-		$content = do_blocks( $content );
3021
-	}
3018
+    // Run block content if its available.
3019
+    if ( function_exists( 'do_blocks' ) ) {
3020
+        $content = do_blocks( $content );
3021
+    }
3022 3022
 
3023
-	return apply_filters( 'sd_get_page_content', $content, $page_id );
3023
+    return apply_filters( 'sd_get_page_content', $content, $page_id );
3024 3024
 }
3025 3025
 
3026 3026
 function sd_get_template_part_content( $template_part ) {
3027
-	$template_part_post = $template_part ? sd_get_template_part_by_slug( $template_part ) : array();
3028
-	$content = ! empty( $template_part_post ) ? $template_part_post->content : '';
3027
+    $template_part_post = $template_part ? sd_get_template_part_by_slug( $template_part ) : array();
3028
+    $content = ! empty( $template_part_post ) ? $template_part_post->content : '';
3029 3029
 
3030
-	// Maybe bypass content
3031
-	$bypass_content = apply_filters( 'sd_bypass_template_part_content', '', $content, $template_part );
3032
-	if ( $bypass_content ) {
3033
-		return $bypass_content;
3034
-	}
3030
+    // Maybe bypass content
3031
+    $bypass_content = apply_filters( 'sd_bypass_template_part_content', '', $content, $template_part );
3032
+    if ( $bypass_content ) {
3033
+        return $bypass_content;
3034
+    }
3035 3035
 
3036
-	// Run the shortcodes on the content.
3037
-	$content = do_shortcode( $content );
3036
+    // Run the shortcodes on the content.
3037
+    $content = do_shortcode( $content );
3038 3038
 
3039
-	// Run block content if its available.
3040
-	if ( function_exists( 'do_blocks' ) ) {
3041
-		$content = do_blocks( $content );
3042
-	}
3039
+    // Run block content if its available.
3040
+    if ( function_exists( 'do_blocks' ) ) {
3041
+        $content = do_blocks( $content );
3042
+    }
3043 3043
 
3044
-	return apply_filters( 'sd_get_template_part_content', $content, $template_part );
3044
+    return apply_filters( 'sd_get_template_part_content', $content, $template_part );
3045 3045
 }
3046 3046
 
3047 3047
 function sd_block_parse_rules( $attrs ) {
3048
-	$rules = array();
3048
+    $rules = array();
3049 3049
 
3050
-	if ( ! empty( $attrs ) && is_array( $attrs ) ) {
3051
-		$attrs_keys = array_keys( $attrs );
3050
+    if ( ! empty( $attrs ) && is_array( $attrs ) ) {
3051
+        $attrs_keys = array_keys( $attrs );
3052 3052
 
3053
-		for ( $i = 1; $i <= count( $attrs_keys ); $i++ ) {
3054
-			if ( ! empty( $attrs[ 'rule' . $i ] ) && is_array( $attrs[ 'rule' . $i ] ) ) {
3055
-				$rules[] = $attrs[ 'rule' . $i ];
3056
-			}
3057
-		}
3058
-	}
3053
+        for ( $i = 1; $i <= count( $attrs_keys ); $i++ ) {
3054
+            if ( ! empty( $attrs[ 'rule' . $i ] ) && is_array( $attrs[ 'rule' . $i ] ) ) {
3055
+                $rules[] = $attrs[ 'rule' . $i ];
3056
+            }
3057
+        }
3058
+    }
3059 3059
 
3060
-	return apply_filters( 'sd_block_parse_rules', $rules, $attrs );
3060
+    return apply_filters( 'sd_block_parse_rules', $rules, $attrs );
3061 3061
 }
3062 3062
 
3063 3063
 function sd_block_check_rules( $rules ) {
3064
-	if ( ! ( is_array( $rules ) && ! empty( $rules ) ) ) {
3065
-		return true;
3066
-	}
3064
+    if ( ! ( is_array( $rules ) && ! empty( $rules ) ) ) {
3065
+        return true;
3066
+    }
3067 3067
 
3068
-	foreach ( $rules as $key => $rule ) {
3069
-		$match = apply_filters( 'sd_block_check_rule', true, $rule );
3068
+    foreach ( $rules as $key => $rule ) {
3069
+        $match = apply_filters( 'sd_block_check_rule', true, $rule );
3070 3070
 
3071
-		if ( ! $match ) {
3072
-			break;
3073
-		}
3074
-	}
3071
+        if ( ! $match ) {
3072
+            break;
3073
+        }
3074
+    }
3075 3075
 
3076
-	return apply_filters( 'sd_block_check_rules', $match, $rules );
3076
+    return apply_filters( 'sd_block_check_rules', $match, $rules );
3077 3077
 }
3078 3078
 
3079 3079
 function sd_block_check_rule( $match, $rule ) {
3080
-	if ( $match && ! empty( $rule['type'] ) ) {
3081
-		switch ( $rule['type'] ) {
3082
-			case 'logged_in':
3083
-				$match = (bool) is_user_logged_in();
3080
+    if ( $match && ! empty( $rule['type'] ) ) {
3081
+        switch ( $rule['type'] ) {
3082
+            case 'logged_in':
3083
+                $match = (bool) is_user_logged_in();
3084 3084
 
3085
-				break;
3086
-			case 'logged_out':
3087
-				$match = ! is_user_logged_in();
3085
+                break;
3086
+            case 'logged_out':
3087
+                $match = ! is_user_logged_in();
3088 3088
 
3089
-				break;
3090
-			case 'user_roles':
3091
-				$match = false;
3089
+                break;
3090
+            case 'user_roles':
3091
+                $match = false;
3092 3092
 
3093
-				if ( ! empty( $rule['user_roles'] ) ) {
3094
-					$user_roles = is_scalar( $rule['user_roles'] ) ? explode( ",", $rule['user_roles'] ) : $rule['user_roles'];
3093
+                if ( ! empty( $rule['user_roles'] ) ) {
3094
+                    $user_roles = is_scalar( $rule['user_roles'] ) ? explode( ",", $rule['user_roles'] ) : $rule['user_roles'];
3095 3095
 
3096
-					if ( is_array( $user_roles ) ) {
3097
-						$user_roles = array_filter( array_map( 'trim', $user_roles ) );
3098
-					}
3096
+                    if ( is_array( $user_roles ) ) {
3097
+                        $user_roles = array_filter( array_map( 'trim', $user_roles ) );
3098
+                    }
3099 3099
 
3100
-					if ( ! empty( $user_roles ) && is_array( $user_roles ) && is_user_logged_in() && ( $current_user = wp_get_current_user() ) ) {
3101
-						$current_user_roles = $current_user->roles;
3100
+                    if ( ! empty( $user_roles ) && is_array( $user_roles ) && is_user_logged_in() && ( $current_user = wp_get_current_user() ) ) {
3101
+                        $current_user_roles = $current_user->roles;
3102 3102
 
3103
-						foreach ( $user_roles as $role ) {
3104
-							if ( in_array( $role, $current_user_roles ) ) {
3105
-								$match = true;
3106
-							}
3107
-						}
3108
-					}
3109
-				}
3103
+                        foreach ( $user_roles as $role ) {
3104
+                            if ( in_array( $role, $current_user_roles ) ) {
3105
+                                $match = true;
3106
+                            }
3107
+                        }
3108
+                    }
3109
+                }
3110 3110
 
3111
-				break;
3112
-			case 'gd_field':
3113
-				$match = sd_block_check_rule_gd_field( $rule );
3111
+                break;
3112
+            case 'gd_field':
3113
+                $match = sd_block_check_rule_gd_field( $rule );
3114 3114
 
3115
-				break;
3116
-		}
3117
-	}
3115
+                break;
3116
+        }
3117
+    }
3118 3118
 
3119
-	return $match;
3119
+    return $match;
3120 3120
 }
3121 3121
 add_filter( 'sd_block_check_rule', 'sd_block_check_rule', 10, 2 );
3122 3122
 
3123 3123
 function sd_block_check_rule_gd_field( $rule ) {
3124
-	global $gd_post;
3125
-
3126
-	$match_found = false;
3127
-
3128
-	if ( class_exists( 'GeoDirectory' ) && ! empty( $gd_post->ID ) && ! empty( $rule['field'] ) && ! empty( $rule['condition'] ) ) {
3129
-		$args['block_visibility'] = true;
3130
-		$args['key'] = $rule['field'];
3131
-		$args['condition'] = $rule['condition'];
3132
-		$args['search'] = isset( $rule['search'] ) ? $rule['search'] : '';
3133
-
3134
-		if ( $args['key'] == 'street' ) {
3135
-			$args['key'] = 'address';
3136
-		}
3137
-
3138
-		$match_field = $_match_field = $args['key'];
3139
-
3140
-		if ( $match_field == 'address' ) {
3141
-			$match_field = 'street';
3142
-		} elseif ( $match_field == 'post_images' ) {
3143
-			$match_field = 'featured_image';
3144
-		}
3145
-
3146
-		$find_post = $gd_post;
3147
-		$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3148
-
3149
-		if ( ! empty( $find_post->ID ) && ! in_array( 'post_category', $find_post_keys ) ) {
3150
-			$find_post = geodir_get_post_info( (int) $find_post->ID );
3151
-			$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3152
-		}
3153
-
3154
-		if ( $match_field === '' || ( ! empty( $find_post_keys ) && ( in_array( $match_field, $find_post_keys ) || in_array( $_match_field, $find_post_keys ) ) ) ) {
3155
-			$address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
3156
-			$field = array();
3157
-
3158
-			if ( $match_field && ! in_array( $match_field, array( 'post_date', 'post_modified', 'default_category', 'post_id', 'post_status' ) ) && ! in_array( $match_field, $address_fields ) ) {
3159
-				$package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
3160
-				$fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );
3161
-
3162
-				foreach ( $fields as $field_info ) {
3163
-					if ( $match_field == $field_info['htmlvar_name'] ) {
3164
-						$field = $field_info;
3165
-						break;
3166
-					} elseif( $_match_field == $field_info['htmlvar_name'] ) {
3167
-						$field = $field_info;
3168
-						break;
3169
-					}
3170
-				}
3171
-
3172
-				if ( empty( $field ) ) {
3173
-					return false;
3174
-				}
3175
-			}
3176
-
3177
-			// Parse search.
3178
-			$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule );
3179
-
3180
-			// Address fields.
3181
-			if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
3182
-				if ( ! empty( $address_fields[ $match_field ] ) ) {
3183
-					$field = $address_fields[ $match_field ];
3184
-				}
3185
-			}
3186
-
3187
-			$is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
3188
-			$is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );
3189
-
3190
-			$match_value = isset($find_post->{$match_field}) ? esc_attr( trim( $find_post->{$match_field} ) ) : '';
3191
-			$match_found = $match_field === '' ? true : false;
3192
-
3193
-			if ( ! $match_found ) {
3194
-				if ( ( $match_field == 'post_date' || $match_field == 'post_modified' ) && ( empty( $args['condition'] ) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than' ) ) {
3195
-					if ( strpos( $search, '+' ) === false && strpos( $search, '-' ) === false ) {
3196
-						$search = '+' . $search;
3197
-					}
3198
-					$the_time = $match_field == 'post_modified' ? get_the_modified_date( 'Y-m-d', $find_post ) : get_the_time( 'Y-m-d', $find_post );
3199
-					$until_time = strtotime( $the_time . ' ' . $search . ' days' );
3200
-					$now_time   = strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) );
3201
-					if ( ( empty( $args['condition'] ) || $args['condition'] == 'is_less_than' ) && $until_time > $now_time ) {
3202
-						$match_found = true;
3203
-					} elseif ( $args['condition'] == 'is_greater_than' && $until_time < $now_time ) {
3204
-						$match_found = true;
3205
-					}
3206
-				} else {
3207
-					switch ( $args['condition'] ) {
3208
-						case 'is_equal':
3209
-							$match_found = (bool) ( $search != '' && $match_value == $search );
3210
-							break;
3211
-						case 'is_not_equal':
3212
-							$match_found = (bool) ( $search != '' && $match_value != $search );
3213
-							break;
3214
-						case 'is_greater_than':
3215
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value > $search );
3216
-							break;
3217
-						case 'is_less_than':
3218
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value < $search );
3219
-							break;
3220
-						case 'is_empty':
3221
-							$match_found = (bool) ( $match_value === '' || $match_value === false || $match_value === '0' || is_null( $match_value ) );
3222
-							break;
3223
-						case 'is_not_empty':
3224
-							$match_found = (bool) ( $match_value !== '' && $match_value !== false && $match_value !== '0' && ! is_null( $match_value ) );
3225
-							break;
3226
-						case 'is_contains':
3227
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) !== false );
3228
-							break;
3229
-						case 'is_not_contains':
3230
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) === false );
3231
-							break;
3232
-					}
3233
-				}
3234
-			}
3235
-
3236
-			$match_found = apply_filters( 'geodir_post_badge_check_match_found', $match_found, $args, $find_post );
3237
-		}
3238
-	}
3239
-
3240
-	return $match_found;
3124
+    global $gd_post;
3125
+
3126
+    $match_found = false;
3127
+
3128
+    if ( class_exists( 'GeoDirectory' ) && ! empty( $gd_post->ID ) && ! empty( $rule['field'] ) && ! empty( $rule['condition'] ) ) {
3129
+        $args['block_visibility'] = true;
3130
+        $args['key'] = $rule['field'];
3131
+        $args['condition'] = $rule['condition'];
3132
+        $args['search'] = isset( $rule['search'] ) ? $rule['search'] : '';
3133
+
3134
+        if ( $args['key'] == 'street' ) {
3135
+            $args['key'] = 'address';
3136
+        }
3137
+
3138
+        $match_field = $_match_field = $args['key'];
3139
+
3140
+        if ( $match_field == 'address' ) {
3141
+            $match_field = 'street';
3142
+        } elseif ( $match_field == 'post_images' ) {
3143
+            $match_field = 'featured_image';
3144
+        }
3145
+
3146
+        $find_post = $gd_post;
3147
+        $find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3148
+
3149
+        if ( ! empty( $find_post->ID ) && ! in_array( 'post_category', $find_post_keys ) ) {
3150
+            $find_post = geodir_get_post_info( (int) $find_post->ID );
3151
+            $find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3152
+        }
3153
+
3154
+        if ( $match_field === '' || ( ! empty( $find_post_keys ) && ( in_array( $match_field, $find_post_keys ) || in_array( $_match_field, $find_post_keys ) ) ) ) {
3155
+            $address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
3156
+            $field = array();
3157
+
3158
+            if ( $match_field && ! in_array( $match_field, array( 'post_date', 'post_modified', 'default_category', 'post_id', 'post_status' ) ) && ! in_array( $match_field, $address_fields ) ) {
3159
+                $package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
3160
+                $fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );
3161
+
3162
+                foreach ( $fields as $field_info ) {
3163
+                    if ( $match_field == $field_info['htmlvar_name'] ) {
3164
+                        $field = $field_info;
3165
+                        break;
3166
+                    } elseif( $_match_field == $field_info['htmlvar_name'] ) {
3167
+                        $field = $field_info;
3168
+                        break;
3169
+                    }
3170
+                }
3171
+
3172
+                if ( empty( $field ) ) {
3173
+                    return false;
3174
+                }
3175
+            }
3176
+
3177
+            // Parse search.
3178
+            $search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule );
3179
+
3180
+            // Address fields.
3181
+            if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
3182
+                if ( ! empty( $address_fields[ $match_field ] ) ) {
3183
+                    $field = $address_fields[ $match_field ];
3184
+                }
3185
+            }
3186
+
3187
+            $is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
3188
+            $is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );
3189
+
3190
+            $match_value = isset($find_post->{$match_field}) ? esc_attr( trim( $find_post->{$match_field} ) ) : '';
3191
+            $match_found = $match_field === '' ? true : false;
3192
+
3193
+            if ( ! $match_found ) {
3194
+                if ( ( $match_field == 'post_date' || $match_field == 'post_modified' ) && ( empty( $args['condition'] ) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than' ) ) {
3195
+                    if ( strpos( $search, '+' ) === false && strpos( $search, '-' ) === false ) {
3196
+                        $search = '+' . $search;
3197
+                    }
3198
+                    $the_time = $match_field == 'post_modified' ? get_the_modified_date( 'Y-m-d', $find_post ) : get_the_time( 'Y-m-d', $find_post );
3199
+                    $until_time = strtotime( $the_time . ' ' . $search . ' days' );
3200
+                    $now_time   = strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) );
3201
+                    if ( ( empty( $args['condition'] ) || $args['condition'] == 'is_less_than' ) && $until_time > $now_time ) {
3202
+                        $match_found = true;
3203
+                    } elseif ( $args['condition'] == 'is_greater_than' && $until_time < $now_time ) {
3204
+                        $match_found = true;
3205
+                    }
3206
+                } else {
3207
+                    switch ( $args['condition'] ) {
3208
+                        case 'is_equal':
3209
+                            $match_found = (bool) ( $search != '' && $match_value == $search );
3210
+                            break;
3211
+                        case 'is_not_equal':
3212
+                            $match_found = (bool) ( $search != '' && $match_value != $search );
3213
+                            break;
3214
+                        case 'is_greater_than':
3215
+                            $match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value > $search );
3216
+                            break;
3217
+                        case 'is_less_than':
3218
+                            $match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value < $search );
3219
+                            break;
3220
+                        case 'is_empty':
3221
+                            $match_found = (bool) ( $match_value === '' || $match_value === false || $match_value === '0' || is_null( $match_value ) );
3222
+                            break;
3223
+                        case 'is_not_empty':
3224
+                            $match_found = (bool) ( $match_value !== '' && $match_value !== false && $match_value !== '0' && ! is_null( $match_value ) );
3225
+                            break;
3226
+                        case 'is_contains':
3227
+                            $match_found = (bool) ( $search != '' && stripos( $match_value, $search ) !== false );
3228
+                            break;
3229
+                        case 'is_not_contains':
3230
+                            $match_found = (bool) ( $search != '' && stripos( $match_value, $search ) === false );
3231
+                            break;
3232
+                    }
3233
+                }
3234
+            }
3235
+
3236
+            $match_found = apply_filters( 'geodir_post_badge_check_match_found', $match_found, $args, $find_post );
3237
+        }
3238
+    }
3239
+
3240
+    return $match_found;
3241 3241
 }
3242 3242
 
3243 3243
 function sd_gd_field_rule_search( $search, $post_type, $rule ) {
3244
-	if ( ! $search ) {
3245
-		return $search;
3246
-	}
3247
-
3248
-	$orig_search = $search;
3249
-	$_search = strtolower( $search );
3250
-
3251
-	if ( $_search == 'date_today' ) {
3252
-		$search = date( 'Y-m-d' );
3253
-	} else if ( $_search == 'date_tomorrow' ) {
3254
-		$search = date( 'Y-m-d', strtotime( "+1 day" ) );
3255
-	} else if ( $_search == 'date_yesterday' ) {
3256
-		$search = date( 'Y-m-d', strtotime( "-1 day" ) );
3257
-	} else if ( $_search == 'time_his' ) {
3258
-		$search = date( 'H:i:s' );
3259
-	} else if ( $_search == 'time_hi' ) {
3260
-		$search = date( 'H:i' );
3261
-	} else if ( $_search == 'datetime_now' ) {
3262
-		$search = date( 'Y-m-d H:i:s' );
3263
-	} else if ( strpos( $_search, 'datetime_after_' ) === 0 ) {
3264
-		$_searches = explode( 'datetime_after_', $_search, 2 );
3265
-
3266
-		if ( ! empty( $_searches[1] ) ) {
3267
-			$search = date( 'Y-m-d H:i:s', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3268
-		} else {
3269
-			$search = date( 'Y-m-d H:i:s' );
3270
-		}
3271
-	} else if ( strpos( $_search, 'datetime_before_' ) === 0 ) {
3272
-		$_searches = explode( 'datetime_before_', $_search, 2 );
3273
-
3274
-		if ( ! empty( $_searches[1] ) ) {
3275
-			$search = date( 'Y-m-d H:i:s', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3276
-		} else {
3277
-			$search = date( 'Y-m-d H:i:s' );
3278
-		}
3279
-	} else if ( strpos( $_search, 'date_after_' ) === 0 ) {
3280
-		$_searches = explode( 'date_after_', $_search, 2 );
3281
-
3282
-		if ( ! empty( $_searches[1] ) ) {
3283
-			$search = date( 'Y-m-d', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3284
-		} else {
3285
-			$search = date( 'Y-m-d' );
3286
-		}
3287
-	} else if ( strpos( $_search, 'date_before_' ) === 0 ) {
3288
-		$_searches = explode( 'date_before_', $_search, 2 );
3289
-
3290
-		if ( ! empty( $_searches[1] ) ) {
3291
-			$search = date( 'Y-m-d', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3292
-		} else {
3293
-			$search = date( 'Y-m-d' );
3294
-		}
3295
-	}
3296
-
3297
-	return apply_filters( 'sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search );
3244
+    if ( ! $search ) {
3245
+        return $search;
3246
+    }
3247
+
3248
+    $orig_search = $search;
3249
+    $_search = strtolower( $search );
3250
+
3251
+    if ( $_search == 'date_today' ) {
3252
+        $search = date( 'Y-m-d' );
3253
+    } else if ( $_search == 'date_tomorrow' ) {
3254
+        $search = date( 'Y-m-d', strtotime( "+1 day" ) );
3255
+    } else if ( $_search == 'date_yesterday' ) {
3256
+        $search = date( 'Y-m-d', strtotime( "-1 day" ) );
3257
+    } else if ( $_search == 'time_his' ) {
3258
+        $search = date( 'H:i:s' );
3259
+    } else if ( $_search == 'time_hi' ) {
3260
+        $search = date( 'H:i' );
3261
+    } else if ( $_search == 'datetime_now' ) {
3262
+        $search = date( 'Y-m-d H:i:s' );
3263
+    } else if ( strpos( $_search, 'datetime_after_' ) === 0 ) {
3264
+        $_searches = explode( 'datetime_after_', $_search, 2 );
3265
+
3266
+        if ( ! empty( $_searches[1] ) ) {
3267
+            $search = date( 'Y-m-d H:i:s', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3268
+        } else {
3269
+            $search = date( 'Y-m-d H:i:s' );
3270
+        }
3271
+    } else if ( strpos( $_search, 'datetime_before_' ) === 0 ) {
3272
+        $_searches = explode( 'datetime_before_', $_search, 2 );
3273
+
3274
+        if ( ! empty( $_searches[1] ) ) {
3275
+            $search = date( 'Y-m-d H:i:s', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3276
+        } else {
3277
+            $search = date( 'Y-m-d H:i:s' );
3278
+        }
3279
+    } else if ( strpos( $_search, 'date_after_' ) === 0 ) {
3280
+        $_searches = explode( 'date_after_', $_search, 2 );
3281
+
3282
+        if ( ! empty( $_searches[1] ) ) {
3283
+            $search = date( 'Y-m-d', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3284
+        } else {
3285
+            $search = date( 'Y-m-d' );
3286
+        }
3287
+    } else if ( strpos( $_search, 'date_before_' ) === 0 ) {
3288
+        $_searches = explode( 'date_before_', $_search, 2 );
3289
+
3290
+        if ( ! empty( $_searches[1] ) ) {
3291
+            $search = date( 'Y-m-d', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3292
+        } else {
3293
+            $search = date( 'Y-m-d' );
3294
+        }
3295
+    }
3296
+
3297
+    return apply_filters( 'sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search );
3298 3298
 }
3299 3299
\ No newline at end of file
Please login to merge, or discard this patch.
vendor/ayecode/wp-super-duper/map.php 1 patch
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -3,241 +3,241 @@
 block discarded – undo
3 3
 class SD_Map extends WP_Super_Duper {
4 4
 
5 5
 
6
-	public $arguments;
7
-
8
-	/**
9
-	 * Sets up the widgets name etc
10
-	 */
11
-	public function __construct() {
12
-
13
-		$options = array(
14
-			'textdomain'     => 'super-duper',
15
-			// textdomain of the plugin/theme (used to prefix the Gutenberg block)
16
-			'block-icon'     => 'admin-site',
17
-			// Dash icon name for the block: https://developer.wordpress.org/resource/dashicons/#arrow-right
18
-			'block-category' => 'widgets',
19
-			// the category for the block, 'common', 'formatting', 'layout', 'widgets', 'embed'.
20
-			'block-keywords' => "['map','super','google']",
21
-			// used in the block search, MAX 3
22
-			'block-output'   => array( // the block visual output elements as an array
23
-				array(
24
-					'element' => 'p',
25
-					'content' => __('A Google API key is required to use this block, we recommend installing our plugin which makes it easy and sets it globally, or you can set a key in the block settings sidebar: ', 'ayecode-connect' ),
26
-					//'element_require' => '"1"=='.get_option( 'rgmk_google_map_api_key', '"0"') ? '"0"' : '"1"',
27
-					'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1 && [%api_key%]==""',
28
-				),
29
-				array(
30
-					'element' => 'a',
31
-					'content' => __('API KEY for Google Maps', 'ayecode-connect' ),
32
-					'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1 && [%api_key%]==""',
33
-					'href' => 'https://wordpress.org/plugins/api-key-for-google-maps/',
34
-				),
35
-				array(
36
-					'element' => 'img',
37
-					'class'   => '[%className%]',
38
-					//'content' => 'Hello: [%after_text%]' // block properties can be added by wrapping them in [%name%]
39
-					'element_require' => '[%type%]=="image"',
40
-					'src'     => get_option( 'rgmk_google_map_api_key', false) ? "https://maps.googleapis.com/maps/api/staticmap?center=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&size=[%static_width%]x[%static_height%]&key=".get_option( 'rgmk_google_map_api_key') : "https://maps.googleapis.com/maps/api/staticmap?center=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&size=[%static_width%]x[%static_height%]&key=[%api_key%]"
41
-				),
42
-				array(
43
-					'element' => 'div',
44
-					'class'   => 'sd-map-iframe-cover',
45
-					'style'   => '{overflow:"hidden", position:"relative"}',
46
-					array(
47
-						'element' => 'iframe',
48
-						'title'   => __( 'Placeholderx', 'ayecode-connect' ),
49
-						'class'   => '[%className%]',
50
-						'width'   => '[%width%]',
51
-						'height'  => '[%height%]',
52
-						'frameborder' => '0',
53
-						'allowfullscreen' => 'true',
54
-						'style' => '{border:0}',
55
-						'element_require' => '[%type%]!="image"',
56
-						'src'     => get_option( 'rgmk_google_map_api_key', false) ? "https://www.google.com/maps/embed/v1/[%type%]?q=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&key=".get_option( 'rgmk_google_map_api_key') : "https://www.google.com/maps/embed/v1/[%type%]?q=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&key=[%api_key%]"
57
-					),
58
-				),
59
-				array(
60
-					'element' => 'style',
61
-					'content' => '.sd-map-iframe-cover:hover:before {background: #4a4a4a88; content: "'.__( 'Click here, Settings are in the block settings sidebar', 'ayecode-connect' ).'";} .sd-map-iframe-cover:before{cursor: pointer; content: ""; width: 100%; height: 100%; position: absolute; top: 0; bottom: 0;padding-top: 33%; text-align: center;  color: #fff; font-size: 20px; font-weight: bold;}',
62
-					'element_require' => '[%type%]!="image"',
63
-				),
64
-			),
65
-			'class_name'     => __CLASS__,
66
-			// The calling class name
67
-			'base_id'        => 'sd_map',
68
-			// this is used as the widget id and the shortcode id.
69
-			'name'           => __( 'Map', 'ayecode-connect' ),
70
-			// the name of the widget/block
71
-			'widget_ops'     => array(
72
-				'classname'   => 'sd-map-class',
73
-				// widget class
74
-				'description' => esc_html__( 'This is an example that will take a text parameter and output it after `Hello:`.', 'ayecode-connect' ),
75
-				// widget description
76
-			),
77
-			'arguments'      => array( // these are the arguments that will be used in the widget, shortcode and block settings.
78
-				'type'  => array(
79
-					'title' => __('Map Type:', 'ayecode-connect'),
80
-					'desc' => __('Select the map type to use.', 'ayecode-connect'),
81
-					'type' => 'select',
82
-					'options'   =>  array(
83
-						"image" => __('Static Image', 'ayecode-connect'),
84
-						"place" => __('Place', 'ayecode-connect'),
6
+    public $arguments;
7
+
8
+    /**
9
+     * Sets up the widgets name etc
10
+     */
11
+    public function __construct() {
12
+
13
+        $options = array(
14
+            'textdomain'     => 'super-duper',
15
+            // textdomain of the plugin/theme (used to prefix the Gutenberg block)
16
+            'block-icon'     => 'admin-site',
17
+            // Dash icon name for the block: https://developer.wordpress.org/resource/dashicons/#arrow-right
18
+            'block-category' => 'widgets',
19
+            // the category for the block, 'common', 'formatting', 'layout', 'widgets', 'embed'.
20
+            'block-keywords' => "['map','super','google']",
21
+            // used in the block search, MAX 3
22
+            'block-output'   => array( // the block visual output elements as an array
23
+                array(
24
+                    'element' => 'p',
25
+                    'content' => __('A Google API key is required to use this block, we recommend installing our plugin which makes it easy and sets it globally, or you can set a key in the block settings sidebar: ', 'ayecode-connect' ),
26
+                    //'element_require' => '"1"=='.get_option( 'rgmk_google_map_api_key', '"0"') ? '"0"' : '"1"',
27
+                    'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1 && [%api_key%]==""',
28
+                ),
29
+                array(
30
+                    'element' => 'a',
31
+                    'content' => __('API KEY for Google Maps', 'ayecode-connect' ),
32
+                    'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1 && [%api_key%]==""',
33
+                    'href' => 'https://wordpress.org/plugins/api-key-for-google-maps/',
34
+                ),
35
+                array(
36
+                    'element' => 'img',
37
+                    'class'   => '[%className%]',
38
+                    //'content' => 'Hello: [%after_text%]' // block properties can be added by wrapping them in [%name%]
39
+                    'element_require' => '[%type%]=="image"',
40
+                    'src'     => get_option( 'rgmk_google_map_api_key', false) ? "https://maps.googleapis.com/maps/api/staticmap?center=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&size=[%static_width%]x[%static_height%]&key=".get_option( 'rgmk_google_map_api_key') : "https://maps.googleapis.com/maps/api/staticmap?center=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&size=[%static_width%]x[%static_height%]&key=[%api_key%]"
41
+                ),
42
+                array(
43
+                    'element' => 'div',
44
+                    'class'   => 'sd-map-iframe-cover',
45
+                    'style'   => '{overflow:"hidden", position:"relative"}',
46
+                    array(
47
+                        'element' => 'iframe',
48
+                        'title'   => __( 'Placeholderx', 'ayecode-connect' ),
49
+                        'class'   => '[%className%]',
50
+                        'width'   => '[%width%]',
51
+                        'height'  => '[%height%]',
52
+                        'frameborder' => '0',
53
+                        'allowfullscreen' => 'true',
54
+                        'style' => '{border:0}',
55
+                        'element_require' => '[%type%]!="image"',
56
+                        'src'     => get_option( 'rgmk_google_map_api_key', false) ? "https://www.google.com/maps/embed/v1/[%type%]?q=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&key=".get_option( 'rgmk_google_map_api_key') : "https://www.google.com/maps/embed/v1/[%type%]?q=[%location%]&maptype=[%maptype%]&zoom=[%zoom%]&key=[%api_key%]"
57
+                    ),
58
+                ),
59
+                array(
60
+                    'element' => 'style',
61
+                    'content' => '.sd-map-iframe-cover:hover:before {background: #4a4a4a88; content: "'.__( 'Click here, Settings are in the block settings sidebar', 'ayecode-connect' ).'";} .sd-map-iframe-cover:before{cursor: pointer; content: ""; width: 100%; height: 100%; position: absolute; top: 0; bottom: 0;padding-top: 33%; text-align: center;  color: #fff; font-size: 20px; font-weight: bold;}',
62
+                    'element_require' => '[%type%]!="image"',
63
+                ),
64
+            ),
65
+            'class_name'     => __CLASS__,
66
+            // The calling class name
67
+            'base_id'        => 'sd_map',
68
+            // this is used as the widget id and the shortcode id.
69
+            'name'           => __( 'Map', 'ayecode-connect' ),
70
+            // the name of the widget/block
71
+            'widget_ops'     => array(
72
+                'classname'   => 'sd-map-class',
73
+                // widget class
74
+                'description' => esc_html__( 'This is an example that will take a text parameter and output it after `Hello:`.', 'ayecode-connect' ),
75
+                // widget description
76
+            ),
77
+            'arguments'      => array( // these are the arguments that will be used in the widget, shortcode and block settings.
78
+                'type'  => array(
79
+                    'title' => __('Map Type:', 'ayecode-connect'),
80
+                    'desc' => __('Select the map type to use.', 'ayecode-connect'),
81
+                    'type' => 'select',
82
+                    'options'   =>  array(
83
+                        "image" => __('Static Image', 'ayecode-connect'),
84
+                        "place" => __('Place', 'ayecode-connect'),
85 85
 //						"directions" => __('Directions', 'ayecode-connect'),
86 86
 //						"search" => __('Search', 'ayecode-connect'),
87 87
 //						"view" => __('View', 'ayecode-connect'),
88 88
 //						"streetview" => __('Streetview', 'ayecode-connect'),
89
-					),
90
-					'default'  => 'image',
91
-					'desc_tip' => true,
92
-					'advanced' => false
93
-				),
94
-				'location'            => array(
95
-					'type'        => 'text',
96
-					'title'       => __( 'Location:', 'ayecode-connect' ),
97
-					'desc'        => __( 'Enter the location to show on the map, place, city, zip code or GPS.', 'ayecode-connect' ),
98
-					'placeholder' => 'Place, city, zip code or GPS',
99
-					'desc_tip'    => true,
100
-					'default'     => 'Ireland',
101
-					'advanced'    => false
102
-				),
103
-				'static_width'            => array(
104
-					'type'        => 'number',
105
-					'title'       => __( 'Width:', 'ayecode-connect' ),
106
-					'desc'        => __( 'This is the width of the map, for static maps you can only use px values.', 'ayecode-connect' ),
107
-					'placeholder' => '600',
108
-					'desc_tip'    => true,
109
-					'default'     => '600',
110
-					'custom_attributes' => array(
111
-						'max'         => '2000',
112
-						'min'         => '100',
113
-					),
114
-					'element_require' => '[%type%]=="image"',
115
-					'advanced'    => false
116
-				),
117
-				'static_height'           => array(
118
-					'type'        => 'number',
119
-					'title'       => __( 'Height:', 'ayecode-connect' ),
120
-					'desc'        => __( 'This is the height of the map, for static maps you can only use px values.', 'ayecode-connect' ),
121
-					'placeholder' => '400',
122
-					'desc_tip'    => true,
123
-					'default'     => '400',
124
-					'custom_attributes' => array(
125
-						'max'         => '2000',
126
-						'min'         => '100',
127
-						'required'         => 'required',
128
-					),
129
-					'element_require' => '[%type%]=="image"',
130
-					'advanced'    => false
131
-				),
132
-				'width'            => array(
133
-					'type'        => 'text',
134
-					'title'       => __( 'Width:', 'ayecode-connect' ),
135
-					'desc'        => __( 'This is the width of the map, you can use % or px here.', 'ayecode-connect' ),
136
-					'placeholder' => '100%',
137
-					'desc_tip'    => true,
138
-					'default'     => '100%',
139
-					'element_require' => '[%type%]!="image"',
140
-					'advanced'    => false
141
-				),
142
-				'height'           => array(
143
-					'type'        => 'text',
144
-					'title'       => __( 'Height:', 'ayecode-connect' ),
145
-					'desc'        => __( 'This is the height of the map, you can use %, px or vh here.', 'ayecode-connect' ),
146
-					'placeholder' => '425px',
147
-					'desc_tip'    => true,
148
-					'default'     => '425px',
149
-					'element_require' => '[%type%]!="image"',
150
-					'advanced'    => false
151
-				),
152
-				'maptype'          => array(
153
-					'type'     => 'select',
154
-					'title'    => __( 'Mapview:', 'ayecode-connect' ),
155
-					'desc'     => __( 'This is the type of map view that will be used by default.', 'ayecode-connect' ),
156
-					'options'  => array(
157
-						"roadmap"   => __( 'Road Map', 'ayecode-connect' ),
158
-						"satellite" => __( 'Satellite Map', 'ayecode-connect' ),
89
+                    ),
90
+                    'default'  => 'image',
91
+                    'desc_tip' => true,
92
+                    'advanced' => false
93
+                ),
94
+                'location'            => array(
95
+                    'type'        => 'text',
96
+                    'title'       => __( 'Location:', 'ayecode-connect' ),
97
+                    'desc'        => __( 'Enter the location to show on the map, place, city, zip code or GPS.', 'ayecode-connect' ),
98
+                    'placeholder' => 'Place, city, zip code or GPS',
99
+                    'desc_tip'    => true,
100
+                    'default'     => 'Ireland',
101
+                    'advanced'    => false
102
+                ),
103
+                'static_width'            => array(
104
+                    'type'        => 'number',
105
+                    'title'       => __( 'Width:', 'ayecode-connect' ),
106
+                    'desc'        => __( 'This is the width of the map, for static maps you can only use px values.', 'ayecode-connect' ),
107
+                    'placeholder' => '600',
108
+                    'desc_tip'    => true,
109
+                    'default'     => '600',
110
+                    'custom_attributes' => array(
111
+                        'max'         => '2000',
112
+                        'min'         => '100',
113
+                    ),
114
+                    'element_require' => '[%type%]=="image"',
115
+                    'advanced'    => false
116
+                ),
117
+                'static_height'           => array(
118
+                    'type'        => 'number',
119
+                    'title'       => __( 'Height:', 'ayecode-connect' ),
120
+                    'desc'        => __( 'This is the height of the map, for static maps you can only use px values.', 'ayecode-connect' ),
121
+                    'placeholder' => '400',
122
+                    'desc_tip'    => true,
123
+                    'default'     => '400',
124
+                    'custom_attributes' => array(
125
+                        'max'         => '2000',
126
+                        'min'         => '100',
127
+                        'required'         => 'required',
128
+                    ),
129
+                    'element_require' => '[%type%]=="image"',
130
+                    'advanced'    => false
131
+                ),
132
+                'width'            => array(
133
+                    'type'        => 'text',
134
+                    'title'       => __( 'Width:', 'ayecode-connect' ),
135
+                    'desc'        => __( 'This is the width of the map, you can use % or px here.', 'ayecode-connect' ),
136
+                    'placeholder' => '100%',
137
+                    'desc_tip'    => true,
138
+                    'default'     => '100%',
139
+                    'element_require' => '[%type%]!="image"',
140
+                    'advanced'    => false
141
+                ),
142
+                'height'           => array(
143
+                    'type'        => 'text',
144
+                    'title'       => __( 'Height:', 'ayecode-connect' ),
145
+                    'desc'        => __( 'This is the height of the map, you can use %, px or vh here.', 'ayecode-connect' ),
146
+                    'placeholder' => '425px',
147
+                    'desc_tip'    => true,
148
+                    'default'     => '425px',
149
+                    'element_require' => '[%type%]!="image"',
150
+                    'advanced'    => false
151
+                ),
152
+                'maptype'          => array(
153
+                    'type'     => 'select',
154
+                    'title'    => __( 'Mapview:', 'ayecode-connect' ),
155
+                    'desc'     => __( 'This is the type of map view that will be used by default.', 'ayecode-connect' ),
156
+                    'options'  => array(
157
+                        "roadmap"   => __( 'Road Map', 'ayecode-connect' ),
158
+                        "satellite" => __( 'Satellite Map', 'ayecode-connect' ),
159 159
 //						"hybrid"    => __( 'Hybrid Map', 'ayecode-connect' ),
160 160
 //						"terrain"   => __( 'Terrain Map', 'ayecode-connect' ),
161
-					),
162
-					'desc_tip' => true,
163
-					'default'  => 'roadmap',
164
-					'advanced' => true
165
-				),
166
-				'zoom'             => array(
167
-					'type'        => 'select',
168
-					'title'       => __( 'Zoom level:', 'ayecode-connect' ),
169
-					'desc'        => __( 'This is the zoom level of the map, `auto` is recommended.', 'ayecode-connect' ),
170
-					'options'     => range( 1, 19 ),
171
-					'placeholder' => '',
172
-					'desc_tip'    => true,
173
-					'default'     => '7',
174
-					'advanced'    => true
175
-				),
176
-				'api_key'           => array(
177
-					'type'        => 'text',
178
-					'title'       => __( 'Api Key:', 'ayecode-connect' ),
179
-					'desc'        => __( 'This is the height of the map, you can use %, px or vh here.', 'ayecode-connect' ),
180
-					'placeholder' => '',
181
-					'desc_tip'    => true,
182
-					'default'     => '',
183
-					'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1',
184
-					'advanced'    => false
185
-				),
186
-			)
187
-		);
188
-
189
-		parent::__construct( $options );
190
-	}
191
-
192
-
193
-	/**
194
-	 * This is the output function for the widget, shortcode and block (front end).
195
-	 *
196
-	 * @param array $args The arguments values.
197
-	 * @param array $widget_args The widget arguments when used.
198
-	 * @param string $content The shortcode content argument
199
-	 *
200
-	 * @return string
201
-	 */
202
-	public function output( $args = array(), $widget_args = array(), $content = '' ) {
203
-
204
-		// options
205
-		$defaults = array(
206
-			'type'      => 'image', // image, place
207
-			'location' => 'Ireland',
208
-			'static_width' => '600',
209
-			'static_height' => '400',
210
-			'width'=> '100%',
211
-			'height'=> '425px',
212
-			'maptype'     => 'roadmap',
213
-			'zoom'     => '7',
214
-			'api_key'     => 'AIzaSyBK3ZcmK0ljxl5agNyJNQh_G24Thq1btuE',
215
-		);
216
-
217
-		/**
218
-		 * Parse incoming $args into an array and merge it with $defaults
219
-		 */
220
-		$args = wp_parse_args($args, $defaults );
221
-
222
-		$output = '';
223
-
224
-
225
-		// check if we have a global API key
226
-		$args['api_key'] = get_option( 'rgmk_google_map_api_key', false ) ? get_option( 'rgmk_google_map_api_key' ) : $args['api_key'];
227
-
228
-		if($args['type']=='image'){
229
-			$output .= "<img src='https://maps.googleapis.com/maps/api/staticmap?center=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&size=".esc_attr($args['static_width'])."x".esc_attr($args['static_height'])."&key=".esc_attr($args['api_key'])."' />";
230
-		}else{
231
-			$output .= "<iframe width='".esc_attr($args['width'])."' height='".esc_attr($args['height'])."' frameborder='0' allowfullscreen style='border:0;' src='https://www.google.com/maps/embed/v1/".esc_attr($args['type'])."?q=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&key=".esc_attr($args['api_key'])."' ></iframe> ";
232
-		}
233
-
234
-		return $output;
235
-
236
-	}
161
+                    ),
162
+                    'desc_tip' => true,
163
+                    'default'  => 'roadmap',
164
+                    'advanced' => true
165
+                ),
166
+                'zoom'             => array(
167
+                    'type'        => 'select',
168
+                    'title'       => __( 'Zoom level:', 'ayecode-connect' ),
169
+                    'desc'        => __( 'This is the zoom level of the map, `auto` is recommended.', 'ayecode-connect' ),
170
+                    'options'     => range( 1, 19 ),
171
+                    'placeholder' => '',
172
+                    'desc_tip'    => true,
173
+                    'default'     => '7',
174
+                    'advanced'    => true
175
+                ),
176
+                'api_key'           => array(
177
+                    'type'        => 'text',
178
+                    'title'       => __( 'Api Key:', 'ayecode-connect' ),
179
+                    'desc'        => __( 'This is the height of the map, you can use %, px or vh here.', 'ayecode-connect' ),
180
+                    'placeholder' => '',
181
+                    'desc_tip'    => true,
182
+                    'default'     => '',
183
+                    'element_require' => get_option( 'rgmk_google_map_api_key', false) ? '1==0' : '1==1',
184
+                    'advanced'    => false
185
+                ),
186
+            )
187
+        );
188
+
189
+        parent::__construct( $options );
190
+    }
191
+
192
+
193
+    /**
194
+     * This is the output function for the widget, shortcode and block (front end).
195
+     *
196
+     * @param array $args The arguments values.
197
+     * @param array $widget_args The widget arguments when used.
198
+     * @param string $content The shortcode content argument
199
+     *
200
+     * @return string
201
+     */
202
+    public function output( $args = array(), $widget_args = array(), $content = '' ) {
203
+
204
+        // options
205
+        $defaults = array(
206
+            'type'      => 'image', // image, place
207
+            'location' => 'Ireland',
208
+            'static_width' => '600',
209
+            'static_height' => '400',
210
+            'width'=> '100%',
211
+            'height'=> '425px',
212
+            'maptype'     => 'roadmap',
213
+            'zoom'     => '7',
214
+            'api_key'     => 'AIzaSyBK3ZcmK0ljxl5agNyJNQh_G24Thq1btuE',
215
+        );
216
+
217
+        /**
218
+         * Parse incoming $args into an array and merge it with $defaults
219
+         */
220
+        $args = wp_parse_args($args, $defaults );
221
+
222
+        $output = '';
223
+
224
+
225
+        // check if we have a global API key
226
+        $args['api_key'] = get_option( 'rgmk_google_map_api_key', false ) ? get_option( 'rgmk_google_map_api_key' ) : $args['api_key'];
227
+
228
+        if($args['type']=='image'){
229
+            $output .= "<img src='https://maps.googleapis.com/maps/api/staticmap?center=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&size=".esc_attr($args['static_width'])."x".esc_attr($args['static_height'])."&key=".esc_attr($args['api_key'])."' />";
230
+        }else{
231
+            $output .= "<iframe width='".esc_attr($args['width'])."' height='".esc_attr($args['height'])."' frameborder='0' allowfullscreen style='border:0;' src='https://www.google.com/maps/embed/v1/".esc_attr($args['type'])."?q=".esc_attr($args['location'])."&maptype=".esc_attr($args['maptype'])."&zoom=".esc_attr($args['zoom'])."&key=".esc_attr($args['api_key'])."' ></iframe> ";
232
+        }
233
+
234
+        return $output;
235
+
236
+    }
237 237
 
238 238
 }
239 239
 
240 240
 // register it.
241 241
 add_action( 'widgets_init', function () {
242
-	register_widget( 'SD_Map' );
242
+    register_widget( 'SD_Map' );
243 243
 } );
Please login to merge, or discard this patch.