Passed
Push — master ( 9fabf9...229147 )
by Stiofan
14:51
created
vendor/ayecode/wp-super-duper/sd-functions.php 2 patches
Indentation   +2656 added lines, -2656 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,18 +1584,18 @@  discard block
 block discarded – undo
1584 1584
  */
1585 1585
 function sd_get_custom_name_input( $type = 'metadata_name', $overwrite = array() ) {
1586 1586
 
1587
-	$defaults = array(
1588
-		'type'     => 'text',
1589
-		'title'    => __( 'Block Name', 'ayecode-connect' ),
1590
-		'desc'     => __( 'Set a custom name for this block', 'ayecode-connect' ),
1591
-		'default'  => '',
1592
-		'desc_tip' => true,
1593
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1594
-	);
1587
+    $defaults = array(
1588
+        'type'     => 'text',
1589
+        'title'    => __( 'Block Name', 'ayecode-connect' ),
1590
+        'desc'     => __( 'Set a custom name for this block', 'ayecode-connect' ),
1591
+        'default'  => '',
1592
+        'desc_tip' => true,
1593
+        'group'    => __( 'Advanced', 'ayecode-connect' ),
1594
+    );
1595 1595
 
1596
-	$input = wp_parse_args( $overwrite, $defaults );
1596
+    $input = wp_parse_args( $overwrite, $defaults );
1597 1597
 
1598
-	return $input;
1598
+    return $input;
1599 1599
 }
1600 1600
 
1601 1601
 /**
@@ -1608,341 +1608,341 @@  discard block
 block discarded – undo
1608 1608
  */
1609 1609
 function sd_get_hover_animations_input( $type = 'hover_animations', $overwrite = array() ) {
1610 1610
 
1611
-	$options = array(
1612
-		''                 => __( 'none', 'ayecode-connect' ),
1613
-		'hover-zoom'       => __( 'Zoom', 'ayecode-connect' ),
1614
-		'hover-shadow'     => __( 'Shadow', 'ayecode-connect' ),
1615
-		'hover-move-up'    => __( 'Move up', 'ayecode-connect' ),
1616
-		'hover-move-down'  => __( 'Move down', 'ayecode-connect' ),
1617
-		'hover-move-left'  => __( 'Move left', 'ayecode-connect' ),
1618
-		'hover-move-right' => __( 'Move right', 'ayecode-connect' ),
1619
-	);
1611
+    $options = array(
1612
+        ''                 => __( 'none', 'ayecode-connect' ),
1613
+        'hover-zoom'       => __( 'Zoom', 'ayecode-connect' ),
1614
+        'hover-shadow'     => __( 'Shadow', 'ayecode-connect' ),
1615
+        'hover-move-up'    => __( 'Move up', 'ayecode-connect' ),
1616
+        'hover-move-down'  => __( 'Move down', 'ayecode-connect' ),
1617
+        'hover-move-left'  => __( 'Move left', 'ayecode-connect' ),
1618
+        'hover-move-right' => __( 'Move right', 'ayecode-connect' ),
1619
+    );
1620 1620
 
1621
-	$defaults = array(
1622
-		'type'     => 'select',
1623
-		'multiple' => true,
1624
-		'title'    => __( 'Hover Animations', 'ayecode-connect' ),
1625
-		'options'  => $options,
1626
-		'default'  => '',
1627
-		'desc_tip' => true,
1628
-		'group'    => __( 'Hover Animations', 'ayecode-connect' ),
1629
-	);
1621
+    $defaults = array(
1622
+        'type'     => 'select',
1623
+        'multiple' => true,
1624
+        'title'    => __( 'Hover Animations', 'ayecode-connect' ),
1625
+        'options'  => $options,
1626
+        'default'  => '',
1627
+        'desc_tip' => true,
1628
+        'group'    => __( 'Hover Animations', 'ayecode-connect' ),
1629
+    );
1630 1630
 
1631
-	$input = wp_parse_args( $overwrite, $defaults );
1631
+    $input = wp_parse_args( $overwrite, $defaults );
1632 1632
 
1633
-	return $input;
1633
+    return $input;
1634 1634
 }
1635 1635
 
1636 1636
 
1637 1637
 function sd_get_flex_align_items_input( $type = 'align-items', $overwrite = array() ) {
1638
-	$device_size = '';
1639
-	if ( ! empty( $overwrite['device_type'] ) ) {
1640
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1641
-			$device_size = '-md';
1642
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1643
-			$device_size = '-lg';
1644
-		}
1645
-	}
1646
-	$options = array(
1647
-		''                                         => __( 'Default', 'ayecode-connect' ),
1648
-		'align-items' . $device_size . '-start'    => 'align-items-start',
1649
-		'align-items' . $device_size . '-end'      => 'align-items-end',
1650
-		'align-items' . $device_size . '-center'   => 'align-items-center',
1651
-		'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1652
-		'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1653
-	);
1654
-
1655
-	$defaults = array(
1656
-		'type'            => 'select',
1657
-		'title'           => __( 'Vertical Align Items', 'ayecode-connect' ),
1658
-		'options'         => $options,
1659
-		'default'         => '',
1660
-		'desc_tip'        => true,
1661
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1662
-		'element_require' => ' ( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1663
-
1664
-	);
1665
-
1666
-	$input = wp_parse_args( $overwrite, $defaults );
1667
-
1668
-	return $input;
1638
+    $device_size = '';
1639
+    if ( ! empty( $overwrite['device_type'] ) ) {
1640
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1641
+            $device_size = '-md';
1642
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1643
+            $device_size = '-lg';
1644
+        }
1645
+    }
1646
+    $options = array(
1647
+        ''                                         => __( 'Default', 'ayecode-connect' ),
1648
+        'align-items' . $device_size . '-start'    => 'align-items-start',
1649
+        'align-items' . $device_size . '-end'      => 'align-items-end',
1650
+        'align-items' . $device_size . '-center'   => 'align-items-center',
1651
+        'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1652
+        'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1653
+    );
1654
+
1655
+    $defaults = array(
1656
+        'type'            => 'select',
1657
+        'title'           => __( 'Vertical Align Items', 'ayecode-connect' ),
1658
+        'options'         => $options,
1659
+        'default'         => '',
1660
+        'desc_tip'        => true,
1661
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1662
+        'element_require' => ' ( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1663
+
1664
+    );
1665
+
1666
+    $input = wp_parse_args( $overwrite, $defaults );
1667
+
1668
+    return $input;
1669 1669
 }
1670 1670
 
1671 1671
 function sd_get_flex_align_items_input_group( $type = 'flex_align_items', $overwrite = array() ) {
1672
-	$inputs = array();
1673
-	$sizes  = array(
1674
-		''    => 'Mobile',
1675
-		'_md' => 'Tablet',
1676
-		'_lg' => 'Desktop',
1677
-	);
1672
+    $inputs = array();
1673
+    $sizes  = array(
1674
+        ''    => 'Mobile',
1675
+        '_md' => 'Tablet',
1676
+        '_lg' => 'Desktop',
1677
+    );
1678 1678
 
1679
-	if ( $overwrite !== false ) {
1679
+    if ( $overwrite !== false ) {
1680 1680
 
1681
-		foreach ( $sizes as $ds => $dt ) {
1682
-			$overwrite['device_type'] = $dt;
1683
-			$inputs[ $type . $ds ]    = sd_get_flex_align_items_input( $type, $overwrite );
1684
-		}
1685
-	}
1681
+        foreach ( $sizes as $ds => $dt ) {
1682
+            $overwrite['device_type'] = $dt;
1683
+            $inputs[ $type . $ds ]    = sd_get_flex_align_items_input( $type, $overwrite );
1684
+        }
1685
+    }
1686 1686
 
1687
-	return $inputs;
1687
+    return $inputs;
1688 1688
 }
1689 1689
 
1690 1690
 function sd_get_flex_justify_content_input( $type = 'flex_justify_content', $overwrite = array() ) {
1691
-	$device_size = '';
1692
-	if ( ! empty( $overwrite['device_type'] ) ) {
1693
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1694
-			$device_size = '-md';
1695
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1696
-			$device_size = '-lg';
1697
-		}
1698
-	}
1699
-	$options = array(
1700
-		''                                            => __( 'Default', 'ayecode-connect' ),
1701
-		'justify-content' . $device_size . '-start'   => 'justify-content-start',
1702
-		'justify-content' . $device_size . '-end'     => 'justify-content-end',
1703
-		'justify-content' . $device_size . '-center'  => 'justify-content-center',
1704
-		'justify-content' . $device_size . '-between' => 'justify-content-between',
1705
-		'justify-content' . $device_size . '-stretch' => 'justify-content-around',
1706
-	);
1707
-
1708
-	$defaults = array(
1709
-		'type'            => 'select',
1710
-		'title'           => __( 'Justify content', 'ayecode-connect' ),
1711
-		'options'         => $options,
1712
-		'default'         => '',
1713
-		'desc_tip'        => true,
1714
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1715
-		'element_require' => '( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1716
-
1717
-	);
1718
-
1719
-	$input = wp_parse_args( $overwrite, $defaults );
1720
-
1721
-	return $input;
1691
+    $device_size = '';
1692
+    if ( ! empty( $overwrite['device_type'] ) ) {
1693
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1694
+            $device_size = '-md';
1695
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1696
+            $device_size = '-lg';
1697
+        }
1698
+    }
1699
+    $options = array(
1700
+        ''                                            => __( 'Default', 'ayecode-connect' ),
1701
+        'justify-content' . $device_size . '-start'   => 'justify-content-start',
1702
+        'justify-content' . $device_size . '-end'     => 'justify-content-end',
1703
+        'justify-content' . $device_size . '-center'  => 'justify-content-center',
1704
+        'justify-content' . $device_size . '-between' => 'justify-content-between',
1705
+        'justify-content' . $device_size . '-stretch' => 'justify-content-around',
1706
+    );
1707
+
1708
+    $defaults = array(
1709
+        'type'            => 'select',
1710
+        'title'           => __( 'Justify content', 'ayecode-connect' ),
1711
+        'options'         => $options,
1712
+        'default'         => '',
1713
+        'desc_tip'        => true,
1714
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1715
+        'element_require' => '( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1716
+
1717
+    );
1718
+
1719
+    $input = wp_parse_args( $overwrite, $defaults );
1720
+
1721
+    return $input;
1722 1722
 }
1723 1723
 
1724 1724
 function sd_get_flex_justify_content_input_group( $type = 'flex_justify_content', $overwrite = array() ) {
1725
-	$inputs = array();
1726
-	$sizes  = array(
1727
-		''    => 'Mobile',
1728
-		'_md' => 'Tablet',
1729
-		'_lg' => 'Desktop',
1730
-	);
1725
+    $inputs = array();
1726
+    $sizes  = array(
1727
+        ''    => 'Mobile',
1728
+        '_md' => 'Tablet',
1729
+        '_lg' => 'Desktop',
1730
+    );
1731 1731
 
1732
-	if ( $overwrite !== false ) {
1732
+    if ( $overwrite !== false ) {
1733 1733
 
1734
-		foreach ( $sizes as $ds => $dt ) {
1735
-			$overwrite['device_type'] = $dt;
1736
-			$inputs[ $type . $ds ]    = sd_get_flex_justify_content_input( $type, $overwrite );
1737
-		}
1738
-	}
1734
+        foreach ( $sizes as $ds => $dt ) {
1735
+            $overwrite['device_type'] = $dt;
1736
+            $inputs[ $type . $ds ]    = sd_get_flex_justify_content_input( $type, $overwrite );
1737
+        }
1738
+    }
1739 1739
 
1740
-	return $inputs;
1740
+    return $inputs;
1741 1741
 }
1742 1742
 
1743 1743
 
1744 1744
 function sd_get_flex_align_self_input( $type = 'flex_align_self', $overwrite = array() ) {
1745
-	$device_size = '';
1746
-	if ( ! empty( $overwrite['device_type'] ) ) {
1747
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1748
-			$device_size = '-md';
1749
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1750
-			$device_size = '-lg';
1751
-		}
1752
-	}
1753
-	$options = array(
1754
-		''                                         => __( 'Default', 'ayecode-connect' ),
1755
-		'align-items' . $device_size . '-start'    => 'align-items-start',
1756
-		'align-items' . $device_size . '-end'      => 'align-items-end',
1757
-		'align-items' . $device_size . '-center'   => 'align-items-center',
1758
-		'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1759
-		'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1760
-	);
1761
-
1762
-	$defaults = array(
1763
-		'type'            => 'select',
1764
-		'title'           => __( 'Align Self', 'ayecode-connect' ),
1765
-		'options'         => $options,
1766
-		'default'         => '',
1767
-		'desc_tip'        => true,
1768
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1769
-		'element_require' => ' [%container%]=="col" ',
1770
-
1771
-	);
1772
-
1773
-	$input = wp_parse_args( $overwrite, $defaults );
1774
-
1775
-	return $input;
1745
+    $device_size = '';
1746
+    if ( ! empty( $overwrite['device_type'] ) ) {
1747
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1748
+            $device_size = '-md';
1749
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1750
+            $device_size = '-lg';
1751
+        }
1752
+    }
1753
+    $options = array(
1754
+        ''                                         => __( 'Default', 'ayecode-connect' ),
1755
+        'align-items' . $device_size . '-start'    => 'align-items-start',
1756
+        'align-items' . $device_size . '-end'      => 'align-items-end',
1757
+        'align-items' . $device_size . '-center'   => 'align-items-center',
1758
+        'align-items' . $device_size . '-baseline' => 'align-items-baseline',
1759
+        'align-items' . $device_size . '-stretch'  => 'align-items-stretch',
1760
+    );
1761
+
1762
+    $defaults = array(
1763
+        'type'            => 'select',
1764
+        'title'           => __( 'Align Self', 'ayecode-connect' ),
1765
+        'options'         => $options,
1766
+        'default'         => '',
1767
+        'desc_tip'        => true,
1768
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1769
+        'element_require' => ' [%container%]=="col" ',
1770
+
1771
+    );
1772
+
1773
+    $input = wp_parse_args( $overwrite, $defaults );
1774
+
1775
+    return $input;
1776 1776
 }
1777 1777
 
1778 1778
 function sd_get_flex_align_self_input_group( $type = 'flex_align_self', $overwrite = array() ) {
1779
-	$inputs = array();
1780
-	$sizes  = array(
1781
-		''    => 'Mobile',
1782
-		'_md' => 'Tablet',
1783
-		'_lg' => 'Desktop',
1784
-	);
1779
+    $inputs = array();
1780
+    $sizes  = array(
1781
+        ''    => 'Mobile',
1782
+        '_md' => 'Tablet',
1783
+        '_lg' => 'Desktop',
1784
+    );
1785 1785
 
1786
-	if ( $overwrite !== false ) {
1786
+    if ( $overwrite !== false ) {
1787 1787
 
1788
-		foreach ( $sizes as $ds => $dt ) {
1789
-			$overwrite['device_type'] = $dt;
1790
-			$inputs[ $type . $ds ]    = sd_get_flex_align_self_input( $type, $overwrite );
1791
-		}
1792
-	}
1788
+        foreach ( $sizes as $ds => $dt ) {
1789
+            $overwrite['device_type'] = $dt;
1790
+            $inputs[ $type . $ds ]    = sd_get_flex_align_self_input( $type, $overwrite );
1791
+        }
1792
+    }
1793 1793
 
1794
-	return $inputs;
1794
+    return $inputs;
1795 1795
 }
1796 1796
 
1797 1797
 function sd_get_flex_order_input( $type = 'flex_order', $overwrite = array() ) {
1798
-	$device_size = '';
1799
-	if ( ! empty( $overwrite['device_type'] ) ) {
1800
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1801
-			$device_size = '-md';
1802
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1803
-			$device_size = '-lg';
1804
-		}
1805
-	}
1806
-	$options = array(
1807
-		'' => __( 'Default', 'ayecode-connect' ),
1808
-	);
1809
-
1810
-	$i = 0;
1811
-	while ( $i <= 5 ) {
1812
-		$options[ 'order' . $device_size . '-' . $i ] = $i;
1813
-		$i++;
1814
-	}
1815
-
1816
-	$defaults = array(
1817
-		'type'            => 'select',
1818
-		'title'           => __( 'Flex Order', 'ayecode-connect' ),
1819
-		'options'         => $options,
1820
-		'default'         => '',
1821
-		'desc_tip'        => true,
1822
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1823
-		'element_require' => ' [%container%]=="col" ',
1824
-
1825
-	);
1826
-
1827
-	$input = wp_parse_args( $overwrite, $defaults );
1828
-
1829
-	return $input;
1798
+    $device_size = '';
1799
+    if ( ! empty( $overwrite['device_type'] ) ) {
1800
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1801
+            $device_size = '-md';
1802
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1803
+            $device_size = '-lg';
1804
+        }
1805
+    }
1806
+    $options = array(
1807
+        '' => __( 'Default', 'ayecode-connect' ),
1808
+    );
1809
+
1810
+    $i = 0;
1811
+    while ( $i <= 5 ) {
1812
+        $options[ 'order' . $device_size . '-' . $i ] = $i;
1813
+        $i++;
1814
+    }
1815
+
1816
+    $defaults = array(
1817
+        'type'            => 'select',
1818
+        'title'           => __( 'Flex Order', 'ayecode-connect' ),
1819
+        'options'         => $options,
1820
+        'default'         => '',
1821
+        'desc_tip'        => true,
1822
+        'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1823
+        'element_require' => ' [%container%]=="col" ',
1824
+
1825
+    );
1826
+
1827
+    $input = wp_parse_args( $overwrite, $defaults );
1828
+
1829
+    return $input;
1830 1830
 }
1831 1831
 
1832 1832
 function sd_get_flex_order_input_group( $type = 'flex_order', $overwrite = array() ) {
1833
-	$inputs = array();
1834
-	$sizes  = array(
1835
-		''    => 'Mobile',
1836
-		'_md' => 'Tablet',
1837
-		'_lg' => 'Desktop',
1838
-	);
1833
+    $inputs = array();
1834
+    $sizes  = array(
1835
+        ''    => 'Mobile',
1836
+        '_md' => 'Tablet',
1837
+        '_lg' => 'Desktop',
1838
+    );
1839 1839
 
1840
-	if ( $overwrite !== false ) {
1840
+    if ( $overwrite !== false ) {
1841 1841
 
1842
-		foreach ( $sizes as $ds => $dt ) {
1843
-			$overwrite['device_type'] = $dt;
1844
-			$inputs[ $type . $ds ]    = sd_get_flex_order_input( $type, $overwrite );
1845
-		}
1846
-	}
1842
+        foreach ( $sizes as $ds => $dt ) {
1843
+            $overwrite['device_type'] = $dt;
1844
+            $inputs[ $type . $ds ]    = sd_get_flex_order_input( $type, $overwrite );
1845
+        }
1846
+    }
1847 1847
 
1848
-	return $inputs;
1848
+    return $inputs;
1849 1849
 }
1850 1850
 
1851 1851
 function sd_get_flex_wrap_group( $type = 'flex_wrap', $overwrite = array() ) {
1852
-	$inputs = array();
1853
-	$sizes  = array(
1854
-		''    => 'Mobile',
1855
-		'_md' => 'Tablet',
1856
-		'_lg' => 'Desktop',
1857
-	);
1852
+    $inputs = array();
1853
+    $sizes  = array(
1854
+        ''    => 'Mobile',
1855
+        '_md' => 'Tablet',
1856
+        '_lg' => 'Desktop',
1857
+    );
1858 1858
 
1859
-	if ( $overwrite !== false ) {
1859
+    if ( $overwrite !== false ) {
1860 1860
 
1861
-		foreach ( $sizes as $ds => $dt ) {
1862
-			$overwrite['device_type'] = $dt;
1863
-			$inputs[ $type . $ds ]    = sd_get_flex_wrap_input( $type, $overwrite );
1864
-		}
1865
-	}
1861
+        foreach ( $sizes as $ds => $dt ) {
1862
+            $overwrite['device_type'] = $dt;
1863
+            $inputs[ $type . $ds ]    = sd_get_flex_wrap_input( $type, $overwrite );
1864
+        }
1865
+    }
1866 1866
 
1867
-	return $inputs;
1867
+    return $inputs;
1868 1868
 }
1869 1869
 
1870 1870
 function sd_get_flex_wrap_input( $type = 'flex_wrap', $overwrite = array() ) {
1871
-	$device_size = '';
1872
-	if ( ! empty( $overwrite['device_type'] ) ) {
1873
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1874
-			$device_size = '-md';
1875
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1876
-			$device_size = '-lg';
1877
-		}
1878
-	}
1879
-	$options = array(
1880
-		''                                      => __( 'Default', 'ayecode-connect' ),
1881
-		'flex' . $device_size . '-nowrap'       => 'nowrap',
1882
-		'flex' . $device_size . '-wrap'         => 'wrap',
1883
-		'flex' . $device_size . '-wrap-reverse' => 'wrap-reverse',
1884
-	);
1885
-
1886
-	$defaults = array(
1887
-		'type'     => 'select',
1888
-		'title'    => __( 'Flex wrap', 'ayecode-connect' ),
1889
-		'options'  => $options,
1890
-		'default'  => '',
1891
-		'desc_tip' => true,
1892
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1893
-	);
1894
-
1895
-	$input = wp_parse_args( $overwrite, $defaults );
1896
-
1897
-	return $input;
1871
+    $device_size = '';
1872
+    if ( ! empty( $overwrite['device_type'] ) ) {
1873
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1874
+            $device_size = '-md';
1875
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1876
+            $device_size = '-lg';
1877
+        }
1878
+    }
1879
+    $options = array(
1880
+        ''                                      => __( 'Default', 'ayecode-connect' ),
1881
+        'flex' . $device_size . '-nowrap'       => 'nowrap',
1882
+        'flex' . $device_size . '-wrap'         => 'wrap',
1883
+        'flex' . $device_size . '-wrap-reverse' => 'wrap-reverse',
1884
+    );
1885
+
1886
+    $defaults = array(
1887
+        'type'     => 'select',
1888
+        'title'    => __( 'Flex wrap', 'ayecode-connect' ),
1889
+        'options'  => $options,
1890
+        'default'  => '',
1891
+        'desc_tip' => true,
1892
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1893
+    );
1894
+
1895
+    $input = wp_parse_args( $overwrite, $defaults );
1896
+
1897
+    return $input;
1898 1898
 }
1899 1899
 
1900 1900
 function sd_get_float_group( $type = 'float', $overwrite = array() ) {
1901
-	$inputs = array();
1902
-	$sizes  = array(
1903
-		''    => 'Mobile',
1904
-		'_md' => 'Tablet',
1905
-		'_lg' => 'Desktop',
1906
-	);
1901
+    $inputs = array();
1902
+    $sizes  = array(
1903
+        ''    => 'Mobile',
1904
+        '_md' => 'Tablet',
1905
+        '_lg' => 'Desktop',
1906
+    );
1907 1907
 
1908
-	if ( $overwrite !== false ) {
1908
+    if ( $overwrite !== false ) {
1909 1909
 
1910
-		foreach ( $sizes as $ds => $dt ) {
1911
-			$overwrite['device_type'] = $dt;
1912
-			$inputs[ $type . $ds ]    = sd_get_float_input( $type, $overwrite );
1913
-		}
1914
-	}
1910
+        foreach ( $sizes as $ds => $dt ) {
1911
+            $overwrite['device_type'] = $dt;
1912
+            $inputs[ $type . $ds ]    = sd_get_float_input( $type, $overwrite );
1913
+        }
1914
+    }
1915 1915
 
1916
-	return $inputs;
1916
+    return $inputs;
1917 1917
 }
1918 1918
 function sd_get_float_input( $type = 'float', $overwrite = array() ) {
1919
-	$device_size = '';
1920
-	if ( ! empty( $overwrite['device_type'] ) ) {
1921
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1922
-			$device_size = '-md';
1923
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1924
-			$device_size = '-lg';
1925
-		}
1926
-	}
1927
-	$options = array(
1928
-		''                                      => __( 'Default', 'ayecode-connect' ),
1929
-		'float' . $device_size . '-start'       => 'left',
1930
-		'float' . $device_size . '-end'         => 'right',
1931
-		'float' . $device_size . '-none' => 'none',
1932
-	);
1933
-
1934
-	$defaults = array(
1935
-		'type'     => 'select',
1936
-		'title'    => __( 'Float', 'ayecode-connect' ),
1937
-		'options'  => $options,
1938
-		'default'  => '',
1939
-		'desc_tip' => true,
1940
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1941
-	);
1942
-
1943
-	$input = wp_parse_args( $overwrite, $defaults );
1944
-
1945
-	return $input;
1919
+    $device_size = '';
1920
+    if ( ! empty( $overwrite['device_type'] ) ) {
1921
+        if ( $overwrite['device_type'] == 'Tablet' ) {
1922
+            $device_size = '-md';
1923
+        } elseif ( $overwrite['device_type'] == 'Desktop' ) {
1924
+            $device_size = '-lg';
1925
+        }
1926
+    }
1927
+    $options = array(
1928
+        ''                                      => __( 'Default', 'ayecode-connect' ),
1929
+        'float' . $device_size . '-start'       => 'left',
1930
+        'float' . $device_size . '-end'         => 'right',
1931
+        'float' . $device_size . '-none' => 'none',
1932
+    );
1933
+
1934
+    $defaults = array(
1935
+        'type'     => 'select',
1936
+        'title'    => __( 'Float', 'ayecode-connect' ),
1937
+        'options'  => $options,
1938
+        'default'  => '',
1939
+        'desc_tip' => true,
1940
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1941
+    );
1942
+
1943
+    $input = wp_parse_args( $overwrite, $defaults );
1944
+
1945
+    return $input;
1946 1946
 }
1947 1947
 
1948 1948
 /**
@@ -1953,26 +1953,26 @@  discard block
 block discarded – undo
1953 1953
  */
1954 1954
 function sd_get_zindex_input( $type = 'zindex', $overwrite = array() ) {
1955 1955
 
1956
-	$options = array(
1957
-		''          => __( 'Default', 'ayecode-connect' ),
1958
-		'zindex-0'  => '0',
1959
-		'zindex-1'  => '1',
1960
-		'zindex-5'  => '5',
1961
-		'zindex-10' => '10',
1962
-	);
1956
+    $options = array(
1957
+        ''          => __( 'Default', 'ayecode-connect' ),
1958
+        'zindex-0'  => '0',
1959
+        'zindex-1'  => '1',
1960
+        'zindex-5'  => '5',
1961
+        'zindex-10' => '10',
1962
+    );
1963 1963
 
1964
-	$defaults = array(
1965
-		'type'     => 'select',
1966
-		'title'    => __( 'Z-index', 'ayecode-connect' ),
1967
-		'options'  => $options,
1968
-		'default'  => '',
1969
-		'desc_tip' => true,
1970
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1971
-	);
1964
+    $defaults = array(
1965
+        'type'     => 'select',
1966
+        'title'    => __( 'Z-index', 'ayecode-connect' ),
1967
+        'options'  => $options,
1968
+        'default'  => '',
1969
+        'desc_tip' => true,
1970
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1971
+    );
1972 1972
 
1973
-	$input = wp_parse_args( $overwrite, $defaults );
1973
+    $input = wp_parse_args( $overwrite, $defaults );
1974 1974
 
1975
-	return $input;
1975
+    return $input;
1976 1976
 }
1977 1977
 
1978 1978
 /**
@@ -1983,26 +1983,26 @@  discard block
 block discarded – undo
1983 1983
  */
1984 1984
 function sd_get_overflow_input( $type = 'overflow', $overwrite = array() ) {
1985 1985
 
1986
-	$options = array(
1987
-		''                 => __( 'Default', 'ayecode-connect' ),
1988
-		'overflow-auto'    => __( 'Auto', 'ayecode-connect' ),
1989
-		'overflow-hidden'  => __( 'Hidden', 'ayecode-connect' ),
1990
-		'overflow-visible' => __( 'Visible', 'ayecode-connect' ),
1991
-		'overflow-scroll'  => __( 'Scroll', 'ayecode-connect' ),
1992
-	);
1986
+    $options = array(
1987
+        ''                 => __( 'Default', 'ayecode-connect' ),
1988
+        'overflow-auto'    => __( 'Auto', 'ayecode-connect' ),
1989
+        'overflow-hidden'  => __( 'Hidden', 'ayecode-connect' ),
1990
+        'overflow-visible' => __( 'Visible', 'ayecode-connect' ),
1991
+        'overflow-scroll'  => __( 'Scroll', 'ayecode-connect' ),
1992
+    );
1993 1993
 
1994
-	$defaults = array(
1995
-		'type'     => 'select',
1996
-		'title'    => __( 'Overflow', 'ayecode-connect' ),
1997
-		'options'  => $options,
1998
-		'default'  => '',
1999
-		'desc_tip' => true,
2000
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2001
-	);
1994
+    $defaults = array(
1995
+        'type'     => 'select',
1996
+        'title'    => __( 'Overflow', 'ayecode-connect' ),
1997
+        'options'  => $options,
1998
+        'default'  => '',
1999
+        'desc_tip' => true,
2000
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2001
+    );
2002 2002
 
2003
-	$input = wp_parse_args( $overwrite, $defaults );
2003
+    $input = wp_parse_args( $overwrite, $defaults );
2004 2004
 
2005
-	return $input;
2005
+    return $input;
2006 2006
 }
2007 2007
 
2008 2008
 /**
@@ -2013,19 +2013,19 @@  discard block
 block discarded – undo
2013 2013
  */
2014 2014
 function sd_get_max_height_input( $type = 'max_height', $overwrite = array() ) {
2015 2015
 
2016
-	$defaults = array(
2017
-		'type'        => 'text',
2018
-		'title'       => __( 'Max height', 'ayecode-connect' ),
2019
-		'value'       => '',
2020
-		'default'     => '',
2021
-		'placeholder' => '',
2022
-		'desc_tip'    => true,
2023
-		'group'       => __( 'Wrapper Styles', 'ayecode-connect' ),
2024
-	);
2016
+    $defaults = array(
2017
+        'type'        => 'text',
2018
+        'title'       => __( 'Max height', 'ayecode-connect' ),
2019
+        'value'       => '',
2020
+        'default'     => '',
2021
+        'placeholder' => '',
2022
+        'desc_tip'    => true,
2023
+        'group'       => __( 'Wrapper Styles', 'ayecode-connect' ),
2024
+    );
2025 2025
 
2026
-	$input = wp_parse_args( $overwrite, $defaults );
2026
+    $input = wp_parse_args( $overwrite, $defaults );
2027 2027
 
2028
-	return $input;
2028
+    return $input;
2029 2029
 }
2030 2030
 
2031 2031
 /**
@@ -2036,23 +2036,23 @@  discard block
 block discarded – undo
2036 2036
  */
2037 2037
 function sd_get_scrollbars_input( $type = 'scrollbars', $overwrite = array() ) {
2038 2038
 
2039
-	$options = array(
2040
-		''               => __( 'Default', 'ayecode-connect' ),
2041
-		'scrollbars-ios' => __( 'IOS Style', 'ayecode-connect' ),
2042
-	);
2039
+    $options = array(
2040
+        ''               => __( 'Default', 'ayecode-connect' ),
2041
+        'scrollbars-ios' => __( 'IOS Style', 'ayecode-connect' ),
2042
+    );
2043 2043
 
2044
-	$defaults = array(
2045
-		'type'     => 'select',
2046
-		'title'    => __( 'Scrollbars', 'ayecode-connect' ),
2047
-		'options'  => $options,
2048
-		'default'  => '',
2049
-		'desc_tip' => true,
2050
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2051
-	);
2044
+    $defaults = array(
2045
+        'type'     => 'select',
2046
+        'title'    => __( 'Scrollbars', 'ayecode-connect' ),
2047
+        'options'  => $options,
2048
+        'default'  => '',
2049
+        'desc_tip' => true,
2050
+        'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2051
+    );
2052 2052
 
2053
-	$input = wp_parse_args( $overwrite, $defaults );
2053
+    $input = wp_parse_args( $overwrite, $defaults );
2054 2054
 
2055
-	return $input;
2055
+    return $input;
2056 2056
 }
2057 2057
 
2058 2058
 /**
@@ -2063,17 +2063,17 @@  discard block
 block discarded – undo
2063 2063
  */
2064 2064
 function sd_get_new_window_input( $type = 'target', $overwrite = array() ) {
2065 2065
 
2066
-	$defaults = array(
2067
-		'type'     => 'checkbox',
2068
-		'title'    => __( 'Open in new window', 'ayecode-connect' ),
2069
-		'default'  => '',
2070
-		'desc_tip' => true,
2071
-		'group'    => __( 'Link', 'ayecode-connect' ),
2072
-	);
2066
+    $defaults = array(
2067
+        'type'     => 'checkbox',
2068
+        'title'    => __( 'Open in new window', 'ayecode-connect' ),
2069
+        'default'  => '',
2070
+        'desc_tip' => true,
2071
+        'group'    => __( 'Link', 'ayecode-connect' ),
2072
+    );
2073 2073
 
2074
-	$input = wp_parse_args( $overwrite, $defaults );
2074
+    $input = wp_parse_args( $overwrite, $defaults );
2075 2075
 
2076
-	return $input;
2076
+    return $input;
2077 2077
 }
2078 2078
 
2079 2079
 /**
@@ -2084,17 +2084,17 @@  discard block
 block discarded – undo
2084 2084
  */
2085 2085
 function sd_get_nofollow_input( $type = 'nofollow', $overwrite = array() ) {
2086 2086
 
2087
-	$defaults = array(
2088
-		'type'     => 'checkbox',
2089
-		'title'    => __( 'Add nofollow', 'ayecode-connect' ),
2090
-		'default'  => '',
2091
-		'desc_tip' => true,
2092
-		'group'    => __( 'Link', 'ayecode-connect' ),
2093
-	);
2087
+    $defaults = array(
2088
+        'type'     => 'checkbox',
2089
+        'title'    => __( 'Add nofollow', 'ayecode-connect' ),
2090
+        'default'  => '',
2091
+        'desc_tip' => true,
2092
+        'group'    => __( 'Link', 'ayecode-connect' ),
2093
+    );
2094 2094
 
2095
-	$input = wp_parse_args( $overwrite, $defaults );
2095
+    $input = wp_parse_args( $overwrite, $defaults );
2096 2096
 
2097
-	return $input;
2097
+    return $input;
2098 2098
 }
2099 2099
 
2100 2100
 /**
@@ -2105,19 +2105,19 @@  discard block
 block discarded – undo
2105 2105
  */
2106 2106
 function sd_get_attributes_input( $type = 'attributes', $overwrite = array() ) {
2107 2107
 
2108
-	$defaults = array(
2109
-		'type'        => 'text',
2110
-		'title'       => __( 'Custom Attributes', 'ayecode-connect' ),
2111
-		'value'       => '',
2112
-		'default'     => '',
2113
-		'placeholder' => 'key|value,key2|value2',
2114
-		'desc_tip'    => true,
2115
-		'group'       => __( 'Link', 'ayecode-connect' ),
2116
-	);
2108
+    $defaults = array(
2109
+        'type'        => 'text',
2110
+        'title'       => __( 'Custom Attributes', 'ayecode-connect' ),
2111
+        'value'       => '',
2112
+        'default'     => '',
2113
+        'placeholder' => 'key|value,key2|value2',
2114
+        'desc_tip'    => true,
2115
+        'group'       => __( 'Link', 'ayecode-connect' ),
2116
+    );
2117 2117
 
2118
-	$input = wp_parse_args( $overwrite, $defaults );
2118
+    $input = wp_parse_args( $overwrite, $defaults );
2119 2119
 
2120
-	return $input;
2120
+    return $input;
2121 2121
 }
2122 2122
 
2123 2123
 /**
@@ -2126,32 +2126,32 @@  discard block
 block discarded – undo
2126 2126
  * @return string
2127 2127
  */
2128 2128
 function sd_build_attributes_string_escaped( $args ) {
2129
-	global $aui_bs5;
2129
+    global $aui_bs5;
2130 2130
 
2131
-	$attributes = array();
2132
-	$string_escaped = '';
2131
+    $attributes = array();
2132
+    $string_escaped = '';
2133 2133
 
2134
-	if ( ! empty( $args['custom'] ) ) {
2135
-		$attributes = sd_parse_custom_attributes($args['custom']);
2136
-	}
2134
+    if ( ! empty( $args['custom'] ) ) {
2135
+        $attributes = sd_parse_custom_attributes($args['custom']);
2136
+    }
2137 2137
 
2138
-	// new window
2139
-	if ( ! empty( $args['new_window'] ) ) {
2140
-		$attributes['target'] = '_blank';
2141
-	}
2138
+    // new window
2139
+    if ( ! empty( $args['new_window'] ) ) {
2140
+        $attributes['target'] = '_blank';
2141
+    }
2142 2142
 
2143
-	// nofollow
2144
-	if ( ! empty( $args['nofollow'] ) ) {
2145
-		$attributes['rel'] = isset($attributes['rel']) ? $attributes['rel'] . ' nofollow' : 'nofollow';
2146
-	}
2143
+    // nofollow
2144
+    if ( ! empty( $args['nofollow'] ) ) {
2145
+        $attributes['rel'] = isset($attributes['rel']) ? $attributes['rel'] . ' nofollow' : 'nofollow';
2146
+    }
2147 2147
 
2148
-	if(!empty($attributes )){
2149
-		foreach ( $attributes as $key => $val ) {
2150
-			$string_escaped .= esc_attr($key) . '="' . esc_attr($val) . '" ';
2151
-		}
2152
-	}
2148
+    if(!empty($attributes )){
2149
+        foreach ( $attributes as $key => $val ) {
2150
+            $string_escaped .= esc_attr($key) . '="' . esc_attr($val) . '" ';
2151
+        }
2152
+    }
2153 2153
 
2154
-	return $string_escaped;
2154
+    return $string_escaped;
2155 2155
 }
2156 2156
 
2157 2157
 /**
@@ -2163,38 +2163,38 @@  discard block
 block discarded – undo
2163 2163
  * @return array
2164 2164
  */
2165 2165
 function sd_parse_custom_attributes( $attributes_string, $delimiter = ',' ) {
2166
-	$attributes = explode( $delimiter, $attributes_string );
2167
-	$result = [];
2166
+    $attributes = explode( $delimiter, $attributes_string );
2167
+    $result = [];
2168 2168
 
2169
-	foreach ( $attributes as $attribute ) {
2170
-		$attr_key_value = explode( '|', $attribute );
2169
+    foreach ( $attributes as $attribute ) {
2170
+        $attr_key_value = explode( '|', $attribute );
2171 2171
 
2172
-		$attr_key = mb_strtolower( $attr_key_value[0] );
2172
+        $attr_key = mb_strtolower( $attr_key_value[0] );
2173 2173
 
2174
-		// Remove any not allowed characters.
2175
-		preg_match( '/[-_a-z0-9]+/', $attr_key, $attr_key_matches );
2174
+        // Remove any not allowed characters.
2175
+        preg_match( '/[-_a-z0-9]+/', $attr_key, $attr_key_matches );
2176 2176
 
2177
-		if ( empty( $attr_key_matches[0] ) ) {
2178
-			continue;
2179
-		}
2177
+        if ( empty( $attr_key_matches[0] ) ) {
2178
+            continue;
2179
+        }
2180 2180
 
2181
-		$attr_key = $attr_key_matches[0];
2181
+        $attr_key = $attr_key_matches[0];
2182 2182
 
2183
-		// Avoid Javascript events and unescaped href.
2184
-		if ( 'href' === $attr_key || 'on' === substr( $attr_key, 0, 2 ) ) {
2185
-			continue;
2186
-		}
2183
+        // Avoid Javascript events and unescaped href.
2184
+        if ( 'href' === $attr_key || 'on' === substr( $attr_key, 0, 2 ) ) {
2185
+            continue;
2186
+        }
2187 2187
 
2188
-		if ( isset( $attr_key_value[1] ) ) {
2189
-			$attr_value = trim( $attr_key_value[1] );
2190
-		} else {
2191
-			$attr_value = '';
2192
-		}
2188
+        if ( isset( $attr_key_value[1] ) ) {
2189
+            $attr_value = trim( $attr_key_value[1] );
2190
+        } else {
2191
+            $attr_value = '';
2192
+        }
2193 2193
 
2194
-		$result[ $attr_key ] = $attr_value;
2195
-	}
2194
+        $result[ $attr_key ] = $attr_value;
2195
+    }
2196 2196
 
2197
-	return $result;
2197
+    return $result;
2198 2198
 }
2199 2199
 
2200 2200
 /**
@@ -2206,419 +2206,419 @@  discard block
 block discarded – undo
2206 2206
  * @todo find best way to use px- py- or general p-
2207 2207
  */
2208 2208
 function sd_build_aui_class( $args ) {
2209
-	global $aui_bs5;
2210
-
2211
-	$classes = array();
2212
-
2213
-	if ( $aui_bs5 ) {
2214
-		$p_ml = 'ms-';
2215
-		$p_mr = 'me-';
2216
-
2217
-		$p_pl = 'ps-';
2218
-		$p_pr = 'pe-';
2219
-	} else {
2220
-		$p_ml = 'ml-';
2221
-		$p_mr = 'mr-';
2222
-
2223
-		$p_pl = 'pl-';
2224
-		$p_pr = 'pr-';
2225
-	}
2226
-
2227
-	// margins.
2228
-	if ( isset( $args['mt'] ) && $args['mt'] !== '' ) {
2229
-		$classes[] = 'mt-' . sanitize_html_class( $args['mt'] );
2230
-		$mt        = $args['mt'];
2231
-	} else {
2232
-		$mt = null;
2233
-	}
2234
-	if ( isset( $args['mr'] ) && $args['mr'] !== '' ) {
2235
-		$classes[] = $p_mr . sanitize_html_class( $args['mr'] );
2236
-		$mr        = $args['mr'];
2237
-	} else {
2238
-		$mr = null;
2239
-	}
2240
-	if ( isset( $args['mb'] ) && $args['mb'] !== '' ) {
2241
-		$classes[] = 'mb-' . sanitize_html_class( $args['mb'] );
2242
-		$mb        = $args['mb'];
2243
-	} else {
2244
-		$mb = null;
2245
-	}
2246
-	if ( isset( $args['ml'] ) && $args['ml'] !== '' ) {
2247
-		$classes[] = $p_ml . sanitize_html_class( $args['ml'] );
2248
-		$ml        = $args['ml'];
2249
-	} else {
2250
-		$ml = null;
2251
-	}
2252
-
2253
-	// margins tablet.
2254
-	if ( isset( $args['mt_md'] ) && $args['mt_md'] !== '' ) {
2255
-		$classes[] = 'mt-md-' . sanitize_html_class( $args['mt_md'] );
2256
-		$mt_md     = $args['mt_md'];
2257
-	} else {
2258
-		$mt_md = null;
2259
-	}
2260
-	if ( isset( $args['mr_md'] ) && $args['mr_md'] !== '' ) {
2261
-		$classes[] = $p_mr . 'md-' . sanitize_html_class( $args['mr_md'] );
2262
-		$mt_md     = $args['mr_md'];
2263
-	} else {
2264
-		$mr_md = null;
2265
-	}
2266
-	if ( isset( $args['mb_md'] ) && $args['mb_md'] !== '' ) {
2267
-		$classes[] = 'mb-md-' . sanitize_html_class( $args['mb_md'] );
2268
-		$mt_md     = $args['mb_md'];
2269
-	} else {
2270
-		$mb_md = null;
2271
-	}
2272
-	if ( isset( $args['ml_md'] ) && $args['ml_md'] !== '' ) {
2273
-		$classes[] = $p_ml . 'md-' . sanitize_html_class( $args['ml_md'] );
2274
-		$mt_md     = $args['ml_md'];
2275
-	} else {
2276
-		$ml_md = null;
2277
-	}
2278
-
2279
-	// margins desktop.
2280
-	if ( isset( $args['mt_lg'] ) && $args['mt_lg'] !== '' ) {
2281
-		if ( $mt == null && $mt_md == null ) {
2282
-			$classes[] = 'mt-' . sanitize_html_class( $args['mt_lg'] );
2283
-		} else {
2284
-			$classes[] = 'mt-lg-' . sanitize_html_class( $args['mt_lg'] );
2285
-		}
2286
-	}
2287
-	if ( isset( $args['mr_lg'] ) && $args['mr_lg'] !== '' ) {
2288
-		if ( $mr == null && $mr_md == null ) {
2289
-			$classes[] = $p_mr . sanitize_html_class( $args['mr_lg'] );
2290
-		} else {
2291
-			$classes[] = $p_mr . 'lg-' . sanitize_html_class( $args['mr_lg'] );
2292
-		}
2293
-	}
2294
-	if ( isset( $args['mb_lg'] ) && $args['mb_lg'] !== '' ) {
2295
-		if ( $mb == null && $mb_md == null ) {
2296
-			$classes[] = 'mb-' . sanitize_html_class( $args['mb_lg'] );
2297
-		} else {
2298
-			$classes[] = 'mb-lg-' . sanitize_html_class( $args['mb_lg'] );
2299
-		}
2300
-	}
2301
-	if ( isset( $args['ml_lg'] ) && $args['ml_lg'] !== '' ) {
2302
-		if ( $ml == null && $ml_md == null ) {
2303
-			$classes[] = $p_ml . sanitize_html_class( $args['ml_lg'] );
2304
-		} else {
2305
-			$classes[] = $p_ml . 'lg-' . sanitize_html_class( $args['ml_lg'] );
2306
-		}
2307
-	}
2308
-
2309
-	// padding.
2310
-	if ( isset( $args['pt'] ) && $args['pt'] !== '' ) {
2311
-		$classes[] = 'pt-' . sanitize_html_class( $args['pt'] );
2312
-		$pt        = $args['pt'];
2313
-	} else {
2314
-		$pt = null;
2315
-	}
2316
-	if ( isset( $args['pr'] ) && $args['pr'] !== '' ) {
2317
-		$classes[] = $p_pr . sanitize_html_class( $args['pr'] );
2318
-		$pr        = $args['pr'];
2319
-	} else {
2320
-		$pr = null;
2321
-	}
2322
-	if ( isset( $args['pb'] ) && $args['pb'] !== '' ) {
2323
-		$classes[] = 'pb-' . sanitize_html_class( $args['pb'] );
2324
-		$pb        = $args['pb'];
2325
-	} else {
2326
-		$pb = null;
2327
-	}
2328
-	if ( isset( $args['pl'] ) && $args['pl'] !== '' ) {
2329
-		$classes[] = $p_pl . sanitize_html_class( $args['pl'] );
2330
-		$pl        = $args['pl'];
2331
-	} else {
2332
-		$pl = null;
2333
-	}
2334
-
2335
-	// padding tablet.
2336
-	if ( isset( $args['pt_md'] ) && $args['pt_md'] !== '' ) {
2337
-		$classes[] = 'pt-md-' . sanitize_html_class( $args['pt_md'] );
2338
-		$pt_md     = $args['pt_md'];
2339
-	} else {
2340
-		$pt_md = null;
2341
-	}
2342
-	if ( isset( $args['pr_md'] ) && $args['pr_md'] !== '' ) {
2343
-		$classes[] = $p_pr . 'md-' . sanitize_html_class( $args['pr_md'] );
2344
-		$pr_md     = $args['pr_md'];
2345
-	} else {
2346
-		$pr_md = null;
2347
-	}
2348
-	if ( isset( $args['pb_md'] ) && $args['pb_md'] !== '' ) {
2349
-		$classes[] = 'pb-md-' . sanitize_html_class( $args['pb_md'] );
2350
-		$pb_md     = $args['pb_md'];
2351
-	} else {
2352
-		$pb_md = null;
2353
-	}
2354
-	if ( isset( $args['pl_md'] ) && $args['pl_md'] !== '' ) {
2355
-		$classes[] = $p_pl . 'md-' . sanitize_html_class( $args['pl_md'] );
2356
-		$pl_md     = $args['pl_md'];
2357
-	} else {
2358
-		$pl_md = null;
2359
-	}
2360
-
2361
-	// padding desktop.
2362
-	if ( isset( $args['pt_lg'] ) && $args['pt_lg'] !== '' ) {
2363
-		if ( $pt == null && $pt_md == null ) {
2364
-			$classes[] = 'pt-' . sanitize_html_class( $args['pt_lg'] );
2365
-		} else {
2366
-			$classes[] = 'pt-lg-' . sanitize_html_class( $args['pt_lg'] );
2367
-		}
2368
-	}
2369
-	if ( isset( $args['pr_lg'] ) && $args['pr_lg'] !== '' ) {
2370
-		if ( $pr == null && $pr_md == null ) {
2371
-			$classes[] = $p_pr . sanitize_html_class( $args['pr_lg'] );
2372
-		} else {
2373
-			$classes[] = $p_pr . 'lg-' . sanitize_html_class( $args['pr_lg'] );
2374
-		}
2375
-	}
2376
-	if ( isset( $args['pb_lg'] ) && $args['pb_lg'] !== '' ) {
2377
-		if ( $pb == null && $pb_md == null ) {
2378
-			$classes[] = 'pb-' . sanitize_html_class( $args['pb_lg'] );
2379
-		} else {
2380
-			$classes[] = 'pb-lg-' . sanitize_html_class( $args['pb_lg'] );
2381
-		}
2382
-	}
2383
-	if ( isset( $args['pl_lg'] ) && $args['pl_lg'] !== '' ) {
2384
-		if ( $pl == null && $pl_md == null ) {
2385
-			$classes[] = $p_pl . sanitize_html_class( $args['pl_lg'] );
2386
-		} else {
2387
-			$classes[] = $p_pl . 'lg-' . sanitize_html_class( $args['pl_lg'] );
2388
-		}
2389
-	}
2390
-
2391
-	// row cols, mobile, tablet, desktop
2392
-	if ( ! empty( $args['row_cols'] ) && $args['row_cols'] !== '' ) {
2393
-		$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols'] );
2394
-		$row_cols  = $args['row_cols'];
2395
-	} else {
2396
-		$row_cols = null;
2397
-	}
2398
-	if ( ! empty( $args['row_cols_md'] ) && $args['row_cols_md'] !== '' ) {
2399
-		$classes[]   = sanitize_html_class( 'row-cols-md-' . $args['row_cols_md'] );
2400
-		$row_cols_md = $args['row_cols_md'];
2401
-	} else {
2402
-		$row_cols_md = null;
2403
-	}
2404
-	if ( ! empty( $args['row_cols_lg'] ) && $args['row_cols_lg'] !== '' ) {
2405
-		if ( $row_cols == null && $row_cols_md == null ) {
2406
-			$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols_lg'] );
2407
-		} else {
2408
-			$classes[] = sanitize_html_class( 'row-cols-lg-' . $args['row_cols_lg'] );
2409
-		}
2410
-	}
2411
-
2412
-	// columns , mobile, tablet, desktop
2413
-	if ( ! empty( $args['col'] ) && $args['col'] !== '' ) {
2414
-		$classes[] = sanitize_html_class( 'col-' . $args['col'] );
2415
-		$col       = $args['col'];
2416
-	} else {
2417
-		$col = null;
2418
-	}
2419
-	if ( ! empty( $args['col_md'] ) && $args['col_md'] !== '' ) {
2420
-		$classes[] = sanitize_html_class( 'col-md-' . $args['col_md'] );
2421
-		$col_md    = $args['col_md'];
2422
-	} else {
2423
-		$col_md = null;
2424
-	}
2425
-	if ( ! empty( $args['col_lg'] ) && $args['col_lg'] !== '' ) {
2426
-		if ( $col == null && $col_md == null ) {
2427
-			$classes[] = sanitize_html_class( 'col-' . $args['col_lg'] );
2428
-		} else {
2429
-			$classes[] = sanitize_html_class( 'col-lg-' . $args['col_lg'] );
2430
-		}
2431
-	}
2432
-
2433
-	// border
2434
-	if ( isset( $args['border'] ) && ( $args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0 ) ) {
2435
-		$classes[] = 'border-0';
2436
-	} elseif ( ! empty( $args['border'] ) ) {
2437
-		$border_class = 'border';
2438
-		if ( ! empty( $args['border_type'] ) && strpos( $args['border_type'], '-0' ) === false ) {
2439
-			$border_class = '';
2440
-		}
2441
-		$classes[] = $border_class . ' border-' . sanitize_html_class( $args['border'] );
2442
-	}
2443
-
2444
-	// border radius type
2445
-	if ( ! empty( $args['rounded'] ) ) {
2446
-		$classes[] = sanitize_html_class( $args['rounded'] );
2447
-	}
2448
-
2449
-	// border radius size BS4
2450
-	if ( isset( $args['rounded_size'] ) && in_array( $args['rounded_size'], array( 'sm', 'lg' ) ) ) {
2451
-		$classes[] = 'rounded-' . sanitize_html_class( $args['rounded_size'] );
2452
-		// if we set a size then we need to remove "rounded" if set
2453
-		if ( ( $key = array_search( 'rounded', $classes ) ) !== false ) {
2454
-			unset( $classes[ $key ] );
2455
-		}
2456
-	} else {
2457
-
2458
-		// border radius size , mobile, tablet, desktop
2459
-		if ( isset( $args['rounded_size'] ) && $args['rounded_size'] !== '' ) {
2460
-			$classes[]    = sanitize_html_class( 'rounded-' . $args['rounded_size'] );
2461
-			$rounded_size = $args['rounded_size'];
2462
-		} else {
2463
-			$rounded_size = null;
2464
-		}
2465
-		if ( isset( $args['rounded_size_md'] ) && $args['rounded_size_md'] !== '' ) {
2466
-			$classes[]       = sanitize_html_class( 'rounded-md-' . $args['rounded_size_md'] );
2467
-			$rounded_size_md = $args['rounded_size_md'];
2468
-		} else {
2469
-			$rounded_size_md = null;
2470
-		}
2471
-		if ( isset( $args['rounded_size_lg'] ) && $args['rounded_size_lg'] !== '' ) {
2472
-			if ( $rounded_size == null && $rounded_size_md == null ) {
2473
-				$classes[] = sanitize_html_class( 'rounded-' . $args['rounded_size_lg'] );
2474
-			} else {
2475
-				$classes[] = sanitize_html_class( 'rounded-lg-' . $args['rounded_size_lg'] );
2476
-			}
2477
-		}
2478
-	}
2479
-
2480
-	// shadow
2481
-	//if ( !empty( $args['shadow'] ) ) { $classes[] = sanitize_html_class($args['shadow']); }
2482
-
2483
-	// background
2484
-	if ( ! empty( $args['bg'] ) ) {
2485
-		$classes[] = 'bg-' . sanitize_html_class( $args['bg'] );
2486
-	}
2487
-
2488
-	// text_color
2489
-	if ( ! empty( $args['text_color'] ) ) {
2490
-		$classes[] = 'text-' . sanitize_html_class( $args['text_color'] );
2491
-	}
2492
-
2493
-	// text_align
2494
-	if ( ! empty( $args['text_justify'] ) ) {
2495
-		$classes[] = 'text-justify';
2496
-	} else {
2497
-		if ( ! empty( $args['text_align'] ) ) {
2498
-			$classes[]  = sanitize_html_class( $args['text_align'] );
2499
-			$text_align = $args['text_align'];
2500
-		} else {
2501
-			$text_align = null;
2502
-		}
2503
-		if ( ! empty( $args['text_align_md'] ) && $args['text_align_md'] !== '' ) {
2504
-			$classes[]     = sanitize_html_class( $args['text_align_md'] );
2505
-			$text_align_md = $args['text_align_md'];
2506
-		} else {
2507
-			$text_align_md = null;
2508
-		}
2509
-		if ( ! empty( $args['text_align_lg'] ) && $args['text_align_lg'] !== '' ) {
2510
-			if ( $text_align == null && $text_align_md == null ) {
2511
-				$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['text_align_lg'] ) );
2512
-			} else {
2513
-				$classes[] = sanitize_html_class( $args['text_align_lg'] );
2514
-			}
2515
-		}
2516
-	}
2517
-
2518
-	// display
2519
-	if ( ! empty( $args['display'] ) ) {
2520
-		$classes[] = sanitize_html_class( $args['display'] );
2521
-		$display   = $args['display'];
2522
-	} else {
2523
-		$display = null;
2524
-	}
2525
-	if ( ! empty( $args['display_md'] ) && $args['display_md'] !== '' ) {
2526
-		$classes[]  = sanitize_html_class( $args['display_md'] );
2527
-		$display_md = $args['display_md'];
2528
-	} else {
2529
-		$display_md = null;
2530
-	}
2531
-	if ( ! empty( $args['display_lg'] ) && $args['display_lg'] !== '' ) {
2532
-		if ( $display == null && $display_md == null ) {
2533
-			$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['display_lg'] ) );
2534
-		} else {
2535
-			$classes[] = sanitize_html_class( $args['display_lg'] );
2536
-		}
2537
-	}
2538
-
2539
-	// bgtus - background transparent until scroll
2540
-	if ( ! empty( $args['bgtus'] ) ) {
2541
-		$classes[] = sanitize_html_class( 'bg-transparent-until-scroll' );
2542
-	}
2543
-
2544
-	// cscos - change color scheme on scroll
2545
-	if ( ! empty( $args['bgtus'] ) && ! empty( $args['cscos'] ) ) {
2546
-		$classes[] = sanitize_html_class( 'color-scheme-flip-on-scroll' );
2547
-	}
2548
-
2549
-	// hover animations
2550
-	if ( ! empty( $args['hover_animations'] ) ) {
2551
-		$classes[] = sd_sanitize_html_classes( str_replace( ',', ' ', $args['hover_animations'] ) );
2552
-	}
2553
-
2554
-	// absolute_position
2555
-	if ( ! empty( $args['absolute_position'] ) ) {
2556
-		if ( 'top-left' === $args['absolute_position'] ) {
2557
-			$classes[] = 'start-0 top-0';
2558
-		} elseif ( 'top-center' === $args['absolute_position'] ) {
2559
-			$classes[] = 'start-50 top-0 translate-middle';
2560
-		} elseif ( 'top-right' === $args['absolute_position'] ) {
2561
-			$classes[] = 'end-0 top-0';
2562
-		} elseif ( 'center-left' === $args['absolute_position'] ) {
2563
-			$classes[] = 'start-0 top-50';
2564
-		} elseif ( 'center' === $args['absolute_position'] ) {
2565
-			$classes[] = 'start-50 top-50 translate-middle';
2566
-		} elseif ( 'center-right' === $args['absolute_position'] ) {
2567
-			$classes[] = 'end-0 top-50';
2568
-		} elseif ( 'bottom-left' === $args['absolute_position'] ) {
2569
-			$classes[] = 'start-0 bottom-0';
2570
-		} elseif ( 'bottom-center' === $args['absolute_position'] ) {
2571
-			$classes[] = 'start-50 bottom-0 translate-middle';
2572
-		} elseif ( 'bottom-right' === $args['absolute_position'] ) {
2573
-			$classes[] = 'end-0 bottom-0';
2574
-		}
2575
-	}
2576
-
2577
-	// build classes from build keys
2578
-	$build_keys = sd_get_class_build_keys();
2579
-	if ( ! empty( $build_keys ) ) {
2580
-		foreach ( $build_keys as $key ) {
2581
-
2582
-			if ( substr( $key, -4 ) == '-MTD' ) {
2583
-
2584
-				$k = str_replace( '-MTD', '', $key );
2585
-
2586
-				// Mobile, Tablet, Desktop
2587
-				if ( ! empty( $args[ $k ] ) && $args[ $k ] !== '' ) {
2588
-					$classes[] = sanitize_html_class( $args[ $k ] );
2589
-					$v         = $args[ $k ];
2590
-				} else {
2591
-					$v = null;
2592
-				}
2593
-				if ( ! empty( $args[ $k . '_md' ] ) && $args[ $k . '_md' ] !== '' ) {
2594
-					$classes[] = sanitize_html_class( $args[ $k . '_md' ] );
2595
-					$v_md      = $args[ $k . '_md' ];
2596
-				} else {
2597
-					$v_md = null;
2598
-				}
2599
-				if ( ! empty( $args[ $k . '_lg' ] ) && $args[ $k . '_lg' ] !== '' ) {
2600
-					if ( $v == null && $v_md == null ) {
2601
-						$classes[] = sanitize_html_class( str_replace( '-lg', '', $args[ $k . '_lg' ] ) );
2602
-					} else {
2603
-						$classes[] = sanitize_html_class( $args[ $k . '_lg' ] );
2604
-					}
2605
-				}
2606
-			} else {
2607
-				if ( $key == 'font_size' && ! empty( $args[ $key ] ) && $args[ $key ] == 'custom' ) {
2608
-					continue;
2609
-				}
2610
-				if ( ! empty( $args[ $key ] ) ) {
2611
-					$classes[] = sd_sanitize_html_classes( $args[ $key ] );
2612
-				}
2613
-			}
2614
-		}
2615
-	}
2616
-
2617
-	if ( ! empty( $classes ) ) {
2618
-		$classes = array_unique( array_filter( array_map( 'trim', $classes ) ) );
2619
-	}
2620
-
2621
-	return implode( ' ', $classes );
2209
+    global $aui_bs5;
2210
+
2211
+    $classes = array();
2212
+
2213
+    if ( $aui_bs5 ) {
2214
+        $p_ml = 'ms-';
2215
+        $p_mr = 'me-';
2216
+
2217
+        $p_pl = 'ps-';
2218
+        $p_pr = 'pe-';
2219
+    } else {
2220
+        $p_ml = 'ml-';
2221
+        $p_mr = 'mr-';
2222
+
2223
+        $p_pl = 'pl-';
2224
+        $p_pr = 'pr-';
2225
+    }
2226
+
2227
+    // margins.
2228
+    if ( isset( $args['mt'] ) && $args['mt'] !== '' ) {
2229
+        $classes[] = 'mt-' . sanitize_html_class( $args['mt'] );
2230
+        $mt        = $args['mt'];
2231
+    } else {
2232
+        $mt = null;
2233
+    }
2234
+    if ( isset( $args['mr'] ) && $args['mr'] !== '' ) {
2235
+        $classes[] = $p_mr . sanitize_html_class( $args['mr'] );
2236
+        $mr        = $args['mr'];
2237
+    } else {
2238
+        $mr = null;
2239
+    }
2240
+    if ( isset( $args['mb'] ) && $args['mb'] !== '' ) {
2241
+        $classes[] = 'mb-' . sanitize_html_class( $args['mb'] );
2242
+        $mb        = $args['mb'];
2243
+    } else {
2244
+        $mb = null;
2245
+    }
2246
+    if ( isset( $args['ml'] ) && $args['ml'] !== '' ) {
2247
+        $classes[] = $p_ml . sanitize_html_class( $args['ml'] );
2248
+        $ml        = $args['ml'];
2249
+    } else {
2250
+        $ml = null;
2251
+    }
2252
+
2253
+    // margins tablet.
2254
+    if ( isset( $args['mt_md'] ) && $args['mt_md'] !== '' ) {
2255
+        $classes[] = 'mt-md-' . sanitize_html_class( $args['mt_md'] );
2256
+        $mt_md     = $args['mt_md'];
2257
+    } else {
2258
+        $mt_md = null;
2259
+    }
2260
+    if ( isset( $args['mr_md'] ) && $args['mr_md'] !== '' ) {
2261
+        $classes[] = $p_mr . 'md-' . sanitize_html_class( $args['mr_md'] );
2262
+        $mt_md     = $args['mr_md'];
2263
+    } else {
2264
+        $mr_md = null;
2265
+    }
2266
+    if ( isset( $args['mb_md'] ) && $args['mb_md'] !== '' ) {
2267
+        $classes[] = 'mb-md-' . sanitize_html_class( $args['mb_md'] );
2268
+        $mt_md     = $args['mb_md'];
2269
+    } else {
2270
+        $mb_md = null;
2271
+    }
2272
+    if ( isset( $args['ml_md'] ) && $args['ml_md'] !== '' ) {
2273
+        $classes[] = $p_ml . 'md-' . sanitize_html_class( $args['ml_md'] );
2274
+        $mt_md     = $args['ml_md'];
2275
+    } else {
2276
+        $ml_md = null;
2277
+    }
2278
+
2279
+    // margins desktop.
2280
+    if ( isset( $args['mt_lg'] ) && $args['mt_lg'] !== '' ) {
2281
+        if ( $mt == null && $mt_md == null ) {
2282
+            $classes[] = 'mt-' . sanitize_html_class( $args['mt_lg'] );
2283
+        } else {
2284
+            $classes[] = 'mt-lg-' . sanitize_html_class( $args['mt_lg'] );
2285
+        }
2286
+    }
2287
+    if ( isset( $args['mr_lg'] ) && $args['mr_lg'] !== '' ) {
2288
+        if ( $mr == null && $mr_md == null ) {
2289
+            $classes[] = $p_mr . sanitize_html_class( $args['mr_lg'] );
2290
+        } else {
2291
+            $classes[] = $p_mr . 'lg-' . sanitize_html_class( $args['mr_lg'] );
2292
+        }
2293
+    }
2294
+    if ( isset( $args['mb_lg'] ) && $args['mb_lg'] !== '' ) {
2295
+        if ( $mb == null && $mb_md == null ) {
2296
+            $classes[] = 'mb-' . sanitize_html_class( $args['mb_lg'] );
2297
+        } else {
2298
+            $classes[] = 'mb-lg-' . sanitize_html_class( $args['mb_lg'] );
2299
+        }
2300
+    }
2301
+    if ( isset( $args['ml_lg'] ) && $args['ml_lg'] !== '' ) {
2302
+        if ( $ml == null && $ml_md == null ) {
2303
+            $classes[] = $p_ml . sanitize_html_class( $args['ml_lg'] );
2304
+        } else {
2305
+            $classes[] = $p_ml . 'lg-' . sanitize_html_class( $args['ml_lg'] );
2306
+        }
2307
+    }
2308
+
2309
+    // padding.
2310
+    if ( isset( $args['pt'] ) && $args['pt'] !== '' ) {
2311
+        $classes[] = 'pt-' . sanitize_html_class( $args['pt'] );
2312
+        $pt        = $args['pt'];
2313
+    } else {
2314
+        $pt = null;
2315
+    }
2316
+    if ( isset( $args['pr'] ) && $args['pr'] !== '' ) {
2317
+        $classes[] = $p_pr . sanitize_html_class( $args['pr'] );
2318
+        $pr        = $args['pr'];
2319
+    } else {
2320
+        $pr = null;
2321
+    }
2322
+    if ( isset( $args['pb'] ) && $args['pb'] !== '' ) {
2323
+        $classes[] = 'pb-' . sanitize_html_class( $args['pb'] );
2324
+        $pb        = $args['pb'];
2325
+    } else {
2326
+        $pb = null;
2327
+    }
2328
+    if ( isset( $args['pl'] ) && $args['pl'] !== '' ) {
2329
+        $classes[] = $p_pl . sanitize_html_class( $args['pl'] );
2330
+        $pl        = $args['pl'];
2331
+    } else {
2332
+        $pl = null;
2333
+    }
2334
+
2335
+    // padding tablet.
2336
+    if ( isset( $args['pt_md'] ) && $args['pt_md'] !== '' ) {
2337
+        $classes[] = 'pt-md-' . sanitize_html_class( $args['pt_md'] );
2338
+        $pt_md     = $args['pt_md'];
2339
+    } else {
2340
+        $pt_md = null;
2341
+    }
2342
+    if ( isset( $args['pr_md'] ) && $args['pr_md'] !== '' ) {
2343
+        $classes[] = $p_pr . 'md-' . sanitize_html_class( $args['pr_md'] );
2344
+        $pr_md     = $args['pr_md'];
2345
+    } else {
2346
+        $pr_md = null;
2347
+    }
2348
+    if ( isset( $args['pb_md'] ) && $args['pb_md'] !== '' ) {
2349
+        $classes[] = 'pb-md-' . sanitize_html_class( $args['pb_md'] );
2350
+        $pb_md     = $args['pb_md'];
2351
+    } else {
2352
+        $pb_md = null;
2353
+    }
2354
+    if ( isset( $args['pl_md'] ) && $args['pl_md'] !== '' ) {
2355
+        $classes[] = $p_pl . 'md-' . sanitize_html_class( $args['pl_md'] );
2356
+        $pl_md     = $args['pl_md'];
2357
+    } else {
2358
+        $pl_md = null;
2359
+    }
2360
+
2361
+    // padding desktop.
2362
+    if ( isset( $args['pt_lg'] ) && $args['pt_lg'] !== '' ) {
2363
+        if ( $pt == null && $pt_md == null ) {
2364
+            $classes[] = 'pt-' . sanitize_html_class( $args['pt_lg'] );
2365
+        } else {
2366
+            $classes[] = 'pt-lg-' . sanitize_html_class( $args['pt_lg'] );
2367
+        }
2368
+    }
2369
+    if ( isset( $args['pr_lg'] ) && $args['pr_lg'] !== '' ) {
2370
+        if ( $pr == null && $pr_md == null ) {
2371
+            $classes[] = $p_pr . sanitize_html_class( $args['pr_lg'] );
2372
+        } else {
2373
+            $classes[] = $p_pr . 'lg-' . sanitize_html_class( $args['pr_lg'] );
2374
+        }
2375
+    }
2376
+    if ( isset( $args['pb_lg'] ) && $args['pb_lg'] !== '' ) {
2377
+        if ( $pb == null && $pb_md == null ) {
2378
+            $classes[] = 'pb-' . sanitize_html_class( $args['pb_lg'] );
2379
+        } else {
2380
+            $classes[] = 'pb-lg-' . sanitize_html_class( $args['pb_lg'] );
2381
+        }
2382
+    }
2383
+    if ( isset( $args['pl_lg'] ) && $args['pl_lg'] !== '' ) {
2384
+        if ( $pl == null && $pl_md == null ) {
2385
+            $classes[] = $p_pl . sanitize_html_class( $args['pl_lg'] );
2386
+        } else {
2387
+            $classes[] = $p_pl . 'lg-' . sanitize_html_class( $args['pl_lg'] );
2388
+        }
2389
+    }
2390
+
2391
+    // row cols, mobile, tablet, desktop
2392
+    if ( ! empty( $args['row_cols'] ) && $args['row_cols'] !== '' ) {
2393
+        $classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols'] );
2394
+        $row_cols  = $args['row_cols'];
2395
+    } else {
2396
+        $row_cols = null;
2397
+    }
2398
+    if ( ! empty( $args['row_cols_md'] ) && $args['row_cols_md'] !== '' ) {
2399
+        $classes[]   = sanitize_html_class( 'row-cols-md-' . $args['row_cols_md'] );
2400
+        $row_cols_md = $args['row_cols_md'];
2401
+    } else {
2402
+        $row_cols_md = null;
2403
+    }
2404
+    if ( ! empty( $args['row_cols_lg'] ) && $args['row_cols_lg'] !== '' ) {
2405
+        if ( $row_cols == null && $row_cols_md == null ) {
2406
+            $classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols_lg'] );
2407
+        } else {
2408
+            $classes[] = sanitize_html_class( 'row-cols-lg-' . $args['row_cols_lg'] );
2409
+        }
2410
+    }
2411
+
2412
+    // columns , mobile, tablet, desktop
2413
+    if ( ! empty( $args['col'] ) && $args['col'] !== '' ) {
2414
+        $classes[] = sanitize_html_class( 'col-' . $args['col'] );
2415
+        $col       = $args['col'];
2416
+    } else {
2417
+        $col = null;
2418
+    }
2419
+    if ( ! empty( $args['col_md'] ) && $args['col_md'] !== '' ) {
2420
+        $classes[] = sanitize_html_class( 'col-md-' . $args['col_md'] );
2421
+        $col_md    = $args['col_md'];
2422
+    } else {
2423
+        $col_md = null;
2424
+    }
2425
+    if ( ! empty( $args['col_lg'] ) && $args['col_lg'] !== '' ) {
2426
+        if ( $col == null && $col_md == null ) {
2427
+            $classes[] = sanitize_html_class( 'col-' . $args['col_lg'] );
2428
+        } else {
2429
+            $classes[] = sanitize_html_class( 'col-lg-' . $args['col_lg'] );
2430
+        }
2431
+    }
2432
+
2433
+    // border
2434
+    if ( isset( $args['border'] ) && ( $args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0 ) ) {
2435
+        $classes[] = 'border-0';
2436
+    } elseif ( ! empty( $args['border'] ) ) {
2437
+        $border_class = 'border';
2438
+        if ( ! empty( $args['border_type'] ) && strpos( $args['border_type'], '-0' ) === false ) {
2439
+            $border_class = '';
2440
+        }
2441
+        $classes[] = $border_class . ' border-' . sanitize_html_class( $args['border'] );
2442
+    }
2443
+
2444
+    // border radius type
2445
+    if ( ! empty( $args['rounded'] ) ) {
2446
+        $classes[] = sanitize_html_class( $args['rounded'] );
2447
+    }
2448
+
2449
+    // border radius size BS4
2450
+    if ( isset( $args['rounded_size'] ) && in_array( $args['rounded_size'], array( 'sm', 'lg' ) ) ) {
2451
+        $classes[] = 'rounded-' . sanitize_html_class( $args['rounded_size'] );
2452
+        // if we set a size then we need to remove "rounded" if set
2453
+        if ( ( $key = array_search( 'rounded', $classes ) ) !== false ) {
2454
+            unset( $classes[ $key ] );
2455
+        }
2456
+    } else {
2457
+
2458
+        // border radius size , mobile, tablet, desktop
2459
+        if ( isset( $args['rounded_size'] ) && $args['rounded_size'] !== '' ) {
2460
+            $classes[]    = sanitize_html_class( 'rounded-' . $args['rounded_size'] );
2461
+            $rounded_size = $args['rounded_size'];
2462
+        } else {
2463
+            $rounded_size = null;
2464
+        }
2465
+        if ( isset( $args['rounded_size_md'] ) && $args['rounded_size_md'] !== '' ) {
2466
+            $classes[]       = sanitize_html_class( 'rounded-md-' . $args['rounded_size_md'] );
2467
+            $rounded_size_md = $args['rounded_size_md'];
2468
+        } else {
2469
+            $rounded_size_md = null;
2470
+        }
2471
+        if ( isset( $args['rounded_size_lg'] ) && $args['rounded_size_lg'] !== '' ) {
2472
+            if ( $rounded_size == null && $rounded_size_md == null ) {
2473
+                $classes[] = sanitize_html_class( 'rounded-' . $args['rounded_size_lg'] );
2474
+            } else {
2475
+                $classes[] = sanitize_html_class( 'rounded-lg-' . $args['rounded_size_lg'] );
2476
+            }
2477
+        }
2478
+    }
2479
+
2480
+    // shadow
2481
+    //if ( !empty( $args['shadow'] ) ) { $classes[] = sanitize_html_class($args['shadow']); }
2482
+
2483
+    // background
2484
+    if ( ! empty( $args['bg'] ) ) {
2485
+        $classes[] = 'bg-' . sanitize_html_class( $args['bg'] );
2486
+    }
2487
+
2488
+    // text_color
2489
+    if ( ! empty( $args['text_color'] ) ) {
2490
+        $classes[] = 'text-' . sanitize_html_class( $args['text_color'] );
2491
+    }
2492
+
2493
+    // text_align
2494
+    if ( ! empty( $args['text_justify'] ) ) {
2495
+        $classes[] = 'text-justify';
2496
+    } else {
2497
+        if ( ! empty( $args['text_align'] ) ) {
2498
+            $classes[]  = sanitize_html_class( $args['text_align'] );
2499
+            $text_align = $args['text_align'];
2500
+        } else {
2501
+            $text_align = null;
2502
+        }
2503
+        if ( ! empty( $args['text_align_md'] ) && $args['text_align_md'] !== '' ) {
2504
+            $classes[]     = sanitize_html_class( $args['text_align_md'] );
2505
+            $text_align_md = $args['text_align_md'];
2506
+        } else {
2507
+            $text_align_md = null;
2508
+        }
2509
+        if ( ! empty( $args['text_align_lg'] ) && $args['text_align_lg'] !== '' ) {
2510
+            if ( $text_align == null && $text_align_md == null ) {
2511
+                $classes[] = sanitize_html_class( str_replace( '-lg', '', $args['text_align_lg'] ) );
2512
+            } else {
2513
+                $classes[] = sanitize_html_class( $args['text_align_lg'] );
2514
+            }
2515
+        }
2516
+    }
2517
+
2518
+    // display
2519
+    if ( ! empty( $args['display'] ) ) {
2520
+        $classes[] = sanitize_html_class( $args['display'] );
2521
+        $display   = $args['display'];
2522
+    } else {
2523
+        $display = null;
2524
+    }
2525
+    if ( ! empty( $args['display_md'] ) && $args['display_md'] !== '' ) {
2526
+        $classes[]  = sanitize_html_class( $args['display_md'] );
2527
+        $display_md = $args['display_md'];
2528
+    } else {
2529
+        $display_md = null;
2530
+    }
2531
+    if ( ! empty( $args['display_lg'] ) && $args['display_lg'] !== '' ) {
2532
+        if ( $display == null && $display_md == null ) {
2533
+            $classes[] = sanitize_html_class( str_replace( '-lg', '', $args['display_lg'] ) );
2534
+        } else {
2535
+            $classes[] = sanitize_html_class( $args['display_lg'] );
2536
+        }
2537
+    }
2538
+
2539
+    // bgtus - background transparent until scroll
2540
+    if ( ! empty( $args['bgtus'] ) ) {
2541
+        $classes[] = sanitize_html_class( 'bg-transparent-until-scroll' );
2542
+    }
2543
+
2544
+    // cscos - change color scheme on scroll
2545
+    if ( ! empty( $args['bgtus'] ) && ! empty( $args['cscos'] ) ) {
2546
+        $classes[] = sanitize_html_class( 'color-scheme-flip-on-scroll' );
2547
+    }
2548
+
2549
+    // hover animations
2550
+    if ( ! empty( $args['hover_animations'] ) ) {
2551
+        $classes[] = sd_sanitize_html_classes( str_replace( ',', ' ', $args['hover_animations'] ) );
2552
+    }
2553
+
2554
+    // absolute_position
2555
+    if ( ! empty( $args['absolute_position'] ) ) {
2556
+        if ( 'top-left' === $args['absolute_position'] ) {
2557
+            $classes[] = 'start-0 top-0';
2558
+        } elseif ( 'top-center' === $args['absolute_position'] ) {
2559
+            $classes[] = 'start-50 top-0 translate-middle';
2560
+        } elseif ( 'top-right' === $args['absolute_position'] ) {
2561
+            $classes[] = 'end-0 top-0';
2562
+        } elseif ( 'center-left' === $args['absolute_position'] ) {
2563
+            $classes[] = 'start-0 top-50';
2564
+        } elseif ( 'center' === $args['absolute_position'] ) {
2565
+            $classes[] = 'start-50 top-50 translate-middle';
2566
+        } elseif ( 'center-right' === $args['absolute_position'] ) {
2567
+            $classes[] = 'end-0 top-50';
2568
+        } elseif ( 'bottom-left' === $args['absolute_position'] ) {
2569
+            $classes[] = 'start-0 bottom-0';
2570
+        } elseif ( 'bottom-center' === $args['absolute_position'] ) {
2571
+            $classes[] = 'start-50 bottom-0 translate-middle';
2572
+        } elseif ( 'bottom-right' === $args['absolute_position'] ) {
2573
+            $classes[] = 'end-0 bottom-0';
2574
+        }
2575
+    }
2576
+
2577
+    // build classes from build keys
2578
+    $build_keys = sd_get_class_build_keys();
2579
+    if ( ! empty( $build_keys ) ) {
2580
+        foreach ( $build_keys as $key ) {
2581
+
2582
+            if ( substr( $key, -4 ) == '-MTD' ) {
2583
+
2584
+                $k = str_replace( '-MTD', '', $key );
2585
+
2586
+                // Mobile, Tablet, Desktop
2587
+                if ( ! empty( $args[ $k ] ) && $args[ $k ] !== '' ) {
2588
+                    $classes[] = sanitize_html_class( $args[ $k ] );
2589
+                    $v         = $args[ $k ];
2590
+                } else {
2591
+                    $v = null;
2592
+                }
2593
+                if ( ! empty( $args[ $k . '_md' ] ) && $args[ $k . '_md' ] !== '' ) {
2594
+                    $classes[] = sanitize_html_class( $args[ $k . '_md' ] );
2595
+                    $v_md      = $args[ $k . '_md' ];
2596
+                } else {
2597
+                    $v_md = null;
2598
+                }
2599
+                if ( ! empty( $args[ $k . '_lg' ] ) && $args[ $k . '_lg' ] !== '' ) {
2600
+                    if ( $v == null && $v_md == null ) {
2601
+                        $classes[] = sanitize_html_class( str_replace( '-lg', '', $args[ $k . '_lg' ] ) );
2602
+                    } else {
2603
+                        $classes[] = sanitize_html_class( $args[ $k . '_lg' ] );
2604
+                    }
2605
+                }
2606
+            } else {
2607
+                if ( $key == 'font_size' && ! empty( $args[ $key ] ) && $args[ $key ] == 'custom' ) {
2608
+                    continue;
2609
+                }
2610
+                if ( ! empty( $args[ $key ] ) ) {
2611
+                    $classes[] = sd_sanitize_html_classes( $args[ $key ] );
2612
+                }
2613
+            }
2614
+        }
2615
+    }
2616
+
2617
+    if ( ! empty( $classes ) ) {
2618
+        $classes = array_unique( array_filter( array_map( 'trim', $classes ) ) );
2619
+    }
2620
+
2621
+    return implode( ' ', $classes );
2622 2622
 }
2623 2623
 
2624 2624
 /**
@@ -2630,90 +2630,90 @@  discard block
 block discarded – undo
2630 2630
  */
2631 2631
 function sd_build_aui_styles( $args ) {
2632 2632
 
2633
-	$styles = array();
2634
-
2635
-	// background color
2636
-	if ( ! empty( $args['bg'] ) && $args['bg'] !== '' ) {
2637
-		if ( $args['bg'] == 'custom-color' ) {
2638
-			$styles['background-color'] = $args['bg_color'];
2639
-		} elseif ( $args['bg'] == 'custom-gradient' ) {
2640
-			$styles['background-image'] = $args['bg_gradient'];
2641
-
2642
-			// use background on text.
2643
-			if ( ! empty( $args['bg_on_text'] ) && $args['bg_on_text'] ) {
2644
-				$styles['background-clip']         = 'text';
2645
-				$styles['-webkit-background-clip'] = 'text';
2646
-				$styles['text-fill-color']         = 'transparent';
2647
-				$styles['-webkit-text-fill-color'] = 'transparent';
2648
-			}
2649
-		}
2650
-	}
2651
-
2652
-	if ( ! empty( $args['bg_image'] ) && $args['bg_image'] !== '' ) {
2653
-		$hasImage = true;
2654
-		if ( ! empty( $styles['background-color'] ) && $args['bg'] == 'custom-color' ) {
2655
-			$styles['background-image']      = 'url(' . $args['bg_image'] . ')';
2656
-			$styles['background-blend-mode'] = 'overlay';
2657
-		} elseif ( ! empty( $styles['background-image'] ) && $args['bg'] == 'custom-gradient' ) {
2658
-			$styles['background-image'] .= ',url(' . $args['bg_image'] . ')';
2659
-		} elseif ( ! empty( $args['bg'] ) && $args['bg'] != '' && $args['bg'] != 'transparent' ) {
2660
-			// do nothing as we alreay have a preset
2661
-			$hasImage = false;
2662
-		} else {
2663
-			$styles['background-image'] = 'url(' . $args['bg_image'] . ')';
2664
-		}
2665
-
2666
-		if ( $hasImage ) {
2667
-			$styles['background-size'] = 'cover';
2668
-
2669
-			if ( ! empty( $args['bg_image_fixed'] ) && $args['bg_image_fixed'] ) {
2670
-				$styles['background-attachment'] = 'fixed';
2671
-			}
2672
-		}
2673
-
2674
-		if ( $hasImage && ! empty( $args['bg_image_xy'] ) && ! empty( $args['bg_image_xy']['x'] ) ) {
2675
-			$styles['background-position'] = ( $args['bg_image_xy']['x'] * 100 ) . '% ' . ( $args['bg_image_xy']['y'] * 100 ) . '%';
2676
-		}
2677
-	}
2678
-
2679
-	// sticky offset top
2680
-	if ( ! empty( $args['sticky_offset_top'] ) && $args['sticky_offset_top'] !== '' ) {
2681
-		$styles['top'] = absint( $args['sticky_offset_top'] );
2682
-	}
2683
-
2684
-	// sticky offset bottom
2685
-	if ( ! empty( $args['sticky_offset_bottom'] ) && $args['sticky_offset_bottom'] !== '' ) {
2686
-		$styles['bottom'] = absint( $args['sticky_offset_bottom'] );
2687
-	}
2688
-
2689
-	// font size
2690
-	if ( ! empty( $args['font_size_custom'] ) && $args['font_size_custom'] !== '' ) {
2691
-		$styles['font-size'] = (float) $args['font_size_custom'] . 'rem';
2692
-	}
2693
-
2694
-	// font color
2695
-	if ( ! empty( $args['text_color_custom'] ) && $args['text_color_custom'] !== '' ) {
2696
-		$styles['color'] = esc_attr( $args['text_color_custom'] );
2697
-	}
2698
-
2699
-	// font line height
2700
-	if ( ! empty( $args['font_line_height'] ) && $args['font_line_height'] !== '' ) {
2701
-		$styles['line-height'] = esc_attr( $args['font_line_height'] );
2702
-	}
2703
-
2704
-	// max height
2705
-	if ( ! empty( $args['max_height'] ) && $args['max_height'] !== '' ) {
2706
-		$styles['max-height'] = esc_attr( $args['max_height'] );
2707
-	}
2708
-
2709
-	$style_string = '';
2710
-	if ( ! empty( $styles ) ) {
2711
-		foreach ( $styles as $key => $val ) {
2712
-			$style_string .= esc_attr( $key ) . ':' . esc_attr( $val ) . ';';
2713
-		}
2714
-	}
2715
-
2716
-	return $style_string;
2633
+    $styles = array();
2634
+
2635
+    // background color
2636
+    if ( ! empty( $args['bg'] ) && $args['bg'] !== '' ) {
2637
+        if ( $args['bg'] == 'custom-color' ) {
2638
+            $styles['background-color'] = $args['bg_color'];
2639
+        } elseif ( $args['bg'] == 'custom-gradient' ) {
2640
+            $styles['background-image'] = $args['bg_gradient'];
2641
+
2642
+            // use background on text.
2643
+            if ( ! empty( $args['bg_on_text'] ) && $args['bg_on_text'] ) {
2644
+                $styles['background-clip']         = 'text';
2645
+                $styles['-webkit-background-clip'] = 'text';
2646
+                $styles['text-fill-color']         = 'transparent';
2647
+                $styles['-webkit-text-fill-color'] = 'transparent';
2648
+            }
2649
+        }
2650
+    }
2651
+
2652
+    if ( ! empty( $args['bg_image'] ) && $args['bg_image'] !== '' ) {
2653
+        $hasImage = true;
2654
+        if ( ! empty( $styles['background-color'] ) && $args['bg'] == 'custom-color' ) {
2655
+            $styles['background-image']      = 'url(' . $args['bg_image'] . ')';
2656
+            $styles['background-blend-mode'] = 'overlay';
2657
+        } elseif ( ! empty( $styles['background-image'] ) && $args['bg'] == 'custom-gradient' ) {
2658
+            $styles['background-image'] .= ',url(' . $args['bg_image'] . ')';
2659
+        } elseif ( ! empty( $args['bg'] ) && $args['bg'] != '' && $args['bg'] != 'transparent' ) {
2660
+            // do nothing as we alreay have a preset
2661
+            $hasImage = false;
2662
+        } else {
2663
+            $styles['background-image'] = 'url(' . $args['bg_image'] . ')';
2664
+        }
2665
+
2666
+        if ( $hasImage ) {
2667
+            $styles['background-size'] = 'cover';
2668
+
2669
+            if ( ! empty( $args['bg_image_fixed'] ) && $args['bg_image_fixed'] ) {
2670
+                $styles['background-attachment'] = 'fixed';
2671
+            }
2672
+        }
2673
+
2674
+        if ( $hasImage && ! empty( $args['bg_image_xy'] ) && ! empty( $args['bg_image_xy']['x'] ) ) {
2675
+            $styles['background-position'] = ( $args['bg_image_xy']['x'] * 100 ) . '% ' . ( $args['bg_image_xy']['y'] * 100 ) . '%';
2676
+        }
2677
+    }
2678
+
2679
+    // sticky offset top
2680
+    if ( ! empty( $args['sticky_offset_top'] ) && $args['sticky_offset_top'] !== '' ) {
2681
+        $styles['top'] = absint( $args['sticky_offset_top'] );
2682
+    }
2683
+
2684
+    // sticky offset bottom
2685
+    if ( ! empty( $args['sticky_offset_bottom'] ) && $args['sticky_offset_bottom'] !== '' ) {
2686
+        $styles['bottom'] = absint( $args['sticky_offset_bottom'] );
2687
+    }
2688
+
2689
+    // font size
2690
+    if ( ! empty( $args['font_size_custom'] ) && $args['font_size_custom'] !== '' ) {
2691
+        $styles['font-size'] = (float) $args['font_size_custom'] . 'rem';
2692
+    }
2693
+
2694
+    // font color
2695
+    if ( ! empty( $args['text_color_custom'] ) && $args['text_color_custom'] !== '' ) {
2696
+        $styles['color'] = esc_attr( $args['text_color_custom'] );
2697
+    }
2698
+
2699
+    // font line height
2700
+    if ( ! empty( $args['font_line_height'] ) && $args['font_line_height'] !== '' ) {
2701
+        $styles['line-height'] = esc_attr( $args['font_line_height'] );
2702
+    }
2703
+
2704
+    // max height
2705
+    if ( ! empty( $args['max_height'] ) && $args['max_height'] !== '' ) {
2706
+        $styles['max-height'] = esc_attr( $args['max_height'] );
2707
+    }
2708
+
2709
+    $style_string = '';
2710
+    if ( ! empty( $styles ) ) {
2711
+        foreach ( $styles as $key => $val ) {
2712
+            $style_string .= esc_attr( $key ) . ':' . esc_attr( $val ) . ';';
2713
+        }
2714
+    }
2715
+
2716
+    return $style_string;
2717 2717
 
2718 2718
 }
2719 2719
 
@@ -2726,34 +2726,34 @@  discard block
 block discarded – undo
2726 2726
  * @return string
2727 2727
  */
2728 2728
 function sd_build_hover_styles( $args, $is_preview = false ) {
2729
-	$rules = '';
2730
-	// text color
2731
-	if ( ! empty( $args['styleid'] ) ) {
2732
-		$styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr( $args['styleid'] ) : 'html .' . esc_attr( $args['styleid'] );
2733
-
2734
-		// text
2735
-		if ( ! empty( $args['text_color_hover'] ) ) {
2736
-			$key    = 'custom' === $args['text_color_hover'] && ! empty( $args['text_color_hover_custom'] ) ? 'text_color_hover_custom' : 'text_color_hover';
2737
-			$color  = sd_get_color_from_var( $args[ $key ] );
2738
-			$rules .= $styleid . ':hover {color: ' . $color . ' !important;} ';
2739
-		}
2740
-
2741
-		// bg
2742
-		if ( ! empty( $args['bg_hover'] ) ) {
2743
-			if ( 'custom-gradient' === $args['bg_hover'] ) {
2744
-				$color  = $args['bg_hover_gradient'];
2745
-				$rules .= $styleid . ':hover {background-image: ' . $color . ' !important;} ';
2746
-				$rules .= $styleid . '.btn:hover {border-color: transparent !important;} ';
2747
-			} else {
2748
-				$key    = 'custom-color' === $args['bg_hover'] ? 'bg_hover_color' : 'bg_hover';
2749
-				$color  = sd_get_color_from_var( $args[ $key ] );
2750
-				$rules .= $styleid . ':hover {background: ' . $color . ' !important;} ';
2751
-				$rules .= $styleid . '.btn:hover {border-color: ' . $color . ' !important;} ';
2752
-			}
2753
-		}
2754
-	}
2755
-
2756
-	return $rules ? '<style>' . $rules . '</style>' : '';
2729
+    $rules = '';
2730
+    // text color
2731
+    if ( ! empty( $args['styleid'] ) ) {
2732
+        $styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr( $args['styleid'] ) : 'html .' . esc_attr( $args['styleid'] );
2733
+
2734
+        // text
2735
+        if ( ! empty( $args['text_color_hover'] ) ) {
2736
+            $key    = 'custom' === $args['text_color_hover'] && ! empty( $args['text_color_hover_custom'] ) ? 'text_color_hover_custom' : 'text_color_hover';
2737
+            $color  = sd_get_color_from_var( $args[ $key ] );
2738
+            $rules .= $styleid . ':hover {color: ' . $color . ' !important;} ';
2739
+        }
2740
+
2741
+        // bg
2742
+        if ( ! empty( $args['bg_hover'] ) ) {
2743
+            if ( 'custom-gradient' === $args['bg_hover'] ) {
2744
+                $color  = $args['bg_hover_gradient'];
2745
+                $rules .= $styleid . ':hover {background-image: ' . $color . ' !important;} ';
2746
+                $rules .= $styleid . '.btn:hover {border-color: transparent !important;} ';
2747
+            } else {
2748
+                $key    = 'custom-color' === $args['bg_hover'] ? 'bg_hover_color' : 'bg_hover';
2749
+                $color  = sd_get_color_from_var( $args[ $key ] );
2750
+                $rules .= $styleid . ':hover {background: ' . $color . ' !important;} ';
2751
+                $rules .= $styleid . '.btn:hover {border-color: ' . $color . ' !important;} ';
2752
+            }
2753
+        }
2754
+    }
2755
+
2756
+    return $rules ? '<style>' . $rules . '</style>' : '';
2757 2757
 }
2758 2758
 
2759 2759
 /**
@@ -2765,12 +2765,12 @@  discard block
 block discarded – undo
2765 2765
  */
2766 2766
 function sd_get_color_from_var( $var ) {
2767 2767
 
2768
-	//sanitize_hex_color() @todo this does not cover transparency
2769
-	if ( strpos( $var, '#' ) === false ) {
2770
-		$var = defined( 'BLOCKSTRAP_BLOCKS_VERSION' ) ? 'var(--wp--preset--color--' . esc_attr( $var ) . ')' : 'var(--' . esc_attr( $var ) . ')';
2771
-	}
2768
+    //sanitize_hex_color() @todo this does not cover transparency
2769
+    if ( strpos( $var, '#' ) === false ) {
2770
+        $var = defined( 'BLOCKSTRAP_BLOCKS_VERSION' ) ? 'var(--wp--preset--color--' . esc_attr( $var ) . ')' : 'var(--' . esc_attr( $var ) . ')';
2771
+    }
2772 2772
 
2773
-	return $var;
2773
+    return $var;
2774 2774
 }
2775 2775
 
2776 2776
 /**
@@ -2782,19 +2782,19 @@  discard block
 block discarded – undo
2782 2782
  * @return string
2783 2783
  */
2784 2784
 function sd_sanitize_html_classes( $classes, $sep = ' ' ) {
2785
-	$return = '';
2785
+    $return = '';
2786 2786
 
2787
-	if ( ! is_array( $classes ) ) {
2788
-		$classes = explode( $sep, $classes );
2789
-	}
2787
+    if ( ! is_array( $classes ) ) {
2788
+        $classes = explode( $sep, $classes );
2789
+    }
2790 2790
 
2791
-	if ( ! empty( $classes ) ) {
2792
-		foreach ( $classes as $class ) {
2793
-			$return .= sanitize_html_class( $class ) . ' ';
2794
-		}
2795
-	}
2791
+    if ( ! empty( $classes ) ) {
2792
+        foreach ( $classes as $class ) {
2793
+            $return .= sanitize_html_class( $class ) . ' ';
2794
+        }
2795
+    }
2796 2796
 
2797
-	return $return;
2797
+    return $return;
2798 2798
 }
2799 2799
 
2800 2800
 
@@ -2804,38 +2804,38 @@  discard block
 block discarded – undo
2804 2804
  * @return void
2805 2805
  */
2806 2806
 function sd_get_class_build_keys() {
2807
-	$keys = array(
2808
-		'container',
2809
-		'position',
2810
-		'flex_direction',
2811
-		'shadow',
2812
-		'rounded',
2813
-		'nav_style',
2814
-		'horizontal_alignment',
2815
-		'nav_fill',
2816
-		'width',
2817
-		'font_weight',
2818
-		'font_size',
2819
-		'font_case',
2820
-		'css_class',
2821
-		'flex_align_items-MTD',
2822
-		'flex_justify_content-MTD',
2823
-		'flex_align_self-MTD',
2824
-		'flex_order-MTD',
2825
-		'styleid',
2826
-		'border_opacity',
2827
-		'border_width',
2828
-		'border_type',
2829
-		'opacity',
2830
-		'zindex',
2831
-		'flex_wrap-MTD',
2832
-		'h100',
2833
-		'overflow',
2834
-		'scrollbars',
2835
-		'float-MTD'
2836
-	);
2837
-
2838
-	return apply_filters( 'sd_class_build_keys', $keys );
2807
+    $keys = array(
2808
+        'container',
2809
+        'position',
2810
+        'flex_direction',
2811
+        'shadow',
2812
+        'rounded',
2813
+        'nav_style',
2814
+        'horizontal_alignment',
2815
+        'nav_fill',
2816
+        'width',
2817
+        'font_weight',
2818
+        'font_size',
2819
+        'font_case',
2820
+        'css_class',
2821
+        'flex_align_items-MTD',
2822
+        'flex_justify_content-MTD',
2823
+        'flex_align_self-MTD',
2824
+        'flex_order-MTD',
2825
+        'styleid',
2826
+        'border_opacity',
2827
+        'border_width',
2828
+        'border_type',
2829
+        'opacity',
2830
+        'zindex',
2831
+        'flex_wrap-MTD',
2832
+        'h100',
2833
+        'overflow',
2834
+        'scrollbars',
2835
+        'float-MTD'
2836
+    );
2837
+
2838
+    return apply_filters( 'sd_class_build_keys', $keys );
2839 2839
 }
2840 2840
 
2841 2841
 /**
@@ -2847,18 +2847,18 @@  discard block
 block discarded – undo
2847 2847
  * @return array
2848 2848
  */
2849 2849
 function sd_get_visibility_conditions_input( $type = 'visibility_conditions', $overwrite = array() ) {
2850
-	$defaults = array(
2851
-		'type'         => 'visibility_conditions',
2852
-		'title'        => __( 'Block Visibility', 'ayecode-connect' ),
2853
-		'button_title' => __( 'Set Block Visibility', 'ayecode-connect' ),
2854
-		'default'      => '',
2855
-		'desc_tip'     => true,
2856
-		'group'        => __( 'Visibility Conditions', 'ayecode-connect' ),
2857
-	);
2850
+    $defaults = array(
2851
+        'type'         => 'visibility_conditions',
2852
+        'title'        => __( 'Block Visibility', 'ayecode-connect' ),
2853
+        'button_title' => __( 'Set Block Visibility', 'ayecode-connect' ),
2854
+        'default'      => '',
2855
+        'desc_tip'     => true,
2856
+        'group'        => __( 'Visibility Conditions', 'ayecode-connect' ),
2857
+    );
2858 2858
 
2859
-	$input = wp_parse_args( $overwrite, $defaults );
2859
+    $input = wp_parse_args( $overwrite, $defaults );
2860 2860
 
2861
-	return $input;
2861
+    return $input;
2862 2862
 }
2863 2863
 
2864 2864
 /**
@@ -2870,21 +2870,21 @@  discard block
 block discarded – undo
2870 2870
  * @return array An array of roles.
2871 2871
  */
2872 2872
 function sd_user_roles_options( $exclude = array() ) {
2873
-	$user_roles = array();
2873
+    $user_roles = array();
2874 2874
 
2875
-	if ( !function_exists('get_editable_roles') ) {
2876
-		require_once( ABSPATH . '/wp-admin/includes/user.php' );
2877
-	}
2875
+    if ( !function_exists('get_editable_roles') ) {
2876
+        require_once( ABSPATH . '/wp-admin/includes/user.php' );
2877
+    }
2878 2878
 
2879
-	$roles = get_editable_roles();
2879
+    $roles = get_editable_roles();
2880 2880
 
2881
-	foreach ( $roles as $role => $data ) {
2882
-		if ( ! ( ! empty( $exclude ) && in_array( $role, $exclude ) ) ) {
2883
-			$user_roles[ esc_attr( $role ) ] = translate_user_role( $data['name'] );
2884
-		}
2885
-	}
2881
+    foreach ( $roles as $role => $data ) {
2882
+        if ( ! ( ! empty( $exclude ) && in_array( $role, $exclude ) ) ) {
2883
+            $user_roles[ esc_attr( $role ) ] = translate_user_role( $data['name'] );
2884
+        }
2885
+    }
2886 2886
 
2887
-	return apply_filters( 'sd_user_roles_options', $user_roles );
2887
+    return apply_filters( 'sd_user_roles_options', $user_roles );
2888 2888
 }
2889 2889
 
2890 2890
 /**
@@ -2895,18 +2895,18 @@  discard block
 block discarded – undo
2895 2895
  * @return array Rule options.
2896 2896
  */
2897 2897
 function sd_visibility_rules_options() {
2898
-	$options = array(
2899
-		'logged_in'  => __( 'Logged In', 'ayecode-connect' ),
2900
-		'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
2901
-		'post_author'  => __( 'Post Author', 'ayecode-connect' ),
2902
-		'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
2903
-	);
2898
+    $options = array(
2899
+        'logged_in'  => __( 'Logged In', 'ayecode-connect' ),
2900
+        'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
2901
+        'post_author'  => __( 'Post Author', 'ayecode-connect' ),
2902
+        'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
2903
+    );
2904 2904
 
2905
-	if ( class_exists( 'GeoDirectory' ) ) {
2906
-		$options['gd_field'] = __( 'GD Field', 'ayecode-connect' );
2907
-	}
2905
+    if ( class_exists( 'GeoDirectory' ) ) {
2906
+        $options['gd_field'] = __( 'GD Field', 'ayecode-connect' );
2907
+    }
2908 2908
 
2909
-	return apply_filters( 'sd_visibility_rules_options', $options );
2909
+    return apply_filters( 'sd_visibility_rules_options', $options );
2910 2910
 }
2911 2911
 
2912 2912
 /**
@@ -2915,39 +2915,39 @@  discard block
 block discarded – undo
2915 2915
  * @return array
2916 2916
  */
2917 2917
 function sd_visibility_gd_field_options() {
2918
-	$fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );
2918
+    $fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );
2919 2919
 
2920
-	$keys = array();
2921
-	if ( ! empty( $fields ) ) {
2922
-		foreach( $fields as $field ) {
2923
-			if ( apply_filters( 'geodir_badge_field_skip_key', false, $field ) ) {
2924
-				continue;
2925
-			}
2920
+    $keys = array();
2921
+    if ( ! empty( $fields ) ) {
2922
+        foreach( $fields as $field ) {
2923
+            if ( apply_filters( 'geodir_badge_field_skip_key', false, $field ) ) {
2924
+                continue;
2925
+            }
2926 2926
 
2927
-			$keys[ $field['htmlvar_name'] ] = $field['htmlvar_name'] . ' ( ' . __( $field['admin_title'], 'geodirectory' ) . ' )';
2927
+            $keys[ $field['htmlvar_name'] ] = $field['htmlvar_name'] . ' ( ' . __( $field['admin_title'], 'geodirectory' ) . ' )';
2928 2928
 
2929
-			// Extra address fields
2930
-			if ( $field['htmlvar_name'] == 'address' && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
2931
-				foreach ( $address_fields as $_field => $args ) {
2932
-					if ( $_field != 'map_directions' && $_field != 'street' ) {
2933
-						$keys[ $_field ] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2934
-					}
2935
-				}
2936
-			}
2937
-		}
2938
-	}
2929
+            // Extra address fields
2930
+            if ( $field['htmlvar_name'] == 'address' && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
2931
+                foreach ( $address_fields as $_field => $args ) {
2932
+                    if ( $_field != 'map_directions' && $_field != 'street' ) {
2933
+                        $keys[ $_field ] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2934
+                    }
2935
+                }
2936
+            }
2937
+        }
2938
+    }
2939 2939
 
2940
-	$standard_fields = sd_visibility_gd_standard_field_options();
2940
+    $standard_fields = sd_visibility_gd_standard_field_options();
2941 2941
 
2942
-	if ( ! empty( $standard_fields ) ) {
2943
-		foreach ( $standard_fields as $key => $option ) {
2944
-			$keys[ $key ] = $option;
2945
-		}
2946
-	}
2942
+    if ( ! empty( $standard_fields ) ) {
2943
+        foreach ( $standard_fields as $key => $option ) {
2944
+            $keys[ $key ] = $option;
2945
+        }
2946
+    }
2947 2947
 
2948
-	$options = apply_filters( 'geodir_badge_field_keys', $keys );
2948
+    $options = apply_filters( 'geodir_badge_field_keys', $keys );
2949 2949
 
2950
-	return apply_filters( 'sd_visibility_gd_field_options', $options );
2950
+    return apply_filters( 'sd_visibility_gd_field_options', $options );
2951 2951
 }
2952 2952
 
2953 2953
 /**
@@ -2956,17 +2956,17 @@  discard block
 block discarded – undo
2956 2956
  * @return array
2957 2957
  */
2958 2958
 function sd_visibility_gd_standard_field_options( $post_type = '' ) {
2959
-	$fields = sd_visibility_gd_standard_fields( $post_type );
2959
+    $fields = sd_visibility_gd_standard_fields( $post_type );
2960 2960
 
2961
-	$options = array();
2961
+    $options = array();
2962 2962
 
2963
-	foreach ( $fields as $key => $field ) {
2964
-		if ( ! empty( $field['frontend_title'] ) ) {
2965
-			$options[ $key ] = $key . ' ( ' . $field['frontend_title'] . ' )';
2966
-		}
2967
-	}
2963
+    foreach ( $fields as $key => $field ) {
2964
+        if ( ! empty( $field['frontend_title'] ) ) {
2965
+            $options[ $key ] = $key . ' ( ' . $field['frontend_title'] . ' )';
2966
+        }
2967
+    }
2968 2968
 
2969
-	return apply_filters( 'sd_visibility_gd_standard_field_options', $options, $fields );
2969
+    return apply_filters( 'sd_visibility_gd_standard_field_options', $options, $fields );
2970 2970
 }
2971 2971
 
2972 2972
 /**
@@ -2975,17 +2975,17 @@  discard block
 block discarded – undo
2975 2975
  * @return array
2976 2976
  */
2977 2977
 function sd_visibility_gd_standard_fields( $post_type = '' ) {
2978
-	$standard_fields = geodir_post_meta_standard_fields( $post_type );
2978
+    $standard_fields = geodir_post_meta_standard_fields( $post_type );
2979 2979
 
2980
-	$fields = array();
2980
+    $fields = array();
2981 2981
 
2982
-	foreach ( $standard_fields as $key => $field ) {
2983
-		if ( $key != 'post_link' && strpos( $key, 'event' ) === false && ! empty( $field['frontend_title'] ) ) {
2984
-			$fields[ $key ] = $field;
2985
-		}
2986
-	}
2982
+    foreach ( $standard_fields as $key => $field ) {
2983
+        if ( $key != 'post_link' && strpos( $key, 'event' ) === false && ! empty( $field['frontend_title'] ) ) {
2984
+            $fields[ $key ] = $field;
2985
+        }
2986
+    }
2987 2987
 
2988
-	return apply_filters( 'sd_visibility_gd_standard_fields', $fields );
2988
+    return apply_filters( 'sd_visibility_gd_standard_fields', $fields );
2989 2989
 }
2990 2990
 
2991 2991
 /**
@@ -2994,18 +2994,18 @@  discard block
 block discarded – undo
2994 2994
  * @return array
2995 2995
  */
2996 2996
 function sd_visibility_field_condition_options(){
2997
-	$options = array(
2998
-		'is_empty' => __( 'is empty', 'ayecode-connect' ),
2999
-		'is_not_empty' => __( 'is not empty', 'ayecode-connect' ),
3000
-		'is_equal' => __( 'is equal', 'ayecode-connect' ),
3001
-		'is_not_equal' => __( 'is not equal', 'ayecode-connect' ),
3002
-		'is_greater_than' => __( 'is greater than', 'ayecode-connect' ),
3003
-		'is_less_than' => __( 'is less than', 'ayecode-connect' ),
3004
-		'is_contains' => __( 'is contains', 'ayecode-connect' ),
3005
-		'is_not_contains' => __( 'is not contains', 'ayecode-connect' ),
3006
-	);
2997
+    $options = array(
2998
+        'is_empty' => __( 'is empty', 'ayecode-connect' ),
2999
+        'is_not_empty' => __( 'is not empty', 'ayecode-connect' ),
3000
+        'is_equal' => __( 'is equal', 'ayecode-connect' ),
3001
+        'is_not_equal' => __( 'is not equal', 'ayecode-connect' ),
3002
+        'is_greater_than' => __( 'is greater than', 'ayecode-connect' ),
3003
+        'is_less_than' => __( 'is less than', 'ayecode-connect' ),
3004
+        'is_contains' => __( 'is contains', 'ayecode-connect' ),
3005
+        'is_not_contains' => __( 'is not contains', 'ayecode-connect' ),
3006
+    );
3007 3007
 
3008
-	return apply_filters( 'sd_visibility_field_condition_options', $options );
3008
+    return apply_filters( 'sd_visibility_field_condition_options', $options );
3009 3009
 }
3010 3010
 
3011 3011
 /**
@@ -3016,14 +3016,14 @@  discard block
 block discarded – undo
3016 3016
  * @return array Template type options.
3017 3017
  */
3018 3018
 function sd_visibility_output_options() {
3019
-	$options = array(
3020
-		'hide'          => __( 'Hide Block', 'ayecode-connect' ),
3021
-		'message'       => __( 'Show Custom Message', 'ayecode-connect' ),
3022
-		'page'          => __( 'Show Page Content', 'ayecode-connect' ),
3023
-		'template_part' => __( 'Show Template Part', 'ayecode-connect' ),
3024
-	);
3019
+    $options = array(
3020
+        'hide'          => __( 'Hide Block', 'ayecode-connect' ),
3021
+        'message'       => __( 'Show Custom Message', 'ayecode-connect' ),
3022
+        'page'          => __( 'Show Page Content', 'ayecode-connect' ),
3023
+        'template_part' => __( 'Show Template Part', 'ayecode-connect' ),
3024
+    );
3025 3025
 
3026
-	return apply_filters( 'sd_visibility_output_options', $options );
3026
+    return apply_filters( 'sd_visibility_output_options', $options );
3027 3027
 }
3028 3028
 
3029 3029
 /**
@@ -3035,45 +3035,45 @@  discard block
 block discarded – undo
3035 3035
  * @return array Template page options.
3036 3036
  */
3037 3037
 function sd_template_page_options( $args = array() ) {
3038
-	global $sd_tmpl_page_options;
3038
+    global $sd_tmpl_page_options;
3039 3039
 
3040
-	if ( ! empty( $sd_tmpl_page_options ) ) {
3041
-		return $sd_tmpl_page_options;
3042
-	}
3040
+    if ( ! empty( $sd_tmpl_page_options ) ) {
3041
+        return $sd_tmpl_page_options;
3042
+    }
3043 3043
 
3044
-	$args = wp_parse_args( $args, array(
3045
-		'child_of'    => 0,
3046
-		'sort_column' => 'post_title',
3047
-		'sort_order'  => 'ASC'
3048
-	) );
3044
+    $args = wp_parse_args( $args, array(
3045
+        'child_of'    => 0,
3046
+        'sort_column' => 'post_title',
3047
+        'sort_order'  => 'ASC'
3048
+    ) );
3049 3049
 
3050
-	$exclude_pages = array();
3051
-	if ( $page_on_front = get_option( 'page_on_front' ) ) {
3052
-		$exclude_pages[] = $page_on_front;
3053
-	}
3050
+    $exclude_pages = array();
3051
+    if ( $page_on_front = get_option( 'page_on_front' ) ) {
3052
+        $exclude_pages[] = $page_on_front;
3053
+    }
3054 3054
 
3055
-	if ( $page_for_posts = get_option( 'page_for_posts' ) ) {
3056
-		$exclude_pages[] = $page_for_posts;
3057
-	}
3055
+    if ( $page_for_posts = get_option( 'page_for_posts' ) ) {
3056
+        $exclude_pages[] = $page_for_posts;
3057
+    }
3058 3058
 
3059
-	if ( ! empty( $exclude_pages ) ) {
3060
-		$args['exclude'] = $exclude_pages;
3061
-	}
3059
+    if ( ! empty( $exclude_pages ) ) {
3060
+        $args['exclude'] = $exclude_pages;
3061
+    }
3062 3062
 
3063
-	$pages = get_pages( $args );
3063
+    $pages = get_pages( $args );
3064 3064
 
3065
-	$options = array( '' => __( 'Select Page...', 'ayecode-connect' ) );
3066
-	if ( ! empty( $pages ) ) {
3067
-		foreach ( $pages as $page ) {
3068
-			if ( ! empty( $page->ID ) && ! empty( $page->post_title ) ) {
3069
-				$options[ $page->ID ] = $page->post_title . ' (#' . $page->ID . ')';
3070
-			}
3071
-		}
3072
-	}
3065
+    $options = array( '' => __( 'Select Page...', 'ayecode-connect' ) );
3066
+    if ( ! empty( $pages ) ) {
3067
+        foreach ( $pages as $page ) {
3068
+            if ( ! empty( $page->ID ) && ! empty( $page->post_title ) ) {
3069
+                $options[ $page->ID ] = $page->post_title . ' (#' . $page->ID . ')';
3070
+            }
3071
+        }
3072
+    }
3073 3073
 
3074
-	$sd_tmpl_page_options = $options;
3074
+    $sd_tmpl_page_options = $options;
3075 3075
 
3076
-	return apply_filters( 'sd_template_page_options', $options );
3076
+    return apply_filters( 'sd_template_page_options', $options );
3077 3077
 }
3078 3078
 
3079 3079
 /**
@@ -3085,25 +3085,25 @@  discard block
 block discarded – undo
3085 3085
  * @return array Template part options.
3086 3086
  */
3087 3087
 function sd_template_part_options( $args = array() ) {
3088
-	global $sd_tmpl_part_options;
3088
+    global $sd_tmpl_part_options;
3089 3089
 
3090
-	if ( ! empty( $sd_tmpl_part_options ) ) {
3091
-		return $sd_tmpl_part_options;
3092
-	}
3090
+    if ( ! empty( $sd_tmpl_part_options ) ) {
3091
+        return $sd_tmpl_part_options;
3092
+    }
3093 3093
 
3094
-	$options = array( '' => __( 'Select Template Part...', 'ayecode-connect' ) );
3094
+    $options = array( '' => __( 'Select Template Part...', 'ayecode-connect' ) );
3095 3095
 
3096
-	$parts = get_block_templates( array(), 'wp_template_part' );
3096
+    $parts = get_block_templates( array(), 'wp_template_part' );
3097 3097
 
3098
-	if ( ! empty( $parts ) ) {
3099
-		foreach ( $parts as $part ) {
3100
-			$options[ $part->slug ] = $part->title . ' (#' . $part->slug . ')';
3101
-		}
3102
-	}
3098
+    if ( ! empty( $parts ) ) {
3099
+        foreach ( $parts as $part ) {
3100
+            $options[ $part->slug ] = $part->title . ' (#' . $part->slug . ')';
3101
+        }
3102
+    }
3103 3103
 
3104
-	$sd_tmpl_part_options = $options;
3104
+    $sd_tmpl_part_options = $options;
3105 3105
 
3106
-	return apply_filters( 'sd_template_part_options', $options, $args );
3106
+    return apply_filters( 'sd_template_part_options', $options, $args );
3107 3107
 }
3108 3108
 
3109 3109
 /**
@@ -3115,25 +3115,25 @@  discard block
 block discarded – undo
3115 3115
  * @return array Template part object.
3116 3116
  */
3117 3117
 function sd_get_template_part_by_slug( $slug ) {
3118
-	global $bs_tmpl_part_by_slug;
3118
+    global $bs_tmpl_part_by_slug;
3119 3119
 
3120
-	if ( empty( $bs_tmpl_part_by_slug ) ) {
3121
-		$bs_tmpl_part_by_slug = array();
3122
-	}
3120
+    if ( empty( $bs_tmpl_part_by_slug ) ) {
3121
+        $bs_tmpl_part_by_slug = array();
3122
+    }
3123 3123
 
3124
-	if ( isset( $bs_tmpl_part_by_slug[ $slug ] ) ) {
3125
-		return $bs_tmpl_part_by_slug[ $slug ];
3126
-	}
3124
+    if ( isset( $bs_tmpl_part_by_slug[ $slug ] ) ) {
3125
+        return $bs_tmpl_part_by_slug[ $slug ];
3126
+    }
3127 3127
 
3128
-	$template_query = get_block_templates( array( 'slug__in' => array( $slug ) ), 'wp_template_part' );
3128
+    $template_query = get_block_templates( array( 'slug__in' => array( $slug ) ), 'wp_template_part' );
3129 3129
 
3130
-	$query_post = ! empty( $template_query ) ? $template_query[0] : array();
3130
+    $query_post = ! empty( $template_query ) ? $template_query[0] : array();
3131 3131
 
3132
-	$template_part = ! empty( $query_post ) && $query_post->status == 'publish' ? $query_post : array();
3132
+    $template_part = ! empty( $query_post ) && $query_post->status == 'publish' ? $query_post : array();
3133 3133
 
3134
-	$bs_tmpl_part_by_slug[ $slug ] = $template_part;
3134
+    $bs_tmpl_part_by_slug[ $slug ] = $template_part;
3135 3135
 
3136
-	return apply_filters( 'sd_get_template_part_by_slug', $template_part, $slug );
3136
+    return apply_filters( 'sd_get_template_part_by_slug', $template_part, $slug );
3137 3137
 }
3138 3138
 
3139 3139
 /**
@@ -3146,428 +3146,428 @@  discard block
 block discarded – undo
3146 3146
  * @param WP_Block $instance      The block instance.
3147 3147
  */
3148 3148
 function sd_render_block( $block_content, $block, $instance = '' ) {
3149
-	// No block visibility conditions set.
3150
-	if ( empty( $block['attrs']['visibility_conditions'] ) ) {
3151
-		return $block_content;
3152
-	}
3153
-
3154
-	$attributes = json_decode( $block['attrs']['visibility_conditions'], true );
3155
-	$rules = ! empty( $attributes ) ? sd_block_parse_rules( $attributes ) : array();
3156
-
3157
-	// No rules set.
3158
-	if ( empty( $rules ) ) {
3159
-		return $block_content;
3160
-	}
3161
-
3162
-	$_block_content = $block_content;
3163
-
3164
-	if ( ! empty( $rules ) && sd_block_check_rules( $rules ) ) {
3165
-		if ( ! empty( $attributes['output']['type'] ) ) {
3166
-			switch ( $attributes['output']['type'] ) {
3167
-				case 'hide':
3168
-					$valid_type = true;
3169
-					$content = '';
3170
-
3171
-					break;
3172
-				case 'message':
3173
-					$valid_type = true;
3174
-
3175
-					if ( isset( $attributes['output']['message'] ) ) {
3176
-						$content = $attributes['output']['message'] != '' ? __( stripslashes( $attributes['output']['message'] ), 'ayecode-connect' ) : $attributes['output']['message'];
3177
-
3178
-						if ( ! empty( $attributes['output']['message_type'] ) ) {
3179
-							$content = aui()->alert( array(
3180
-									'type'=> $attributes['output']['message_type'],
3181
-									'content'=> $content
3182
-								)
3183
-							);
3184
-						}
3185
-					}
3186
-
3187
-					break;
3188
-				case 'page':
3189
-					$valid_type = true;
3190
-
3191
-					$page_id = ! empty( $attributes['output']['page'] ) ? absint( $attributes['output']['page'] ) : 0;
3192
-					$content = sd_get_page_content( $page_id );
3193
-
3194
-					break;
3195
-				case 'template_part':
3196
-					$valid_type = true;
3197
-
3198
-					$template_part = ! empty( $attributes['output']['template_part'] ) ? $attributes['output']['template_part'] : '';
3199
-					$content = sd_get_template_part_content( $template_part );
3200
-
3201
-					break;
3202
-				default:
3203
-					$valid_type = false;
3204
-					break;
3205
-			}
3206
-
3207
-			if ( $valid_type ) {
3208
-				$block_content = '<div class="' . esc_attr( wp_get_block_default_classname( $instance->name ) ) . ' sd-block-has-rule">' . $content . '</div>';
3209
-			}
3210
-		}
3211
-	}
3212
-
3213
-	return apply_filters( 'sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance );
3149
+    // No block visibility conditions set.
3150
+    if ( empty( $block['attrs']['visibility_conditions'] ) ) {
3151
+        return $block_content;
3152
+    }
3153
+
3154
+    $attributes = json_decode( $block['attrs']['visibility_conditions'], true );
3155
+    $rules = ! empty( $attributes ) ? sd_block_parse_rules( $attributes ) : array();
3156
+
3157
+    // No rules set.
3158
+    if ( empty( $rules ) ) {
3159
+        return $block_content;
3160
+    }
3161
+
3162
+    $_block_content = $block_content;
3163
+
3164
+    if ( ! empty( $rules ) && sd_block_check_rules( $rules ) ) {
3165
+        if ( ! empty( $attributes['output']['type'] ) ) {
3166
+            switch ( $attributes['output']['type'] ) {
3167
+                case 'hide':
3168
+                    $valid_type = true;
3169
+                    $content = '';
3170
+
3171
+                    break;
3172
+                case 'message':
3173
+                    $valid_type = true;
3174
+
3175
+                    if ( isset( $attributes['output']['message'] ) ) {
3176
+                        $content = $attributes['output']['message'] != '' ? __( stripslashes( $attributes['output']['message'] ), 'ayecode-connect' ) : $attributes['output']['message'];
3177
+
3178
+                        if ( ! empty( $attributes['output']['message_type'] ) ) {
3179
+                            $content = aui()->alert( array(
3180
+                                    'type'=> $attributes['output']['message_type'],
3181
+                                    'content'=> $content
3182
+                                )
3183
+                            );
3184
+                        }
3185
+                    }
3186
+
3187
+                    break;
3188
+                case 'page':
3189
+                    $valid_type = true;
3190
+
3191
+                    $page_id = ! empty( $attributes['output']['page'] ) ? absint( $attributes['output']['page'] ) : 0;
3192
+                    $content = sd_get_page_content( $page_id );
3193
+
3194
+                    break;
3195
+                case 'template_part':
3196
+                    $valid_type = true;
3197
+
3198
+                    $template_part = ! empty( $attributes['output']['template_part'] ) ? $attributes['output']['template_part'] : '';
3199
+                    $content = sd_get_template_part_content( $template_part );
3200
+
3201
+                    break;
3202
+                default:
3203
+                    $valid_type = false;
3204
+                    break;
3205
+            }
3206
+
3207
+            if ( $valid_type ) {
3208
+                $block_content = '<div class="' . esc_attr( wp_get_block_default_classname( $instance->name ) ) . ' sd-block-has-rule">' . $content . '</div>';
3209
+            }
3210
+        }
3211
+    }
3212
+
3213
+    return apply_filters( 'sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance );
3214 3214
 }
3215 3215
 add_filter( 'render_block', 'sd_render_block', 9, 3 );
3216 3216
 
3217 3217
 function sd_get_page_content( $page_id ) {
3218
-	$content = $page_id > 0 ? get_post_field( 'post_content', (int) $page_id ) : '';
3218
+    $content = $page_id > 0 ? get_post_field( 'post_content', (int) $page_id ) : '';
3219 3219
 
3220
-	// Maybe bypass content
3221
-	$bypass_content = apply_filters( 'sd_bypass_page_content', '', $content, $page_id );
3222
-	if ( $bypass_content ) {
3223
-		return $bypass_content;
3224
-	}
3220
+    // Maybe bypass content
3221
+    $bypass_content = apply_filters( 'sd_bypass_page_content', '', $content, $page_id );
3222
+    if ( $bypass_content ) {
3223
+        return $bypass_content;
3224
+    }
3225 3225
 
3226
-	// Run the shortcodes on the content.
3227
-	$content = do_shortcode( $content );
3226
+    // Run the shortcodes on the content.
3227
+    $content = do_shortcode( $content );
3228 3228
 
3229
-	// Run block content if its available.
3230
-	if ( function_exists( 'do_blocks' ) ) {
3231
-		$content = do_blocks( $content );
3232
-	}
3229
+    // Run block content if its available.
3230
+    if ( function_exists( 'do_blocks' ) ) {
3231
+        $content = do_blocks( $content );
3232
+    }
3233 3233
 
3234
-	return apply_filters( 'sd_get_page_content', $content, $page_id );
3234
+    return apply_filters( 'sd_get_page_content', $content, $page_id );
3235 3235
 }
3236 3236
 
3237 3237
 function sd_get_template_part_content( $template_part ) {
3238
-	$template_part_post = $template_part ? sd_get_template_part_by_slug( $template_part ) : array();
3239
-	$content = ! empty( $template_part_post ) ? $template_part_post->content : '';
3238
+    $template_part_post = $template_part ? sd_get_template_part_by_slug( $template_part ) : array();
3239
+    $content = ! empty( $template_part_post ) ? $template_part_post->content : '';
3240 3240
 
3241
-	// Maybe bypass content
3242
-	$bypass_content = apply_filters( 'sd_bypass_template_part_content', '', $content, $template_part );
3243
-	if ( $bypass_content ) {
3244
-		return $bypass_content;
3245
-	}
3241
+    // Maybe bypass content
3242
+    $bypass_content = apply_filters( 'sd_bypass_template_part_content', '', $content, $template_part );
3243
+    if ( $bypass_content ) {
3244
+        return $bypass_content;
3245
+    }
3246 3246
 
3247
-	// Run the shortcodes on the content.
3248
-	$content = do_shortcode( $content );
3247
+    // Run the shortcodes on the content.
3248
+    $content = do_shortcode( $content );
3249 3249
 
3250
-	// Run block content if its available.
3251
-	if ( function_exists( 'do_blocks' ) ) {
3252
-		$content = do_blocks( $content );
3253
-	}
3250
+    // Run block content if its available.
3251
+    if ( function_exists( 'do_blocks' ) ) {
3252
+        $content = do_blocks( $content );
3253
+    }
3254 3254
 
3255
-	return apply_filters( 'sd_get_template_part_content', $content, $template_part );
3255
+    return apply_filters( 'sd_get_template_part_content', $content, $template_part );
3256 3256
 }
3257 3257
 
3258 3258
 function sd_block_parse_rules( $attrs ) {
3259
-	$rules = array();
3259
+    $rules = array();
3260 3260
 
3261
-	if ( ! empty( $attrs ) && is_array( $attrs ) ) {
3262
-		$attrs_keys = array_keys( $attrs );
3261
+    if ( ! empty( $attrs ) && is_array( $attrs ) ) {
3262
+        $attrs_keys = array_keys( $attrs );
3263 3263
 
3264
-		for ( $i = 1; $i <= count( $attrs_keys ); $i++ ) {
3265
-			if ( ! empty( $attrs[ 'rule' . $i ] ) && is_array( $attrs[ 'rule' . $i ] ) ) {
3266
-				$rules[] = $attrs[ 'rule' . $i ];
3267
-			}
3268
-		}
3269
-	}
3264
+        for ( $i = 1; $i <= count( $attrs_keys ); $i++ ) {
3265
+            if ( ! empty( $attrs[ 'rule' . $i ] ) && is_array( $attrs[ 'rule' . $i ] ) ) {
3266
+                $rules[] = $attrs[ 'rule' . $i ];
3267
+            }
3268
+        }
3269
+    }
3270 3270
 
3271
-	return apply_filters( 'sd_block_parse_rules', $rules, $attrs );
3271
+    return apply_filters( 'sd_block_parse_rules', $rules, $attrs );
3272 3272
 }
3273 3273
 
3274 3274
 function sd_block_check_rules( $rules ) {
3275
-	if ( ! ( is_array( $rules ) && ! empty( $rules ) ) ) {
3276
-		return true;
3277
-	}
3275
+    if ( ! ( is_array( $rules ) && ! empty( $rules ) ) ) {
3276
+        return true;
3277
+    }
3278 3278
 
3279
-	foreach ( $rules as $key => $rule ) {
3280
-		$match = apply_filters( 'sd_block_check_rule', true, $rule );
3279
+    foreach ( $rules as $key => $rule ) {
3280
+        $match = apply_filters( 'sd_block_check_rule', true, $rule );
3281 3281
 
3282
-		if ( ! $match ) {
3283
-			break;
3284
-		}
3285
-	}
3282
+        if ( ! $match ) {
3283
+            break;
3284
+        }
3285
+    }
3286 3286
 
3287
-	return apply_filters( 'sd_block_check_rules', $match, $rules );
3287
+    return apply_filters( 'sd_block_check_rules', $match, $rules );
3288 3288
 }
3289 3289
 
3290 3290
 function sd_block_check_rule( $match, $rule ) {
3291
-	global $post;
3291
+    global $post;
3292 3292
 
3293
-	if ( $match && ! empty( $rule['type'] ) ) {
3294
-		switch ( $rule['type'] ) {
3295
-			case 'logged_in':
3296
-				$match = (bool) is_user_logged_in();
3293
+    if ( $match && ! empty( $rule['type'] ) ) {
3294
+        switch ( $rule['type'] ) {
3295
+            case 'logged_in':
3296
+                $match = (bool) is_user_logged_in();
3297 3297
 
3298
-				break;
3299
-			case 'logged_out':
3300
-				$match = ! is_user_logged_in();
3298
+                break;
3299
+            case 'logged_out':
3300
+                $match = ! is_user_logged_in();
3301 3301
 
3302
-				break;
3303
-			case 'post_author':
3304
-				if ( ! empty( $post ) && $post->post_type != 'page' && ! empty( $post->post_author ) && is_user_logged_in() ) {
3305
-					$match = (int) $post->post_author === (int) get_current_user_id() ? true : false;
3306
-				} else {
3307
-					$match = false;
3308
-				}
3302
+                break;
3303
+            case 'post_author':
3304
+                if ( ! empty( $post ) && $post->post_type != 'page' && ! empty( $post->post_author ) && is_user_logged_in() ) {
3305
+                    $match = (int) $post->post_author === (int) get_current_user_id() ? true : false;
3306
+                } else {
3307
+                    $match = false;
3308
+                }
3309 3309
 
3310
-				break;
3311
-			case 'user_roles':
3312
-				$match = false;
3310
+                break;
3311
+            case 'user_roles':
3312
+                $match = false;
3313 3313
 
3314
-				if ( ! empty( $rule['user_roles'] ) ) {
3315
-					$user_roles = is_scalar( $rule['user_roles'] ) ? explode( ",", $rule['user_roles'] ) : $rule['user_roles'];
3314
+                if ( ! empty( $rule['user_roles'] ) ) {
3315
+                    $user_roles = is_scalar( $rule['user_roles'] ) ? explode( ",", $rule['user_roles'] ) : $rule['user_roles'];
3316 3316
 
3317
-					if ( is_array( $user_roles ) ) {
3318
-						$user_roles = array_filter( array_map( 'trim', $user_roles ) );
3319
-					}
3317
+                    if ( is_array( $user_roles ) ) {
3318
+                        $user_roles = array_filter( array_map( 'trim', $user_roles ) );
3319
+                    }
3320 3320
 
3321
-					if ( ! empty( $user_roles ) && is_array( $user_roles ) && is_user_logged_in() && ( $current_user = wp_get_current_user() ) ) {
3322
-						$current_user_roles = $current_user->roles;
3321
+                    if ( ! empty( $user_roles ) && is_array( $user_roles ) && is_user_logged_in() && ( $current_user = wp_get_current_user() ) ) {
3322
+                        $current_user_roles = $current_user->roles;
3323 3323
 
3324
-						foreach ( $user_roles as $role ) {
3325
-							if ( in_array( $role, $current_user_roles ) ) {
3326
-								$match = true;
3327
-							}
3328
-						}
3329
-					}
3330
-				}
3324
+                        foreach ( $user_roles as $role ) {
3325
+                            if ( in_array( $role, $current_user_roles ) ) {
3326
+                                $match = true;
3327
+                            }
3328
+                        }
3329
+                    }
3330
+                }
3331 3331
 
3332
-				break;
3333
-			case 'gd_field':
3334
-				$match = sd_block_check_rule_gd_field( $rule );
3332
+                break;
3333
+            case 'gd_field':
3334
+                $match = sd_block_check_rule_gd_field( $rule );
3335 3335
 
3336
-				break;
3337
-		}
3338
-	}
3336
+                break;
3337
+        }
3338
+    }
3339 3339
 
3340
-	return $match;
3340
+    return $match;
3341 3341
 }
3342 3342
 add_filter( 'sd_block_check_rule', 'sd_block_check_rule', 10, 2 );
3343 3343
 
3344 3344
 function sd_block_check_rule_gd_field( $rule ) {
3345
-	global $gd_post;
3346
-
3347
-	$match_found = false;
3348
-
3349
-	if ( class_exists( 'GeoDirectory' ) && ! empty( $gd_post->ID ) && ! empty( $rule['field'] ) && ! empty( $rule['condition'] ) ) {
3350
-		$args['block_visibility'] = true;
3351
-		$args['key'] = $rule['field'];
3352
-		$args['condition'] = $rule['condition'];
3353
-		$args['search'] = isset( $rule['search'] ) ? $rule['search'] : '';
3354
-
3355
-		if ( $args['key'] == 'street' ) {
3356
-			$args['key'] = 'address';
3357
-		}
3358
-
3359
-		$match_field = $_match_field = $args['key'];
3360
-
3361
-		if ( $match_field == 'address' ) {
3362
-			$match_field = 'street';
3363
-		} elseif ( $match_field == 'post_images' ) {
3364
-			$match_field = 'featured_image';
3365
-		}
3366
-
3367
-		$find_post = $gd_post;
3368
-		$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3369
-
3370
-		if ( ! empty( $find_post->ID ) && ! in_array( 'post_category', $find_post_keys ) ) {
3371
-			$find_post = geodir_get_post_info( (int) $find_post->ID );
3372
-			$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3373
-		}
3374
-
3375
-		if ( $match_field === '' || ( ! empty( $find_post_keys ) && ( in_array( $match_field, $find_post_keys ) || in_array( $_match_field, $find_post_keys ) ) ) ) {
3376
-			$address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
3377
-			$field = array();
3378
-			$empty_field = false;
3379
-
3380
-			$standard_fields = sd_visibility_gd_standard_fields();
3381
-
3382
-			if ( $match_field && ! in_array( $match_field, array_keys( $standard_fields ) ) && ! in_array( $match_field, $address_fields ) ) {
3383
-				$package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
3384
-				$fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );
3385
-
3386
-				foreach ( $fields as $field_info ) {
3387
-					if ( $match_field == $field_info['htmlvar_name'] ) {
3388
-						$field = $field_info;
3389
-						break;
3390
-					} elseif( $_match_field == $field_info['htmlvar_name'] ) {
3391
-						$field = $field_info;
3392
-						break;
3393
-					}
3394
-				}
3395
-
3396
-				if ( empty( $field ) ) {
3397
-					$empty_field = true;
3398
-				}
3399
-			}
3400
-
3401
-			// Address fields.
3402
-			if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
3403
-				if ( ! empty( $address_fields[ $match_field ] ) ) {
3404
-					$field = $address_fields[ $match_field ];
3405
-				}
3406
-			} else if ( in_array( $match_field, array_keys( $standard_fields ) ) ) {
3407
-				if ( ! empty( $standard_fields[ $match_field ] ) ) {
3408
-					$field = $standard_fields[ $match_field ];
3409
-				}
3410
-			}
3411
-
3412
-			// Parse search.
3413
-			$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3414
-
3415
-			$is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
3416
-			$is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );
3417
-
3418
-			$match_value = isset( $find_post->{$match_field} ) && empty( $empty_field ) ? esc_attr( trim( $find_post->{$match_field} ) ) : '';
3419
-			$match_found = $match_field === '' ? true : false;
3420
-
3421
-			if ( ! $match_found ) {
3422
-				if ( ( $match_field == 'post_date' || $match_field == 'post_modified' ) && ( empty( $args['condition'] ) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than' ) ) {
3423
-					if ( strpos( $search, '+' ) === false && strpos( $search, '-' ) === false ) {
3424
-						$search = '+' . $search;
3425
-					}
3426
-					$the_time = $match_field == 'post_modified' ? get_the_modified_date( 'Y-m-d', $find_post ) : get_the_time( 'Y-m-d', $find_post );
3427
-					$until_time = strtotime( $the_time . ' ' . $search . ' days' );
3428
-					$now_time   = strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) );
3429
-					if ( ( empty( $args['condition'] ) || $args['condition'] == 'is_less_than' ) && $until_time > $now_time ) {
3430
-						$match_found = true;
3431
-					} elseif ( $args['condition'] == 'is_greater_than' && $until_time < $now_time ) {
3432
-						$match_found = true;
3433
-					}
3434
-				} else {
3435
-					switch ( $args['condition'] ) {
3436
-						case 'is_equal':
3437
-							$match_found = (bool) ( $search != '' && $match_value == $search );
3438
-							break;
3439
-						case 'is_not_equal':
3440
-							$match_found = (bool) ( $search != '' && $match_value != $search );
3441
-							break;
3442
-						case 'is_greater_than':
3443
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value > $search );
3444
-							break;
3445
-						case 'is_less_than':
3446
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value < $search );
3447
-							break;
3448
-						case 'is_empty':
3449
-							$match_found = (bool) ( $match_value === '' || $match_value === false || $match_value === '0' || is_null( $match_value ) );
3450
-							break;
3451
-						case 'is_not_empty':
3452
-							$match_found = (bool) ( $match_value !== '' && $match_value !== false && $match_value !== '0' && ! is_null( $match_value ) );
3453
-							break;
3454
-						case 'is_contains':
3455
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) !== false );
3456
-							break;
3457
-						case 'is_not_contains':
3458
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) === false );
3459
-							break;
3460
-					}
3461
-				}
3462
-			}
3463
-
3464
-			$match_found = apply_filters( 'geodir_post_badge_check_match_found', $match_found, $args, $find_post );
3465
-		} else {
3466
-			$field = array();
3467
-
3468
-			// Parse search.
3469
-			$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3470
-
3471
-			$match_value = '';
3472
-			$match_found = $match_field === '' ? true : false;
3473
-
3474
-			if ( ! $match_found ) {
3475
-				switch ( $args['condition'] ) {
3476
-					case 'is_equal':
3477
-						$match_found = (bool) ( $search != '' && $match_value == $search );
3478
-						break;
3479
-					case 'is_not_equal':
3480
-						$match_found = (bool) ( $search != '' && $match_value != $search );
3481
-						break;
3482
-					case 'is_greater_than':
3483
-						$match_found = false;
3484
-						break;
3485
-					case 'is_less_than':
3486
-						$match_found = false;
3487
-						break;
3488
-					case 'is_empty':
3489
-						$match_found = true;
3490
-						break;
3491
-					case 'is_not_empty':
3492
-						$match_found = false;
3493
-						break;
3494
-					case 'is_contains':
3495
-						$match_found = false;
3496
-						break;
3497
-					case 'is_not_contains':
3498
-						$match_found = false;
3499
-						break;
3500
-				}
3501
-			}
3502
-
3503
-			$match_found = apply_filters( 'geodir_post_badge_check_match_found_empty', $match_found, $args, $find_post );
3504
-		}
3505
-	}
3506
-
3507
-	return $match_found;
3345
+    global $gd_post;
3346
+
3347
+    $match_found = false;
3348
+
3349
+    if ( class_exists( 'GeoDirectory' ) && ! empty( $gd_post->ID ) && ! empty( $rule['field'] ) && ! empty( $rule['condition'] ) ) {
3350
+        $args['block_visibility'] = true;
3351
+        $args['key'] = $rule['field'];
3352
+        $args['condition'] = $rule['condition'];
3353
+        $args['search'] = isset( $rule['search'] ) ? $rule['search'] : '';
3354
+
3355
+        if ( $args['key'] == 'street' ) {
3356
+            $args['key'] = 'address';
3357
+        }
3358
+
3359
+        $match_field = $_match_field = $args['key'];
3360
+
3361
+        if ( $match_field == 'address' ) {
3362
+            $match_field = 'street';
3363
+        } elseif ( $match_field == 'post_images' ) {
3364
+            $match_field = 'featured_image';
3365
+        }
3366
+
3367
+        $find_post = $gd_post;
3368
+        $find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3369
+
3370
+        if ( ! empty( $find_post->ID ) && ! in_array( 'post_category', $find_post_keys ) ) {
3371
+            $find_post = geodir_get_post_info( (int) $find_post->ID );
3372
+            $find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3373
+        }
3374
+
3375
+        if ( $match_field === '' || ( ! empty( $find_post_keys ) && ( in_array( $match_field, $find_post_keys ) || in_array( $_match_field, $find_post_keys ) ) ) ) {
3376
+            $address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
3377
+            $field = array();
3378
+            $empty_field = false;
3379
+
3380
+            $standard_fields = sd_visibility_gd_standard_fields();
3381
+
3382
+            if ( $match_field && ! in_array( $match_field, array_keys( $standard_fields ) ) && ! in_array( $match_field, $address_fields ) ) {
3383
+                $package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
3384
+                $fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );
3385
+
3386
+                foreach ( $fields as $field_info ) {
3387
+                    if ( $match_field == $field_info['htmlvar_name'] ) {
3388
+                        $field = $field_info;
3389
+                        break;
3390
+                    } elseif( $_match_field == $field_info['htmlvar_name'] ) {
3391
+                        $field = $field_info;
3392
+                        break;
3393
+                    }
3394
+                }
3395
+
3396
+                if ( empty( $field ) ) {
3397
+                    $empty_field = true;
3398
+                }
3399
+            }
3400
+
3401
+            // Address fields.
3402
+            if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
3403
+                if ( ! empty( $address_fields[ $match_field ] ) ) {
3404
+                    $field = $address_fields[ $match_field ];
3405
+                }
3406
+            } else if ( in_array( $match_field, array_keys( $standard_fields ) ) ) {
3407
+                if ( ! empty( $standard_fields[ $match_field ] ) ) {
3408
+                    $field = $standard_fields[ $match_field ];
3409
+                }
3410
+            }
3411
+
3412
+            // Parse search.
3413
+            $search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3414
+
3415
+            $is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
3416
+            $is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );
3417
+
3418
+            $match_value = isset( $find_post->{$match_field} ) && empty( $empty_field ) ? esc_attr( trim( $find_post->{$match_field} ) ) : '';
3419
+            $match_found = $match_field === '' ? true : false;
3420
+
3421
+            if ( ! $match_found ) {
3422
+                if ( ( $match_field == 'post_date' || $match_field == 'post_modified' ) && ( empty( $args['condition'] ) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than' ) ) {
3423
+                    if ( strpos( $search, '+' ) === false && strpos( $search, '-' ) === false ) {
3424
+                        $search = '+' . $search;
3425
+                    }
3426
+                    $the_time = $match_field == 'post_modified' ? get_the_modified_date( 'Y-m-d', $find_post ) : get_the_time( 'Y-m-d', $find_post );
3427
+                    $until_time = strtotime( $the_time . ' ' . $search . ' days' );
3428
+                    $now_time   = strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) );
3429
+                    if ( ( empty( $args['condition'] ) || $args['condition'] == 'is_less_than' ) && $until_time > $now_time ) {
3430
+                        $match_found = true;
3431
+                    } elseif ( $args['condition'] == 'is_greater_than' && $until_time < $now_time ) {
3432
+                        $match_found = true;
3433
+                    }
3434
+                } else {
3435
+                    switch ( $args['condition'] ) {
3436
+                        case 'is_equal':
3437
+                            $match_found = (bool) ( $search != '' && $match_value == $search );
3438
+                            break;
3439
+                        case 'is_not_equal':
3440
+                            $match_found = (bool) ( $search != '' && $match_value != $search );
3441
+                            break;
3442
+                        case 'is_greater_than':
3443
+                            $match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value > $search );
3444
+                            break;
3445
+                        case 'is_less_than':
3446
+                            $match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value < $search );
3447
+                            break;
3448
+                        case 'is_empty':
3449
+                            $match_found = (bool) ( $match_value === '' || $match_value === false || $match_value === '0' || is_null( $match_value ) );
3450
+                            break;
3451
+                        case 'is_not_empty':
3452
+                            $match_found = (bool) ( $match_value !== '' && $match_value !== false && $match_value !== '0' && ! is_null( $match_value ) );
3453
+                            break;
3454
+                        case 'is_contains':
3455
+                            $match_found = (bool) ( $search != '' && stripos( $match_value, $search ) !== false );
3456
+                            break;
3457
+                        case 'is_not_contains':
3458
+                            $match_found = (bool) ( $search != '' && stripos( $match_value, $search ) === false );
3459
+                            break;
3460
+                    }
3461
+                }
3462
+            }
3463
+
3464
+            $match_found = apply_filters( 'geodir_post_badge_check_match_found', $match_found, $args, $find_post );
3465
+        } else {
3466
+            $field = array();
3467
+
3468
+            // Parse search.
3469
+            $search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3470
+
3471
+            $match_value = '';
3472
+            $match_found = $match_field === '' ? true : false;
3473
+
3474
+            if ( ! $match_found ) {
3475
+                switch ( $args['condition'] ) {
3476
+                    case 'is_equal':
3477
+                        $match_found = (bool) ( $search != '' && $match_value == $search );
3478
+                        break;
3479
+                    case 'is_not_equal':
3480
+                        $match_found = (bool) ( $search != '' && $match_value != $search );
3481
+                        break;
3482
+                    case 'is_greater_than':
3483
+                        $match_found = false;
3484
+                        break;
3485
+                    case 'is_less_than':
3486
+                        $match_found = false;
3487
+                        break;
3488
+                    case 'is_empty':
3489
+                        $match_found = true;
3490
+                        break;
3491
+                    case 'is_not_empty':
3492
+                        $match_found = false;
3493
+                        break;
3494
+                    case 'is_contains':
3495
+                        $match_found = false;
3496
+                        break;
3497
+                    case 'is_not_contains':
3498
+                        $match_found = false;
3499
+                        break;
3500
+                }
3501
+            }
3502
+
3503
+            $match_found = apply_filters( 'geodir_post_badge_check_match_found_empty', $match_found, $args, $find_post );
3504
+        }
3505
+    }
3506
+
3507
+    return $match_found;
3508 3508
 }
3509 3509
 
3510 3510
 function sd_gd_field_rule_search( $search, $post_type, $rule, $field = array(), $gd_post = array() ) {
3511
-	global $post;
3512
-
3513
-	if ( ! $search ) {
3514
-		return $search;
3515
-	}
3516
-
3517
-	$orig_search = $search;
3518
-	$_search = strtolower( $search );
3519
-
3520
-	if ( ! empty( $rule['field'] ) && $rule['field'] == 'post_author' ) {
3521
-		if ( $search == 'current_user' ) {
3522
-			$search = is_user_logged_in() ? (int) get_current_user_id() : - 1;
3523
-		} else if ( $search == 'current_author' ) {
3524
-			$search = ( ! empty( $post ) && $post->post_type != 'page' && isset( $post->post_author ) ) ? absint( $post->post_author ) : - 1;
3525
-		}
3526
-	} else if ( $_search == 'date_today' ) {
3527
-		$search = date( 'Y-m-d' );
3528
-	} else if ( $_search == 'date_tomorrow' ) {
3529
-		$search = date( 'Y-m-d', strtotime( "+1 day" ) );
3530
-	} else if ( $_search == 'date_yesterday' ) {
3531
-		$search = date( 'Y-m-d', strtotime( "-1 day" ) );
3532
-	} else if ( $_search == 'time_his' ) {
3533
-		$search = date( 'H:i:s' );
3534
-	} else if ( $_search == 'time_hi' ) {
3535
-		$search = date( 'H:i' );
3536
-	} else if ( $_search == 'datetime_now' ) {
3537
-		$search = date( 'Y-m-d H:i:s' );
3538
-	} else if ( strpos( $_search, 'datetime_after_' ) === 0 ) {
3539
-		$_searches = explode( 'datetime_after_', $_search, 2 );
3540
-
3541
-		if ( ! empty( $_searches[1] ) ) {
3542
-			$search = date( 'Y-m-d H:i:s', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3543
-		} else {
3544
-			$search = date( 'Y-m-d H:i:s' );
3545
-		}
3546
-	} else if ( strpos( $_search, 'datetime_before_' ) === 0 ) {
3547
-		$_searches = explode( 'datetime_before_', $_search, 2 );
3548
-
3549
-		if ( ! empty( $_searches[1] ) ) {
3550
-			$search = date( 'Y-m-d H:i:s', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3551
-		} else {
3552
-			$search = date( 'Y-m-d H:i:s' );
3553
-		}
3554
-	} else if ( strpos( $_search, 'date_after_' ) === 0 ) {
3555
-		$_searches = explode( 'date_after_', $_search, 2 );
3556
-
3557
-		if ( ! empty( $_searches[1] ) ) {
3558
-			$search = date( 'Y-m-d', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3559
-		} else {
3560
-			$search = date( 'Y-m-d' );
3561
-		}
3562
-	} else if ( strpos( $_search, 'date_before_' ) === 0 ) {
3563
-		$_searches = explode( 'date_before_', $_search, 2 );
3564
-
3565
-		if ( ! empty( $_searches[1] ) ) {
3566
-			$search = date( 'Y-m-d', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3567
-		} else {
3568
-			$search = date( 'Y-m-d' );
3569
-		}
3570
-	}
3571
-
3572
-	return apply_filters( 'sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search );
3511
+    global $post;
3512
+
3513
+    if ( ! $search ) {
3514
+        return $search;
3515
+    }
3516
+
3517
+    $orig_search = $search;
3518
+    $_search = strtolower( $search );
3519
+
3520
+    if ( ! empty( $rule['field'] ) && $rule['field'] == 'post_author' ) {
3521
+        if ( $search == 'current_user' ) {
3522
+            $search = is_user_logged_in() ? (int) get_current_user_id() : - 1;
3523
+        } else if ( $search == 'current_author' ) {
3524
+            $search = ( ! empty( $post ) && $post->post_type != 'page' && isset( $post->post_author ) ) ? absint( $post->post_author ) : - 1;
3525
+        }
3526
+    } else if ( $_search == 'date_today' ) {
3527
+        $search = date( 'Y-m-d' );
3528
+    } else if ( $_search == 'date_tomorrow' ) {
3529
+        $search = date( 'Y-m-d', strtotime( "+1 day" ) );
3530
+    } else if ( $_search == 'date_yesterday' ) {
3531
+        $search = date( 'Y-m-d', strtotime( "-1 day" ) );
3532
+    } else if ( $_search == 'time_his' ) {
3533
+        $search = date( 'H:i:s' );
3534
+    } else if ( $_search == 'time_hi' ) {
3535
+        $search = date( 'H:i' );
3536
+    } else if ( $_search == 'datetime_now' ) {
3537
+        $search = date( 'Y-m-d H:i:s' );
3538
+    } else if ( strpos( $_search, 'datetime_after_' ) === 0 ) {
3539
+        $_searches = explode( 'datetime_after_', $_search, 2 );
3540
+
3541
+        if ( ! empty( $_searches[1] ) ) {
3542
+            $search = date( 'Y-m-d H:i:s', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3543
+        } else {
3544
+            $search = date( 'Y-m-d H:i:s' );
3545
+        }
3546
+    } else if ( strpos( $_search, 'datetime_before_' ) === 0 ) {
3547
+        $_searches = explode( 'datetime_before_', $_search, 2 );
3548
+
3549
+        if ( ! empty( $_searches[1] ) ) {
3550
+            $search = date( 'Y-m-d H:i:s', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3551
+        } else {
3552
+            $search = date( 'Y-m-d H:i:s' );
3553
+        }
3554
+    } else if ( strpos( $_search, 'date_after_' ) === 0 ) {
3555
+        $_searches = explode( 'date_after_', $_search, 2 );
3556
+
3557
+        if ( ! empty( $_searches[1] ) ) {
3558
+            $search = date( 'Y-m-d', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3559
+        } else {
3560
+            $search = date( 'Y-m-d' );
3561
+        }
3562
+    } else if ( strpos( $_search, 'date_before_' ) === 0 ) {
3563
+        $_searches = explode( 'date_before_', $_search, 2 );
3564
+
3565
+        if ( ! empty( $_searches[1] ) ) {
3566
+            $search = date( 'Y-m-d', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3567
+        } else {
3568
+            $search = date( 'Y-m-d' );
3569
+        }
3570
+    }
3571
+
3572
+    return apply_filters( 'sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search );
3573 3573
 }
Please login to merge, or discard this patch.
Spacing   +998 added lines, -998 removed lines patch added patch discarded remove patch
@@ -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
 
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
  *
50 50
  * @return array
51 51
  */
52
-function sd_get_margin_input( $type = 'mt', $overwrite = array(), $include_negatives = true ) {
52
+function sd_get_margin_input($type = 'mt', $overwrite = array(), $include_negatives = true) {
53 53
 	global $aui_bs5;
54 54
 	$options = array(
55
-		''     => __( 'None', 'ayecode-connect' ),
56
-		'auto' => __( 'auto', 'ayecode-connect' ),
55
+		''     => __('None', 'ayecode-connect'),
56
+		'auto' => __('auto', 'ayecode-connect'),
57 57
 		'0'    => '0',
58 58
 		'1'    => '1',
59 59
 		'2'    => '2',
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		'12'   => '12',
70 70
 	);
71 71
 
72
-	if ( $include_negatives ) {
72
+	if ($include_negatives) {
73 73
 		$options['n1']  = '-1';
74 74
 		$options['n2']  = '-2';
75 75
 		$options['n3']  = '-3';
@@ -86,37 +86,37 @@  discard block
 block discarded – undo
86 86
 
87 87
 	$defaults = array(
88 88
 		'type'     => 'select',
89
-		'title'    => __( 'Margin top', 'ayecode-connect' ),
89
+		'title'    => __('Margin top', 'ayecode-connect'),
90 90
 		'options'  => $options,
91 91
 		'default'  => '',
92 92
 		'desc_tip' => true,
93
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
93
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
94 94
 	);
95 95
 
96 96
 	// title
97
-	if ( $type == 'mt' ) {
98
-		$defaults['title'] = __( 'Margin top', 'ayecode-connect' );
97
+	if ($type == 'mt') {
98
+		$defaults['title'] = __('Margin top', 'ayecode-connect');
99 99
 		$defaults['icon']  = 'box-top';
100 100
 		$defaults['row']   = array(
101
-			'title' => __( 'Margins', 'ayecode-connect' ),
101
+			'title' => __('Margins', 'ayecode-connect'),
102 102
 			'key'   => 'wrapper-margins',
103 103
 			'open'  => true,
104 104
 			'class' => 'text-center',
105 105
 		);
106
-	} elseif ( $type == 'mr' ) {
107
-		$defaults['title'] = __( 'Margin right', 'ayecode-connect' );
106
+	} elseif ($type == 'mr') {
107
+		$defaults['title'] = __('Margin right', 'ayecode-connect');
108 108
 		$defaults['icon']  = 'box-right';
109 109
 		$defaults['row']   = array(
110 110
 			'key' => 'wrapper-margins',
111 111
 		);
112
-	} elseif ( $type == 'mb' ) {
113
-		$defaults['title'] = __( 'Margin bottom', 'ayecode-connect' );
112
+	} elseif ($type == 'mb') {
113
+		$defaults['title'] = __('Margin bottom', 'ayecode-connect');
114 114
 		$defaults['icon']  = 'box-bottom';
115 115
 		$defaults['row']   = array(
116 116
 			'key' => 'wrapper-margins',
117 117
 		);
118
-	} elseif ( $type == 'ml' ) {
119
-		$defaults['title'] = __( 'Margin left', 'ayecode-connect' );
118
+	} elseif ($type == 'ml') {
119
+		$defaults['title'] = __('Margin left', 'ayecode-connect');
120 120
 		$defaults['icon']  = 'box-left';
121 121
 		$defaults['row']   = array(
122 122
 			'key'   => 'wrapper-margins',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		);
125 125
 	}
126 126
 
127
-	$input = wp_parse_args( $overwrite, $defaults );
127
+	$input = wp_parse_args($overwrite, $defaults);
128 128
 
129 129
 	return $input;
130 130
 }
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
  *
138 138
  * @return array
139 139
  */
140
-function sd_get_padding_input( $type = 'pt', $overwrite = array() ) {
140
+function sd_get_padding_input($type = 'pt', $overwrite = array()) {
141 141
 	$options = array(
142
-		''   => __( 'None', 'ayecode-connect' ),
142
+		''   => __('None', 'ayecode-connect'),
143 143
 		'0'  => '0',
144 144
 		'1'  => '1',
145 145
 		'2'  => '2',
@@ -157,37 +157,37 @@  discard block
 block discarded – undo
157 157
 
158 158
 	$defaults = array(
159 159
 		'type'     => 'select',
160
-		'title'    => __( 'Padding top', 'ayecode-connect' ),
160
+		'title'    => __('Padding top', 'ayecode-connect'),
161 161
 		'options'  => $options,
162 162
 		'default'  => '',
163 163
 		'desc_tip' => true,
164
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
164
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
165 165
 	);
166 166
 
167 167
 	// title
168
-	if ( $type == 'pt' ) {
169
-		$defaults['title'] = __( 'Padding top', 'ayecode-connect' );
168
+	if ($type == 'pt') {
169
+		$defaults['title'] = __('Padding top', 'ayecode-connect');
170 170
 		$defaults['icon']  = 'box-top';
171 171
 		$defaults['row']   = array(
172
-			'title' => __( 'Padding', 'ayecode-connect' ),
172
+			'title' => __('Padding', 'ayecode-connect'),
173 173
 			'key'   => 'wrapper-padding',
174 174
 			'open'  => true,
175 175
 			'class' => 'text-center',
176 176
 		);
177
-	} elseif ( $type == 'pr' ) {
178
-		$defaults['title'] = __( 'Padding right', 'ayecode-connect' );
177
+	} elseif ($type == 'pr') {
178
+		$defaults['title'] = __('Padding right', 'ayecode-connect');
179 179
 		$defaults['icon']  = 'box-right';
180 180
 		$defaults['row']   = array(
181 181
 			'key' => 'wrapper-padding',
182 182
 		);
183
-	} elseif ( $type == 'pb' ) {
184
-		$defaults['title'] = __( 'Padding bottom', 'ayecode-connect' );
183
+	} elseif ($type == 'pb') {
184
+		$defaults['title'] = __('Padding bottom', 'ayecode-connect');
185 185
 		$defaults['icon']  = 'box-bottom';
186 186
 		$defaults['row']   = array(
187 187
 			'key' => 'wrapper-padding',
188 188
 		);
189
-	} elseif ( $type == 'pl' ) {
190
-		$defaults['title'] = __( 'Padding left', 'ayecode-connect' );
189
+	} elseif ($type == 'pl') {
190
+		$defaults['title'] = __('Padding left', 'ayecode-connect');
191 191
 		$defaults['icon']  = 'box-left';
192 192
 		$defaults['row']   = array(
193 193
 			'key'   => 'wrapper-padding',
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		);
197 197
 	}
198 198
 
199
-	$input = wp_parse_args( $overwrite, $defaults );
199
+	$input = wp_parse_args($overwrite, $defaults);
200 200
 
201 201
 	return $input;
202 202
 }
@@ -209,23 +209,23 @@  discard block
 block discarded – undo
209 209
  *
210 210
  * @return array
211 211
  */
212
-function sd_get_border_input( $type = 'border', $overwrite = array() ) {
212
+function sd_get_border_input($type = 'border', $overwrite = array()) {
213 213
 	global $aui_bs5;
214 214
 
215 215
 	$defaults = array(
216 216
 		'type'     => 'select',
217
-		'title'    => __( 'Border', 'ayecode-connect' ),
217
+		'title'    => __('Border', 'ayecode-connect'),
218 218
 		'options'  => array(),
219 219
 		'default'  => '',
220 220
 		'desc_tip' => true,
221
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
221
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
222 222
 	);
223 223
 
224 224
 	// title
225
-	if ( 'rounded' === $type ) {
226
-		$defaults['title']           = __( 'Border radius type', 'ayecode-connect' );
225
+	if ('rounded' === $type) {
226
+		$defaults['title']           = __('Border radius type', 'ayecode-connect');
227 227
 		$defaults['options']         = array(
228
-			''               => __( 'Default', 'ayecode-connect' ),
228
+			''               => __('Default', 'ayecode-connect'),
229 229
 			'rounded'        => 'rounded',
230 230
 			'rounded-top'    => 'rounded-top',
231 231
 			'rounded-right'  => 'rounded-right',
@@ -233,12 +233,12 @@  discard block
 block discarded – undo
233 233
 			'rounded-left'   => 'rounded-left',
234 234
 		);
235 235
 		$defaults['element_require'] = '[%border%]';
236
-	} elseif ( 'rounded_size' === $type ) {
237
-		$defaults['title'] = __( 'Border radius size', 'ayecode-connect' );
236
+	} elseif ('rounded_size' === $type) {
237
+		$defaults['title'] = __('Border radius size', 'ayecode-connect');
238 238
 
239
-		if ( $aui_bs5 ) {
239
+		if ($aui_bs5) {
240 240
 			$defaults['options'] = array(
241
-				''       => __( 'Default', 'ayecode-connect' ),
241
+				''       => __('Default', 'ayecode-connect'),
242 242
 				'0'      => '0',
243 243
 				'1'      => '1',
244 244
 				'2'      => '2',
@@ -249,56 +249,56 @@  discard block
 block discarded – undo
249 249
 			);
250 250
 		} else {
251 251
 			$defaults['options'] = array(
252
-				''   => __( 'Default', 'ayecode-connect' ),
253
-				'sm' => __( 'Small', 'ayecode-connect' ),
254
-				'lg' => __( 'Large', 'ayecode-connect' ),
252
+				''   => __('Default', 'ayecode-connect'),
253
+				'sm' => __('Small', 'ayecode-connect'),
254
+				'lg' => __('Large', 'ayecode-connect'),
255 255
 			);
256 256
 		}
257 257
 		$defaults['element_require'] = '[%border%]';
258
-	} elseif ( 'width' === $type ) { // BS%
259
-		$defaults['title']           = __( 'Border width', 'ayecode-connect' );
258
+	} elseif ('width' === $type) { // BS%
259
+		$defaults['title']           = __('Border width', 'ayecode-connect');
260 260
 		$defaults['options']         = array(
261
-			''         => __( 'Default', 'ayecode-connect' ),
261
+			''         => __('Default', 'ayecode-connect'),
262 262
 			'border-2' => '2',
263 263
 			'border-3' => '3',
264 264
 			'border-4' => '4',
265 265
 			'border-5' => '5',
266 266
 		);
267 267
 		$defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
268
-	} elseif ( 'opacity' === $type ) { // BS%
269
-		$defaults['title']           = __( 'Border opacity', 'ayecode-connect' );
268
+	} elseif ('opacity' === $type) { // BS%
269
+		$defaults['title']           = __('Border opacity', 'ayecode-connect');
270 270
 		$defaults['options']         = array(
271
-			''                  => __( 'Default', 'ayecode-connect' ),
271
+			''                  => __('Default', 'ayecode-connect'),
272 272
 			'border-opacity-75' => '75%',
273 273
 			'border-opacity-50' => '50%',
274 274
 			'border-opacity-25' => '25%',
275 275
 			'border-opacity-10' => '10%',
276 276
 		);
277 277
 		$defaults['element_require'] = $aui_bs5 ? '[%border%]' : '1==2';
278
-	} elseif ( 'type' === $type ) {
279
-		$defaults['title']           = __( 'Border show', 'ayecode-connect' );
278
+	} elseif ('type' === $type) {
279
+		$defaults['title']           = __('Border show', 'ayecode-connect');
280 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' ),
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 290
 		);
291 291
 		$defaults['element_require'] = '[%border%]';
292 292
 
293 293
 	} else {
294
-		$defaults['title']   = __( 'Border color', 'ayecode-connect' );
294
+		$defaults['title']   = __('Border color', 'ayecode-connect');
295 295
 		$defaults['options'] = array(
296
-			                       ''  => __( 'Default', 'ayecode-connect' ),
297
-			                       '0' => __( 'None', 'ayecode-connect' ),
296
+			                       ''  => __('Default', 'ayecode-connect'),
297
+			                       '0' => __('None', 'ayecode-connect'),
298 298
 		                       ) + sd_aui_colors();
299 299
 	}
300 300
 
301
-	$input = wp_parse_args( $overwrite, $defaults );
301
+	$input = wp_parse_args($overwrite, $defaults);
302 302
 
303 303
 	return $input;
304 304
 }
@@ -311,24 +311,24 @@  discard block
 block discarded – undo
311 311
  *
312 312
  * @return array
313 313
  */
314
-function sd_get_shadow_input( $type = 'shadow', $overwrite = array() ) {
314
+function sd_get_shadow_input($type = 'shadow', $overwrite = array()) {
315 315
 	$options = array(
316
-		''          => __( 'None', 'ayecode-connect' ),
317
-		'shadow-sm' => __( 'Small', 'ayecode-connect' ),
318
-		'shadow'    => __( 'Regular', 'ayecode-connect' ),
319
-		'shadow-lg' => __( 'Large', 'ayecode-connect' ),
316
+		''          => __('None', 'ayecode-connect'),
317
+		'shadow-sm' => __('Small', 'ayecode-connect'),
318
+		'shadow'    => __('Regular', 'ayecode-connect'),
319
+		'shadow-lg' => __('Large', 'ayecode-connect'),
320 320
 	);
321 321
 
322 322
 	$defaults = array(
323 323
 		'type'     => 'select',
324
-		'title'    => __( 'Shadow', 'ayecode-connect' ),
324
+		'title'    => __('Shadow', 'ayecode-connect'),
325 325
 		'options'  => $options,
326 326
 		'default'  => '',
327 327
 		'desc_tip' => true,
328
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
328
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
329 329
 	);
330 330
 
331
-	$input = wp_parse_args( $overwrite, $defaults );
331
+	$input = wp_parse_args($overwrite, $defaults);
332 332
 
333 333
 	return $input;
334 334
 }
@@ -341,22 +341,22 @@  discard block
 block discarded – undo
341 341
  *
342 342
  * @return array
343 343
  */
344
-function sd_get_background_input( $type = 'bg', $overwrite = array() ) {
344
+function sd_get_background_input($type = 'bg', $overwrite = array()) {
345 345
 	$options = array(
346
-		           ''            => __( 'None', 'ayecode-connect' ),
347
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
346
+		           ''            => __('None', 'ayecode-connect'),
347
+		           'transparent' => __('Transparent', 'ayecode-connect'),
348 348
 	           ) + sd_aui_colors();
349 349
 
350 350
 	$defaults = array(
351 351
 		'type'     => 'select',
352
-		'title'    => __( 'Background color', 'ayecode-connect' ),
352
+		'title'    => __('Background color', 'ayecode-connect'),
353 353
 		'options'  => $options,
354 354
 		'default'  => '',
355 355
 		'desc_tip' => true,
356
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
356
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
357 357
 	);
358 358
 
359
-	$input = wp_parse_args( $overwrite, $defaults );
359
+	$input = wp_parse_args($overwrite, $defaults);
360 360
 
361 361
 	return $input;
362 362
 }
@@ -369,9 +369,9 @@  discard block
 block discarded – undo
369 369
  *
370 370
  * @return array
371 371
  */
372
-function sd_get_opacity_input( $type = 'opacity', $overwrite = array() ) {
372
+function sd_get_opacity_input($type = 'opacity', $overwrite = array()) {
373 373
 	$options = array(
374
-		''            => __( 'Default', 'ayecode-connect' ),
374
+		''            => __('Default', 'ayecode-connect'),
375 375
 		'opacity-10'  => '10%',
376 376
 		'opacity-15'  => '15%',
377 377
 		'opacity-25'  => '25%',
@@ -389,14 +389,14 @@  discard block
 block discarded – undo
389 389
 
390 390
 	$defaults = array(
391 391
 		'type'     => 'select',
392
-		'title'    => __( 'Opacity', 'ayecode-connect' ),
392
+		'title'    => __('Opacity', 'ayecode-connect'),
393 393
 		'options'  => $options,
394 394
 		'default'  => '',
395 395
 		'desc_tip' => true,
396
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
396
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
397 397
 	);
398 398
 
399
-	$input = wp_parse_args( $overwrite, $defaults );
399
+	$input = wp_parse_args($overwrite, $defaults);
400 400
 
401 401
 	return $input;
402 402
 }
@@ -409,102 +409,102 @@  discard block
 block discarded – undo
409 409
  *
410 410
  * @return array
411 411
  */
412
-function sd_get_background_inputs( $type = 'bg', $overwrite = array(), $overwrite_color = array(), $overwrite_gradient = array(), $overwrite_image = array(), $include_button_colors = false ) {
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();
414
+	$color_options = $include_button_colors ? sd_aui_colors(false, true, true, true) : sd_aui_colors();
415 415
 
416 416
 	$options = array(
417
-		           ''            => __( 'None', 'ayecode-connect' ),
418
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
417
+		           ''            => __('None', 'ayecode-connect'),
418
+		           'transparent' => __('Transparent', 'ayecode-connect'),
419 419
 	           ) + $color_options;
420 420
 
421
-	if ( false !== $overwrite_color ) {
422
-		$options['custom-color'] = __( 'Custom Color', 'ayecode-connect' );
421
+	if (false !== $overwrite_color) {
422
+		$options['custom-color'] = __('Custom Color', 'ayecode-connect');
423 423
 	}
424 424
 
425
-	if ( false !== $overwrite_gradient ) {
426
-		$options['custom-gradient'] = __( 'Custom Gradient', 'ayecode-connect' );
425
+	if (false !== $overwrite_gradient) {
426
+		$options['custom-gradient'] = __('Custom Gradient', 'ayecode-connect');
427 427
 	}
428 428
 
429 429
 	$defaults = array(
430 430
 		'type'     => 'select',
431
-		'title'    => __( 'Background Color', 'ayecode-connect' ),
431
+		'title'    => __('Background Color', 'ayecode-connect'),
432 432
 		'options'  => $options,
433 433
 		'default'  => '',
434 434
 		'desc_tip' => true,
435
-		'group'    => __( 'Background', 'ayecode-connect' ),
435
+		'group'    => __('Background', 'ayecode-connect'),
436 436
 	);
437 437
 
438
-	if ( $overwrite !== false ) {
439
-		$input[ $type ] = wp_parse_args( $overwrite, $defaults );
438
+	if ($overwrite !== false) {
439
+		$input[$type] = wp_parse_args($overwrite, $defaults);
440 440
 	}
441 441
 
442
-	if ( $overwrite_color !== false ) {
443
-		$input[ $type . '_color' ] = wp_parse_args(
442
+	if ($overwrite_color !== false) {
443
+		$input[$type . '_color'] = wp_parse_args(
444 444
 			$overwrite_color,
445 445
 			array(
446 446
 				'type'            => 'color',
447
-				'title'           => __( 'Custom color', 'ayecode-connect' ),
447
+				'title'           => __('Custom color', 'ayecode-connect'),
448 448
 				'placeholder'     => '',
449 449
 				'default'         => '#0073aa',
450 450
 				'desc_tip'        => true,
451
-				'group'           => __( 'Background', 'ayecode-connect' ),
451
+				'group'           => __('Background', 'ayecode-connect'),
452 452
 				'element_require' => '[%' . $type . '%]=="custom-color"',
453 453
 			)
454 454
 		);
455 455
 	}
456 456
 
457
-	if ( $overwrite_gradient !== false ) {
458
-		$input[ $type . '_gradient' ] = wp_parse_args(
457
+	if ($overwrite_gradient !== false) {
458
+		$input[$type . '_gradient'] = wp_parse_args(
459 459
 			$overwrite_gradient,
460 460
 			array(
461 461
 				'type'            => 'gradient',
462
-				'title'           => __( 'Custom gradient', 'ayecode-connect' ),
462
+				'title'           => __('Custom gradient', 'ayecode-connect'),
463 463
 				'placeholder'     => '',
464 464
 				'default'         => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
465 465
 				'desc_tip'        => true,
466
-				'group'           => __( 'Background', 'ayecode-connect' ),
466
+				'group'           => __('Background', 'ayecode-connect'),
467 467
 				'element_require' => '[%' . $type . '%]=="custom-gradient"',
468 468
 			)
469 469
 		);
470 470
 	}
471 471
 
472
-	if ( $overwrite_image !== false ) {
472
+	if ($overwrite_image !== false) {
473 473
 
474
-		$input[ $type . '_image_fixed' ] = array(
474
+		$input[$type . '_image_fixed'] = array(
475 475
 			'type'            => 'checkbox',
476
-			'title'           => __( 'Fixed background', 'ayecode-connect' ),
476
+			'title'           => __('Fixed background', 'ayecode-connect'),
477 477
 			'default'         => '',
478 478
 			'desc_tip'        => true,
479
-			'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
479
+			'group'           => !empty($overwrite_image['group']) ? $overwrite_image['group'] : __('Background', 'ayecode-connect'),
480 480
 			'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
481 481
 
482 482
 		);
483 483
 
484
-		$input[ $type . '_image_use_featured' ] = array(
484
+		$input[$type . '_image_use_featured'] = array(
485 485
 			'type'            => 'checkbox',
486
-			'title'           => __( 'Use featured image', 'ayecode-connect' ),
486
+			'title'           => __('Use featured image', 'ayecode-connect'),
487 487
 			'default'         => '',
488 488
 			'desc_tip'        => true,
489
-			'group'           => ! empty( $overwrite_image['group'] ) ? $overwrite_image['group'] : __( 'Background', 'ayecode-connect' ),
489
+			'group'           => !empty($overwrite_image['group']) ? $overwrite_image['group'] : __('Background', 'ayecode-connect'),
490 490
 			'element_require' => '( [%' . $type . '%]=="" || [%' . $type . '%]=="custom-color" || [%' . $type . '%]=="custom-gradient" || [%' . $type . '%]=="transparent" )',
491 491
 
492 492
 		);
493 493
 
494
-		$input[ $type . '_image' ] = wp_parse_args(
494
+		$input[$type . '_image'] = wp_parse_args(
495 495
 			$overwrite_image,
496 496
 			array(
497 497
 				'type'        => 'image',
498
-				'title'       => __( 'Custom image', 'ayecode-connect' ),
498
+				'title'       => __('Custom image', 'ayecode-connect'),
499 499
 				'placeholder' => '',
500 500
 				'default'     => '',
501 501
 				'desc_tip'    => true,
502
-				'group'       => __( 'Background', 'ayecode-connect' ),
502
+				'group'       => __('Background', 'ayecode-connect'),
503 503
 				//          'element_require' => ' ![%' . $type . '_image_use_featured%] '
504 504
 			)
505 505
 		);
506 506
 
507
-		$input[ $type . '_image_id' ] = wp_parse_args(
507
+		$input[$type . '_image_id'] = wp_parse_args(
508 508
 			$overwrite_image,
509 509
 			array(
510 510
 				'type'        => 'hidden',
@@ -512,18 +512,18 @@  discard block
 block discarded – undo
512 512
 				'title'       => '',
513 513
 				'placeholder' => '',
514 514
 				'default'     => '',
515
-				'group'       => __( 'Background', 'ayecode-connect' ),
515
+				'group'       => __('Background', 'ayecode-connect'),
516 516
 			)
517 517
 		);
518 518
 
519
-		$input[ $type . '_image_xy' ] = wp_parse_args(
519
+		$input[$type . '_image_xy'] = wp_parse_args(
520 520
 			$overwrite_image,
521 521
 			array(
522 522
 				'type'        => 'image_xy',
523 523
 				'title'       => '',
524 524
 				'placeholder' => '',
525 525
 				'default'     => '',
526
-				'group'       => __( 'Background', 'ayecode-connect' ),
526
+				'group'       => __('Background', 'ayecode-connect'),
527 527
 			)
528 528
 		);
529 529
 	}
@@ -539,102 +539,102 @@  discard block
 block discarded – undo
539 539
  *
540 540
  * @return array
541 541
  */
542
-function sd_get_shape_divider_inputs( $type = 'sd', $overwrite = array(), $overwrite_color = array(), $overwrite_gradient = array(), $overwrite_image = array() ) {
542
+function sd_get_shape_divider_inputs($type = 'sd', $overwrite = array(), $overwrite_color = array(), $overwrite_gradient = array(), $overwrite_image = array()) {
543 543
 
544 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' ),
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 564
 	);
565 565
 
566 566
 	$defaults = array(
567 567
 		'type'     => 'select',
568
-		'title'    => __( 'Type', 'ayecode-connect' ),
568
+		'title'    => __('Type', 'ayecode-connect'),
569 569
 		'options'  => $options,
570 570
 		'default'  => '',
571 571
 		'desc_tip' => true,
572
-		'group'    => __( 'Shape Divider', 'ayecode-connect' ),
572
+		'group'    => __('Shape Divider', 'ayecode-connect'),
573 573
 	);
574 574
 
575
-	$input[ $type ] = wp_parse_args( $overwrite, $defaults );
575
+	$input[$type] = wp_parse_args($overwrite, $defaults);
576 576
 
577
-	$input[ $type . '_notice' ] = array(
577
+	$input[$type . '_notice'] = array(
578 578
 		'type'            => 'notice',
579
-		'desc'            => __( 'Parent element must be position `relative`', 'ayecode-connect' ),
579
+		'desc'            => __('Parent element must be position `relative`', 'ayecode-connect'),
580 580
 		'status'          => 'warning',
581
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
581
+		'group'           => __('Shape Divider', 'ayecode-connect'),
582 582
 		'element_require' => '[%' . $type . '%]!=""',
583 583
 	);
584 584
 
585
-	$input[ $type . '_position' ] = wp_parse_args(
585
+	$input[$type . '_position'] = wp_parse_args(
586 586
 		$overwrite_color,
587 587
 		array(
588 588
 			'type'            => 'select',
589
-			'title'           => __( 'Position', 'ayecode-connect' ),
589
+			'title'           => __('Position', 'ayecode-connect'),
590 590
 			'options'         => array(
591
-				'top'    => __( 'Top', 'ayecode-connect' ),
592
-				'bottom' => __( 'Bottom', 'ayecode-connect' ),
591
+				'top'    => __('Top', 'ayecode-connect'),
592
+				'bottom' => __('Bottom', 'ayecode-connect'),
593 593
 			),
594 594
 			'desc_tip'        => true,
595
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
595
+			'group'           => __('Shape Divider', 'ayecode-connect'),
596 596
 			'element_require' => '[%' . $type . '%]!=""',
597 597
 		)
598 598
 	);
599 599
 
600 600
 	$options = array(
601
-		           ''            => __( 'None', 'ayecode-connect' ),
602
-		           'transparent' => __( 'Transparent', 'ayecode-connect' ),
601
+		           ''            => __('None', 'ayecode-connect'),
602
+		           'transparent' => __('Transparent', 'ayecode-connect'),
603 603
 	           ) + sd_aui_colors()
604 604
 	           + array(
605
-		           'custom-color' => __( 'Custom Color', 'ayecode-connect' ),
605
+		           'custom-color' => __('Custom Color', 'ayecode-connect'),
606 606
 	           );
607 607
 
608
-	$input[ $type . '_color' ] = wp_parse_args(
608
+	$input[$type . '_color'] = wp_parse_args(
609 609
 		$overwrite_color,
610 610
 		array(
611 611
 			'type'            => 'select',
612
-			'title'           => __( 'Color', 'ayecode-connect' ),
612
+			'title'           => __('Color', 'ayecode-connect'),
613 613
 			'options'         => $options,
614 614
 			'desc_tip'        => true,
615
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
615
+			'group'           => __('Shape Divider', 'ayecode-connect'),
616 616
 			'element_require' => '[%' . $type . '%]!=""',
617 617
 		)
618 618
 	);
619 619
 
620
-	$input[ $type . '_custom_color' ] = wp_parse_args(
620
+	$input[$type . '_custom_color'] = wp_parse_args(
621 621
 		$overwrite_color,
622 622
 		array(
623 623
 			'type'            => 'color',
624
-			'title'           => __( 'Custom color', 'ayecode-connect' ),
624
+			'title'           => __('Custom color', 'ayecode-connect'),
625 625
 			'placeholder'     => '',
626 626
 			'default'         => '#0073aa',
627 627
 			'desc_tip'        => true,
628
-			'group'           => __( 'Shape Divider', 'ayecode-connect' ),
628
+			'group'           => __('Shape Divider', 'ayecode-connect'),
629 629
 			'element_require' => '[%' . $type . '_color%]=="custom-color" && [%' . $type . '%]!=""',
630 630
 		)
631 631
 	);
632 632
 
633
-	$input[ $type . '_width' ] = wp_parse_args(
633
+	$input[$type . '_width'] = wp_parse_args(
634 634
 		$overwrite_gradient,
635 635
 		array(
636 636
 			'type'              => 'range',
637
-			'title'             => __( 'Width', 'ayecode-connect' ),
637
+			'title'             => __('Width', 'ayecode-connect'),
638 638
 			'placeholder'       => '',
639 639
 			'default'           => '200',
640 640
 			'desc_tip'          => true,
@@ -642,69 +642,69 @@  discard block
 block discarded – undo
642 642
 				'min' => 100,
643 643
 				'max' => 300,
644 644
 			),
645
-			'group'             => __( 'Shape Divider', 'ayecode-connect' ),
645
+			'group'             => __('Shape Divider', 'ayecode-connect'),
646 646
 			'element_require'   => '[%' . $type . '%]!=""',
647 647
 		)
648 648
 	);
649 649
 
650
-	$input[ $type . '_height' ] = array(
650
+	$input[$type . '_height'] = array(
651 651
 		'type'              => 'range',
652
-		'title'             => __( 'Height', 'ayecode-connect' ),
652
+		'title'             => __('Height', 'ayecode-connect'),
653 653
 		'default'           => '100',
654 654
 		'desc_tip'          => true,
655 655
 		'custom_attributes' => array(
656 656
 			'min' => 0,
657 657
 			'max' => 500,
658 658
 		),
659
-		'group'             => __( 'Shape Divider', 'ayecode-connect' ),
659
+		'group'             => __('Shape Divider', 'ayecode-connect'),
660 660
 		'element_require'   => '[%' . $type . '%]!=""',
661 661
 	);
662 662
 
663 663
 	$requires = array(
664
-		'mountains'             => array( 'flip' ),
665
-		'drops'                 => array( 'flip', 'invert' ),
666
-		'clouds'                => array( 'flip', 'invert' ),
664
+		'mountains'             => array('flip'),
665
+		'drops'                 => array('flip', 'invert'),
666
+		'clouds'                => array('flip', 'invert'),
667 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' ),
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 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' ),
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 682
 	);
683 683
 
684
-	$input[ $type . '_flip' ] = array(
684
+	$input[$type . '_flip'] = array(
685 685
 		'type'            => 'checkbox',
686
-		'title'           => __( 'Flip', 'ayecode-connect' ),
686
+		'title'           => __('Flip', 'ayecode-connect'),
687 687
 		'default'         => '',
688 688
 		'desc_tip'        => true,
689
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
690
-		'element_require' => sd_get_element_require_string( $requires, 'flip', 'sd' ),
689
+		'group'           => __('Shape Divider', 'ayecode-connect'),
690
+		'element_require' => sd_get_element_require_string($requires, 'flip', 'sd'),
691 691
 	);
692 692
 
693
-	$input[ $type . '_invert' ] = array(
693
+	$input[$type . '_invert'] = array(
694 694
 		'type'            => 'checkbox',
695
-		'title'           => __( 'Invert', 'ayecode-connect' ),
695
+		'title'           => __('Invert', 'ayecode-connect'),
696 696
 		'default'         => '',
697 697
 		'desc_tip'        => true,
698
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
699
-		'element_require' => sd_get_element_require_string( $requires, 'invert', 'sd' ),
698
+		'group'           => __('Shape Divider', 'ayecode-connect'),
699
+		'element_require' => sd_get_element_require_string($requires, 'invert', 'sd'),
700 700
 	);
701 701
 
702
-	$input[ $type . '_btf' ] = array(
702
+	$input[$type . '_btf'] = array(
703 703
 		'type'            => 'checkbox',
704
-		'title'           => __( 'Bring to front', 'ayecode-connect' ),
704
+		'title'           => __('Bring to front', 'ayecode-connect'),
705 705
 		'default'         => '',
706 706
 		'desc_tip'        => true,
707
-		'group'           => __( 'Shape Divider', 'ayecode-connect' ),
707
+		'group'           => __('Shape Divider', 'ayecode-connect'),
708 708
 		'element_require' => '[%' . $type . '%]!=""',
709 709
 
710 710
 	);
@@ -721,19 +721,19 @@  discard block
 block discarded – undo
721 721
  *
722 722
  * @return string
723 723
  */
724
-function sd_get_element_require_string( $args, $key, $type ) {
724
+function sd_get_element_require_string($args, $key, $type) {
725 725
 	$output   = '';
726 726
 	$requires = array();
727 727
 
728
-	if ( ! empty( $args ) ) {
729
-		foreach ( $args as $t => $k ) {
730
-			if ( in_array( $key, $k ) ) {
728
+	if (!empty($args)) {
729
+		foreach ($args as $t => $k) {
730
+			if (in_array($key, $k)) {
731 731
 				$requires[] = '[%' . $type . '%]=="' . $t . '"';
732 732
 			}
733 733
 		}
734 734
 
735
-		if ( ! empty( $requires ) ) {
736
-			$output = '(' . implode( ' || ', $requires ) . ')';
735
+		if (!empty($requires)) {
736
+			$output = '(' . implode(' || ', $requires) . ')';
737 737
 		}
738 738
 	}
739 739
 
@@ -748,39 +748,39 @@  discard block
 block discarded – undo
748 748
  *
749 749
  * @return array
750 750
  */
751
-function sd_get_text_color_input( $type = 'text_color', $overwrite = array(), $has_custom = false ) {
751
+function sd_get_text_color_input($type = 'text_color', $overwrite = array(), $has_custom = false) {
752 752
 	$options = array(
753
-		           '' => __( 'None', 'ayecode-connect' ),
753
+		           '' => __('None', 'ayecode-connect'),
754 754
 	           ) + sd_aui_colors();
755 755
 
756
-	if ( $has_custom ) {
757
-		$options['custom'] = __( 'Custom color', 'ayecode-connect' );
756
+	if ($has_custom) {
757
+		$options['custom'] = __('Custom color', 'ayecode-connect');
758 758
 	}
759 759
 
760 760
 	$defaults = array(
761 761
 		'type'     => 'select',
762
-		'title'    => __( 'Text color', 'ayecode-connect' ),
762
+		'title'    => __('Text color', 'ayecode-connect'),
763 763
 		'options'  => $options,
764 764
 		'default'  => '',
765 765
 		'desc_tip' => true,
766
-		'group'    => __( 'Typography', 'ayecode-connect' ),
766
+		'group'    => __('Typography', 'ayecode-connect'),
767 767
 	);
768 768
 
769
-	$input = wp_parse_args( $overwrite, $defaults );
769
+	$input = wp_parse_args($overwrite, $defaults);
770 770
 
771 771
 	return $input;
772 772
 }
773 773
 
774
-function sd_get_text_color_input_group( $type = 'text_color', $overwrite = array(), $overwrite_custom = array() ) {
774
+function sd_get_text_color_input_group($type = 'text_color', $overwrite = array(), $overwrite_custom = array()) {
775 775
 	$inputs = array();
776 776
 
777
-	if ( $overwrite !== false ) {
778
-		$inputs[ $type ] = sd_get_text_color_input( $type, $overwrite, true );
777
+	if ($overwrite !== false) {
778
+		$inputs[$type] = sd_get_text_color_input($type, $overwrite, true);
779 779
 	}
780 780
 
781
-	if ( $overwrite_custom !== false ) {
781
+	if ($overwrite_custom !== false) {
782 782
 		$custom            = $type . '_custom';
783
-		$inputs[ $custom ] = sd_get_custom_color_input( $custom, $overwrite_custom, $type );
783
+		$inputs[$custom] = sd_get_custom_color_input($custom, $overwrite_custom, $type);
784 784
 	}
785 785
 
786 786
 	return $inputs;
@@ -794,22 +794,22 @@  discard block
 block discarded – undo
794 794
  *
795 795
  * @return array
796 796
  */
797
-function sd_get_custom_color_input( $type = 'color_custom', $overwrite = array(), $parent_type = '' ) {
797
+function sd_get_custom_color_input($type = 'color_custom', $overwrite = array(), $parent_type = '') {
798 798
 
799 799
 	$defaults = array(
800 800
 		'type'        => 'color',
801
-		'title'       => __( 'Custom color', 'ayecode-connect' ),
801
+		'title'       => __('Custom color', 'ayecode-connect'),
802 802
 		'default'     => '',
803 803
 		'placeholder' => '',
804 804
 		'desc_tip'    => true,
805
-		'group'       => __( 'Typography', 'ayecode-connect' ),
805
+		'group'       => __('Typography', 'ayecode-connect'),
806 806
 	);
807 807
 
808
-	if ( $parent_type ) {
808
+	if ($parent_type) {
809 809
 		$defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
810 810
 	}
811 811
 
812
-	$input = wp_parse_args( $overwrite, $defaults );
812
+	$input = wp_parse_args($overwrite, $defaults);
813 813
 
814 814
 	return $input;
815 815
 }
@@ -822,19 +822,19 @@  discard block
 block discarded – undo
822 822
  *
823 823
  * @return array
824 824
  */
825
-function sd_get_col_input( $type = 'col', $overwrite = array() ) {
825
+function sd_get_col_input($type = 'col', $overwrite = array()) {
826 826
 
827 827
 	$device_size = '';
828
-	if ( ! empty( $overwrite['device_type'] ) ) {
829
-		if ( $overwrite['device_type'] == 'Tablet' ) {
828
+	if (!empty($overwrite['device_type'])) {
829
+		if ($overwrite['device_type'] == 'Tablet') {
830 830
 			$device_size = '-md';
831
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
831
+		} elseif ($overwrite['device_type'] == 'Desktop') {
832 832
 			$device_size = '-lg';
833 833
 		}
834 834
 	}
835 835
 	$options = array(
836
-		''     => __( 'Default', 'ayecode-connect' ),
837
-		'auto' => __( 'auto', 'ayecode-connect' ),
836
+		''     => __('Default', 'ayecode-connect'),
837
+		'auto' => __('auto', 'ayecode-connect'),
838 838
 		'1'    => '1/12',
839 839
 		'2'    => '2/12',
840 840
 		'3'    => '3/12',
@@ -851,15 +851,15 @@  discard block
 block discarded – undo
851 851
 
852 852
 	$defaults = array(
853 853
 		'type'            => 'select',
854
-		'title'           => __( 'Column width', 'ayecode-connect' ),
854
+		'title'           => __('Column width', 'ayecode-connect'),
855 855
 		'options'         => $options,
856 856
 		'default'         => '',
857 857
 		'desc_tip'        => true,
858
-		'group'           => __( 'Container', 'ayecode-connect' ),
858
+		'group'           => __('Container', 'ayecode-connect'),
859 859
 		'element_require' => '[%container%]=="col"',
860 860
 	);
861 861
 
862
-	$input = wp_parse_args( $overwrite, $defaults );
862
+	$input = wp_parse_args($overwrite, $defaults);
863 863
 
864 864
 	return $input;
865 865
 }
@@ -872,18 +872,18 @@  discard block
 block discarded – undo
872 872
  *
873 873
  * @return array
874 874
  */
875
-function sd_get_row_cols_input( $type = 'row_cols', $overwrite = array() ) {
875
+function sd_get_row_cols_input($type = 'row_cols', $overwrite = array()) {
876 876
 
877 877
 	$device_size = '';
878
-	if ( ! empty( $overwrite['device_type'] ) ) {
879
-		if ( $overwrite['device_type'] == 'Tablet' ) {
878
+	if (!empty($overwrite['device_type'])) {
879
+		if ($overwrite['device_type'] == 'Tablet') {
880 880
 			$device_size = '-md';
881
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
881
+		} elseif ($overwrite['device_type'] == 'Desktop') {
882 882
 			$device_size = '-lg';
883 883
 		}
884 884
 	}
885 885
 	$options = array(
886
-		''  => __( 'auto', 'ayecode-connect' ),
886
+		''  => __('auto', 'ayecode-connect'),
887 887
 		'1' => '1',
888 888
 		'2' => '2',
889 889
 		'3' => '3',
@@ -894,15 +894,15 @@  discard block
 block discarded – undo
894 894
 
895 895
 	$defaults = array(
896 896
 		'type'            => 'select',
897
-		'title'           => __( 'Row columns', 'ayecode-connect' ),
897
+		'title'           => __('Row columns', 'ayecode-connect'),
898 898
 		'options'         => $options,
899 899
 		'default'         => '',
900 900
 		'desc_tip'        => true,
901
-		'group'           => __( 'Container', 'ayecode-connect' ),
901
+		'group'           => __('Container', 'ayecode-connect'),
902 902
 		'element_require' => '[%container%]=="row"',
903 903
 	);
904 904
 
905
-	$input = wp_parse_args( $overwrite, $defaults );
905
+	$input = wp_parse_args($overwrite, $defaults);
906 906
 
907 907
 	return $input;
908 908
 }
@@ -915,33 +915,33 @@  discard block
 block discarded – undo
915 915
  *
916 916
  * @return array
917 917
  */
918
-function sd_get_text_align_input( $type = 'text_align', $overwrite = array() ) {
918
+function sd_get_text_align_input($type = 'text_align', $overwrite = array()) {
919 919
 
920 920
 	$device_size = '';
921
-	if ( ! empty( $overwrite['device_type'] ) ) {
922
-		if ( $overwrite['device_type'] == 'Tablet' ) {
921
+	if (!empty($overwrite['device_type'])) {
922
+		if ($overwrite['device_type'] == 'Tablet') {
923 923
 			$device_size = '-md';
924
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
924
+		} elseif ($overwrite['device_type'] == 'Desktop') {
925 925
 			$device_size = '-lg';
926 926
 		}
927 927
 	}
928 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' ),
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 933
 	);
934 934
 
935 935
 	$defaults = array(
936 936
 		'type'     => 'select',
937
-		'title'    => __( 'Text align', 'ayecode-connect' ),
937
+		'title'    => __('Text align', 'ayecode-connect'),
938 938
 		'options'  => $options,
939 939
 		'default'  => '',
940 940
 		'desc_tip' => true,
941
-		'group'    => __( 'Typography', 'ayecode-connect' ),
941
+		'group'    => __('Typography', 'ayecode-connect'),
942 942
 	);
943 943
 
944
-	$input = wp_parse_args( $overwrite, $defaults );
944
+	$input = wp_parse_args($overwrite, $defaults);
945 945
 
946 946
 	return $input;
947 947
 }
@@ -954,18 +954,18 @@  discard block
 block discarded – undo
954 954
  *
955 955
  * @return array
956 956
  */
957
-function sd_get_display_input( $type = 'display', $overwrite = array() ) {
957
+function sd_get_display_input($type = 'display', $overwrite = array()) {
958 958
 
959 959
 	$device_size = '';
960
-	if ( ! empty( $overwrite['device_type'] ) ) {
961
-		if ( $overwrite['device_type'] == 'Tablet' ) {
960
+	if (!empty($overwrite['device_type'])) {
961
+		if ($overwrite['device_type'] == 'Tablet') {
962 962
 			$device_size = '-md';
963
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
963
+		} elseif ($overwrite['device_type'] == 'Desktop') {
964 964
 			$device_size = '-lg';
965 965
 		}
966 966
 	}
967 967
 	$options = array(
968
-		''                                   => __( 'Default', 'ayecode-connect' ),
968
+		''                                   => __('Default', 'ayecode-connect'),
969 969
 		'd' . $device_size . '-none'         => 'none',
970 970
 		'd' . $device_size . '-inline'       => 'inline',
971 971
 		'd' . $device_size . '-inline-block' => 'inline-block',
@@ -979,14 +979,14 @@  discard block
 block discarded – undo
979 979
 
980 980
 	$defaults = array(
981 981
 		'type'     => 'select',
982
-		'title'    => __( 'Display', 'ayecode-connect' ),
982
+		'title'    => __('Display', 'ayecode-connect'),
983 983
 		'options'  => $options,
984 984
 		'default'  => '',
985 985
 		'desc_tip' => true,
986
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
986
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
987 987
 	);
988 988
 
989
-	$input = wp_parse_args( $overwrite, $defaults );
989
+	$input = wp_parse_args($overwrite, $defaults);
990 990
 
991 991
 	return $input;
992 992
 }
@@ -999,17 +999,17 @@  discard block
 block discarded – undo
999 999
  *
1000 1000
  * @return array
1001 1001
  */
1002
-function sd_get_text_justify_input( $type = 'text_justify', $overwrite = array() ) {
1002
+function sd_get_text_justify_input($type = 'text_justify', $overwrite = array()) {
1003 1003
 
1004 1004
 	$defaults = array(
1005 1005
 		'type'     => 'checkbox',
1006
-		'title'    => __( 'Text justify', 'ayecode-connect' ),
1006
+		'title'    => __('Text justify', 'ayecode-connect'),
1007 1007
 		'default'  => '',
1008 1008
 		'desc_tip' => true,
1009
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1009
+		'group'    => __('Typography', 'ayecode-connect'),
1010 1010
 	);
1011 1011
 
1012
-	$input = wp_parse_args( $overwrite, $defaults );
1012
+	$input = wp_parse_args($overwrite, $defaults);
1013 1013
 
1014 1014
 	return $input;
1015 1015
 }
@@ -1023,73 +1023,73 @@  discard block
 block discarded – undo
1023 1023
  *
1024 1024
  * @return array
1025 1025
  */
1026
-function sd_aui_colors( $include_branding = false, $include_outlines = false, $outline_button_only_text = false, $include_translucent = false ) {
1026
+function sd_aui_colors($include_branding = false, $include_outlines = false, $outline_button_only_text = false, $include_translucent = false) {
1027 1027
 	$theme_colors = array();
1028 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 ) {
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 1069
 		$theme_colors = $theme_colors + sd_aui_branding_colors();
1070 1070
 	}
1071 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;
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 1090
 	}
1091 1091
 
1092
-	return apply_filters( 'sd_aui_colors', $theme_colors, $include_outlines, $include_branding );
1092
+	return apply_filters('sd_aui_colors', $theme_colors, $include_outlines, $include_branding);
1093 1093
 }
1094 1094
 
1095 1095
 /**
@@ -1099,17 +1099,17 @@  discard block
 block discarded – undo
1099 1099
  */
1100 1100
 function sd_aui_branding_colors() {
1101 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' ),
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 1113
 	);
1114 1114
 }
1115 1115
 
@@ -1122,10 +1122,10 @@  discard block
 block discarded – undo
1122 1122
  *
1123 1123
  * @return array
1124 1124
  */
1125
-function sd_get_container_class_input( $type = 'container', $overwrite = array() ) {
1125
+function sd_get_container_class_input($type = 'container', $overwrite = array()) {
1126 1126
 
1127 1127
 	$options = array(
1128
-		'container'       => __( 'container (default)', 'ayecode-connect' ),
1128
+		'container'       => __('container (default)', 'ayecode-connect'),
1129 1129
 		'container-sm'    => 'container-sm',
1130 1130
 		'container-md'    => 'container-md',
1131 1131
 		'container-lg'    => 'container-lg',
@@ -1141,19 +1141,19 @@  discard block
 block discarded – undo
1141 1141
 		'card-footer'     => 'card-footer',
1142 1142
 		'list-group'      => 'list-group',
1143 1143
 		'list-group-item' => 'list-group-item',
1144
-		''                => __( 'no container class', 'ayecode-connect' ),
1144
+		''                => __('no container class', 'ayecode-connect'),
1145 1145
 	);
1146 1146
 
1147 1147
 	$defaults = array(
1148 1148
 		'type'     => 'select',
1149
-		'title'    => __( 'Type', 'ayecode-connect' ),
1149
+		'title'    => __('Type', 'ayecode-connect'),
1150 1150
 		'options'  => $options,
1151 1151
 		'default'  => '',
1152 1152
 		'desc_tip' => true,
1153
-		'group'    => __( 'Container', 'ayecode-connect' ),
1153
+		'group'    => __('Container', 'ayecode-connect'),
1154 1154
 	);
1155 1155
 
1156
-	$input = wp_parse_args( $overwrite, $defaults );
1156
+	$input = wp_parse_args($overwrite, $defaults);
1157 1157
 
1158 1158
 	return $input;
1159 1159
 }
@@ -1166,10 +1166,10 @@  discard block
 block discarded – undo
1166 1166
  *
1167 1167
  * @return array
1168 1168
  */
1169
-function sd_get_position_class_input( $type = 'position', $overwrite = array() ) {
1169
+function sd_get_position_class_input($type = 'position', $overwrite = array()) {
1170 1170
 
1171 1171
 	$options = array(
1172
-		''                  => __( 'Default', 'ayecode-connect' ),
1172
+		''                  => __('Default', 'ayecode-connect'),
1173 1173
 		'position-static'   => 'static',
1174 1174
 		'position-relative' => 'relative',
1175 1175
 		'position-absolute' => 'absolute',
@@ -1182,14 +1182,14 @@  discard block
 block discarded – undo
1182 1182
 
1183 1183
 	$defaults = array(
1184 1184
 		'type'     => 'select',
1185
-		'title'    => __( 'Position', 'ayecode-connect' ),
1185
+		'title'    => __('Position', 'ayecode-connect'),
1186 1186
 		'options'  => $options,
1187 1187
 		'default'  => '',
1188 1188
 		'desc_tip' => true,
1189
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1189
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
1190 1190
 	);
1191 1191
 
1192
-	$input = wp_parse_args( $overwrite, $defaults );
1192
+	$input = wp_parse_args($overwrite, $defaults);
1193 1193
 
1194 1194
 	return $input;
1195 1195
 }
@@ -1200,10 +1200,10 @@  discard block
 block discarded – undo
1200 1200
  *
1201 1201
  * @return array
1202 1202
  */
1203
-function sd_get_absolute_position_input( $type = 'absolute_position', $overwrite = array() ) {
1203
+function sd_get_absolute_position_input($type = 'absolute_position', $overwrite = array()) {
1204 1204
 
1205 1205
 	$options = array(
1206
-		''              => __( 'Default', 'ayecode-connect' ),
1206
+		''              => __('Default', 'ayecode-connect'),
1207 1207
 		'top-left'      => 'top-left',
1208 1208
 		'top-center'    => 'top-center',
1209 1209
 		'top-right'     => 'top-right',
@@ -1217,15 +1217,15 @@  discard block
 block discarded – undo
1217 1217
 
1218 1218
 	$defaults = array(
1219 1219
 		'type'            => 'select',
1220
-		'title'           => __( 'Absolute Position', 'ayecode-connect' ),
1220
+		'title'           => __('Absolute Position', 'ayecode-connect'),
1221 1221
 		'options'         => $options,
1222 1222
 		'default'         => '',
1223 1223
 		'desc_tip'        => true,
1224
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1224
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1225 1225
 		'element_require' => '[%position%]=="position-absolute"',
1226 1226
 	);
1227 1227
 
1228
-	$input = wp_parse_args( $overwrite, $defaults );
1228
+	$input = wp_parse_args($overwrite, $defaults);
1229 1229
 
1230 1230
 	return $input;
1231 1231
 }
@@ -1238,30 +1238,30 @@  discard block
 block discarded – undo
1238 1238
  *
1239 1239
  * @return array
1240 1240
  */
1241
-function sd_get_sticky_offset_input( $type = 'top', $overwrite = array() ) {
1241
+function sd_get_sticky_offset_input($type = 'top', $overwrite = array()) {
1242 1242
 
1243 1243
 	$defaults = array(
1244 1244
 		'type'            => 'number',
1245
-		'title'           => __( 'Sticky offset', 'ayecode-connect' ),
1245
+		'title'           => __('Sticky offset', 'ayecode-connect'),
1246 1246
 		//'desc' =>  __( 'Sticky offset', 'ayecode-connect' ),
1247 1247
 		'default'         => '',
1248 1248
 		'desc_tip'        => true,
1249
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1249
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1250 1250
 		'element_require' => '[%position%]=="sticky" || [%position%]=="sticky-top"',
1251 1251
 	);
1252 1252
 
1253 1253
 	// title
1254
-	if ( $type == 'top' ) {
1255
-		$defaults['title'] = __( 'Top offset', 'ayecode-connect' );
1254
+	if ($type == 'top') {
1255
+		$defaults['title'] = __('Top offset', 'ayecode-connect');
1256 1256
 		$defaults['icon']  = 'box-top';
1257 1257
 		$defaults['row']   = array(
1258
-			'title' => __( 'Sticky offset', 'ayecode-connect' ),
1258
+			'title' => __('Sticky offset', 'ayecode-connect'),
1259 1259
 			'key'   => 'sticky-offset',
1260 1260
 			'open'  => true,
1261 1261
 			'class' => 'text-center',
1262 1262
 		);
1263
-	} elseif ( $type == 'bottom' ) {
1264
-		$defaults['title'] = __( 'Bottom offset', 'ayecode-connect' );
1263
+	} elseif ($type == 'bottom') {
1264
+		$defaults['title'] = __('Bottom offset', 'ayecode-connect');
1265 1265
 		$defaults['icon']  = 'box-bottom';
1266 1266
 		$defaults['row']   = array(
1267 1267
 			'key'   => 'sticky-offset',
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
 		);
1270 1270
 	}
1271 1271
 
1272
-	$input = wp_parse_args( $overwrite, $defaults );
1272
+	$input = wp_parse_args($overwrite, $defaults);
1273 1273
 
1274 1274
 	return $input;
1275 1275
 }
@@ -1282,11 +1282,11 @@  discard block
 block discarded – undo
1282 1282
  *
1283 1283
  * @return array
1284 1284
  */
1285
-function sd_get_font_size_input( $type = 'font_size', $overwrite = array(), $has_custom = false ) {
1285
+function sd_get_font_size_input($type = 'font_size', $overwrite = array(), $has_custom = false) {
1286 1286
 	global $aui_bs5;
1287 1287
 
1288
-	$options[] = __( 'Inherit from parent', 'ayecode-connect' );
1289
-	if ( $aui_bs5 ) {
1288
+	$options[] = __('Inherit from parent', 'ayecode-connect');
1289
+	if ($aui_bs5) {
1290 1290
 		// responsive font sizes
1291 1291
 		$options['fs-base'] = 'fs-base (body default)';
1292 1292
 		$options['fs-6']    = 'fs-6';
@@ -1317,25 +1317,25 @@  discard block
 block discarded – undo
1317 1317
 			'display-4' => 'display-4',
1318 1318
 		);
1319 1319
 
1320
-	if ( $aui_bs5 ) {
1320
+	if ($aui_bs5) {
1321 1321
 		$options['display-5'] = 'display-5';
1322 1322
 		$options['display-6'] = 'display-6';
1323 1323
 	}
1324 1324
 
1325
-	if ( $has_custom ) {
1326
-		$options['custom'] = __( 'Custom size', 'ayecode-connect' );
1325
+	if ($has_custom) {
1326
+		$options['custom'] = __('Custom size', 'ayecode-connect');
1327 1327
 	}
1328 1328
 
1329 1329
 	$defaults = array(
1330 1330
 		'type'     => 'select',
1331
-		'title'    => __( 'Font size', 'ayecode-connect' ),
1331
+		'title'    => __('Font size', 'ayecode-connect'),
1332 1332
 		'options'  => $options,
1333 1333
 		'default'  => '',
1334 1334
 		'desc_tip' => true,
1335
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1335
+		'group'    => __('Typography', 'ayecode-connect'),
1336 1336
 	);
1337 1337
 
1338
-	$input = wp_parse_args( $overwrite, $defaults );
1338
+	$input = wp_parse_args($overwrite, $defaults);
1339 1339
 
1340 1340
 	return $input;
1341 1341
 }
@@ -1348,11 +1348,11 @@  discard block
 block discarded – undo
1348 1348
  *
1349 1349
  * @return array
1350 1350
  */
1351
-function sd_get_font_custom_size_input( $type = 'font_size_custom', $overwrite = array(), $parent_type = '' ) {
1351
+function sd_get_font_custom_size_input($type = 'font_size_custom', $overwrite = array(), $parent_type = '') {
1352 1352
 
1353 1353
 	$defaults = array(
1354 1354
 		'type'              => 'number',
1355
-		'title'             => __( 'Font size (rem)', 'ayecode-connect' ),
1355
+		'title'             => __('Font size (rem)', 'ayecode-connect'),
1356 1356
 		'default'           => '',
1357 1357
 		'placeholder'       => '1.25',
1358 1358
 		'custom_attributes' => array(
@@ -1361,14 +1361,14 @@  discard block
 block discarded – undo
1361 1361
 			'max'  => '100',
1362 1362
 		),
1363 1363
 		'desc_tip'          => true,
1364
-		'group'             => __( 'Typography', 'ayecode-connect' ),
1364
+		'group'             => __('Typography', 'ayecode-connect'),
1365 1365
 	);
1366 1366
 
1367
-	if ( $parent_type ) {
1367
+	if ($parent_type) {
1368 1368
 		$defaults['element_require'] = '[%' . $parent_type . '%]=="custom"';
1369 1369
 	}
1370 1370
 
1371
-	$input = wp_parse_args( $overwrite, $defaults );
1371
+	$input = wp_parse_args($overwrite, $defaults);
1372 1372
 
1373 1373
 	return $input;
1374 1374
 }
@@ -1381,11 +1381,11 @@  discard block
 block discarded – undo
1381 1381
  *
1382 1382
  * @return array
1383 1383
  */
1384
-function sd_get_font_line_height_input( $type = 'font_line_height', $overwrite = array() ) {
1384
+function sd_get_font_line_height_input($type = 'font_line_height', $overwrite = array()) {
1385 1385
 
1386 1386
 	$defaults = array(
1387 1387
 		'type'              => 'number',
1388
-		'title'             => __( 'Font Line Height', 'ayecode-connect' ),
1388
+		'title'             => __('Font Line Height', 'ayecode-connect'),
1389 1389
 		'default'           => '',
1390 1390
 		'placeholder'       => '1.75',
1391 1391
 		'custom_attributes' => array(
@@ -1394,10 +1394,10 @@  discard block
 block discarded – undo
1394 1394
 			'max'  => '100',
1395 1395
 		),
1396 1396
 		'desc_tip'          => true,
1397
-		'group'             => __( 'Typography', 'ayecode-connect' ),
1397
+		'group'             => __('Typography', 'ayecode-connect'),
1398 1398
 	);
1399 1399
 
1400
-	$input = wp_parse_args( $overwrite, $defaults );
1400
+	$input = wp_parse_args($overwrite, $defaults);
1401 1401
 
1402 1402
 	return $input;
1403 1403
 }
@@ -1410,17 +1410,17 @@  discard block
 block discarded – undo
1410 1410
  *
1411 1411
  * @return array
1412 1412
  */
1413
-function sd_get_font_size_input_group( $type = 'font_size', $overwrite = array(), $overwrite_custom = array() ) {
1413
+function sd_get_font_size_input_group($type = 'font_size', $overwrite = array(), $overwrite_custom = array()) {
1414 1414
 
1415 1415
 	$inputs = array();
1416 1416
 
1417
-	if ( $overwrite !== false ) {
1418
-		$inputs[ $type ] = sd_get_font_size_input( $type, $overwrite, true );
1417
+	if ($overwrite !== false) {
1418
+		$inputs[$type] = sd_get_font_size_input($type, $overwrite, true);
1419 1419
 	}
1420 1420
 
1421
-	if ( $overwrite_custom !== false ) {
1421
+	if ($overwrite_custom !== false) {
1422 1422
 		$custom            = $type . '_custom';
1423
-		$inputs[ $custom ] = sd_get_font_custom_size_input( $custom, $overwrite_custom, $type );
1423
+		$inputs[$custom] = sd_get_font_custom_size_input($custom, $overwrite_custom, $type);
1424 1424
 	}
1425 1425
 
1426 1426
 	return $inputs;
@@ -1434,10 +1434,10 @@  discard block
 block discarded – undo
1434 1434
  *
1435 1435
  * @return array
1436 1436
  */
1437
-function sd_get_font_weight_input( $type = 'font_weight', $overwrite = array() ) {
1437
+function sd_get_font_weight_input($type = 'font_weight', $overwrite = array()) {
1438 1438
 
1439 1439
 	$options = array(
1440
-		''                                => __( 'Inherit', 'ayecode-connect' ),
1440
+		''                                => __('Inherit', 'ayecode-connect'),
1441 1441
 		'font-weight-bold'                => 'bold',
1442 1442
 		'font-weight-bolder'              => 'bolder',
1443 1443
 		'font-weight-normal'              => 'normal',
@@ -1453,14 +1453,14 @@  discard block
 block discarded – undo
1453 1453
 
1454 1454
 	$defaults = array(
1455 1455
 		'type'     => 'select',
1456
-		'title'    => __( 'Appearance', 'ayecode-connect' ),
1456
+		'title'    => __('Appearance', 'ayecode-connect'),
1457 1457
 		'options'  => $options,
1458 1458
 		'default'  => '',
1459 1459
 		'desc_tip' => true,
1460
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1460
+		'group'    => __('Typography', 'ayecode-connect'),
1461 1461
 	);
1462 1462
 
1463
-	$input = wp_parse_args( $overwrite, $defaults );
1463
+	$input = wp_parse_args($overwrite, $defaults);
1464 1464
 
1465 1465
 	return $input;
1466 1466
 }
@@ -1473,25 +1473,25 @@  discard block
 block discarded – undo
1473 1473
  *
1474 1474
  * @return array
1475 1475
  */
1476
-function sd_get_font_case_input( $type = 'font_weight', $overwrite = array() ) {
1476
+function sd_get_font_case_input($type = 'font_weight', $overwrite = array()) {
1477 1477
 
1478 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' ),
1479
+		''                => __('Default', 'ayecode-connect'),
1480
+		'text-lowercase'  => __('lowercase', 'ayecode-connect'),
1481
+		'text-uppercase'  => __('UPPERCASE', 'ayecode-connect'),
1482
+		'text-capitalize' => __('Capitalize', 'ayecode-connect'),
1483 1483
 	);
1484 1484
 
1485 1485
 	$defaults = array(
1486 1486
 		'type'     => 'select',
1487
-		'title'    => __( 'Letter case', 'ayecode-connect' ),
1487
+		'title'    => __('Letter case', 'ayecode-connect'),
1488 1488
 		'options'  => $options,
1489 1489
 		'default'  => '',
1490 1490
 		'desc_tip' => true,
1491
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1491
+		'group'    => __('Typography', 'ayecode-connect'),
1492 1492
 	);
1493 1493
 
1494
-	$input = wp_parse_args( $overwrite, $defaults );
1494
+	$input = wp_parse_args($overwrite, $defaults);
1495 1495
 
1496 1496
 	return $input;
1497 1497
 }
@@ -1505,23 +1505,23 @@  discard block
 block discarded – undo
1505 1505
  * A helper function for font size
1506 1506
  *
1507 1507
  */
1508
-function sd_get_font_italic_input( $type = 'font_italic', $overwrite = array() ) {
1508
+function sd_get_font_italic_input($type = 'font_italic', $overwrite = array()) {
1509 1509
 
1510 1510
 	$options = array(
1511
-		''            => __( 'No', 'ayecode-connect' ),
1512
-		'font-italic' => __( 'Yes', 'ayecode-connect' ),
1511
+		''            => __('No', 'ayecode-connect'),
1512
+		'font-italic' => __('Yes', 'ayecode-connect'),
1513 1513
 	);
1514 1514
 
1515 1515
 	$defaults = array(
1516 1516
 		'type'     => 'select',
1517
-		'title'    => __( 'Font italic', 'ayecode-connect' ),
1517
+		'title'    => __('Font italic', 'ayecode-connect'),
1518 1518
 		'options'  => $options,
1519 1519
 		'default'  => '',
1520 1520
 		'desc_tip' => true,
1521
-		'group'    => __( 'Typography', 'ayecode-connect' ),
1521
+		'group'    => __('Typography', 'ayecode-connect'),
1522 1522
 	);
1523 1523
 
1524
-	$input = wp_parse_args( $overwrite, $defaults );
1524
+	$input = wp_parse_args($overwrite, $defaults);
1525 1525
 
1526 1526
 	return $input;
1527 1527
 }
@@ -1534,18 +1534,18 @@  discard block
 block discarded – undo
1534 1534
  *
1535 1535
  * @return array
1536 1536
  */
1537
-function sd_get_anchor_input( $type = 'anchor', $overwrite = array() ) {
1537
+function sd_get_anchor_input($type = 'anchor', $overwrite = array()) {
1538 1538
 
1539 1539
 	$defaults = array(
1540 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' ),
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 1543
 		'default'  => '',
1544 1544
 		'desc_tip' => true,
1545
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1545
+		'group'    => __('Advanced', 'ayecode-connect'),
1546 1546
 	);
1547 1547
 
1548
-	$input = wp_parse_args( $overwrite, $defaults );
1548
+	$input = wp_parse_args($overwrite, $defaults);
1549 1549
 
1550 1550
 	return $input;
1551 1551
 }
@@ -1558,18 +1558,18 @@  discard block
 block discarded – undo
1558 1558
  *
1559 1559
  * @return array
1560 1560
  */
1561
-function sd_get_class_input( $type = 'css_class', $overwrite = array() ) {
1561
+function sd_get_class_input($type = 'css_class', $overwrite = array()) {
1562 1562
 
1563 1563
 	$defaults = array(
1564 1564
 		'type'     => 'text',
1565
-		'title'    => __( 'Additional CSS class(es)', 'ayecode-connect' ),
1566
-		'desc'     => __( 'Separate multiple classes with spaces.', 'ayecode-connect' ),
1565
+		'title'    => __('Additional CSS class(es)', 'ayecode-connect'),
1566
+		'desc'     => __('Separate multiple classes with spaces.', 'ayecode-connect'),
1567 1567
 		'default'  => '',
1568 1568
 		'desc_tip' => true,
1569
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1569
+		'group'    => __('Advanced', 'ayecode-connect'),
1570 1570
 	);
1571 1571
 
1572
-	$input = wp_parse_args( $overwrite, $defaults );
1572
+	$input = wp_parse_args($overwrite, $defaults);
1573 1573
 
1574 1574
 	return $input;
1575 1575
 }
@@ -1582,18 +1582,18 @@  discard block
 block discarded – undo
1582 1582
  *
1583 1583
  * @return array
1584 1584
  */
1585
-function sd_get_custom_name_input( $type = 'metadata_name', $overwrite = array() ) {
1585
+function sd_get_custom_name_input($type = 'metadata_name', $overwrite = array()) {
1586 1586
 
1587 1587
 	$defaults = array(
1588 1588
 		'type'     => 'text',
1589
-		'title'    => __( 'Block Name', 'ayecode-connect' ),
1590
-		'desc'     => __( 'Set a custom name for this block', 'ayecode-connect' ),
1589
+		'title'    => __('Block Name', 'ayecode-connect'),
1590
+		'desc'     => __('Set a custom name for this block', 'ayecode-connect'),
1591 1591
 		'default'  => '',
1592 1592
 		'desc_tip' => true,
1593
-		'group'    => __( 'Advanced', 'ayecode-connect' ),
1593
+		'group'    => __('Advanced', 'ayecode-connect'),
1594 1594
 	);
1595 1595
 
1596
-	$input = wp_parse_args( $overwrite, $defaults );
1596
+	$input = wp_parse_args($overwrite, $defaults);
1597 1597
 
1598 1598
 	return $input;
1599 1599
 }
@@ -1606,45 +1606,45 @@  discard block
 block discarded – undo
1606 1606
  *
1607 1607
  * @return array
1608 1608
  */
1609
-function sd_get_hover_animations_input( $type = 'hover_animations', $overwrite = array() ) {
1609
+function sd_get_hover_animations_input($type = 'hover_animations', $overwrite = array()) {
1610 1610
 
1611 1611
 	$options = array(
1612
-		''                 => __( 'none', 'ayecode-connect' ),
1613
-		'hover-zoom'       => __( 'Zoom', 'ayecode-connect' ),
1614
-		'hover-shadow'     => __( 'Shadow', 'ayecode-connect' ),
1615
-		'hover-move-up'    => __( 'Move up', 'ayecode-connect' ),
1616
-		'hover-move-down'  => __( 'Move down', 'ayecode-connect' ),
1617
-		'hover-move-left'  => __( 'Move left', 'ayecode-connect' ),
1618
-		'hover-move-right' => __( 'Move right', 'ayecode-connect' ),
1612
+		''                 => __('none', 'ayecode-connect'),
1613
+		'hover-zoom'       => __('Zoom', 'ayecode-connect'),
1614
+		'hover-shadow'     => __('Shadow', 'ayecode-connect'),
1615
+		'hover-move-up'    => __('Move up', 'ayecode-connect'),
1616
+		'hover-move-down'  => __('Move down', 'ayecode-connect'),
1617
+		'hover-move-left'  => __('Move left', 'ayecode-connect'),
1618
+		'hover-move-right' => __('Move right', 'ayecode-connect'),
1619 1619
 	);
1620 1620
 
1621 1621
 	$defaults = array(
1622 1622
 		'type'     => 'select',
1623 1623
 		'multiple' => true,
1624
-		'title'    => __( 'Hover Animations', 'ayecode-connect' ),
1624
+		'title'    => __('Hover Animations', 'ayecode-connect'),
1625 1625
 		'options'  => $options,
1626 1626
 		'default'  => '',
1627 1627
 		'desc_tip' => true,
1628
-		'group'    => __( 'Hover Animations', 'ayecode-connect' ),
1628
+		'group'    => __('Hover Animations', 'ayecode-connect'),
1629 1629
 	);
1630 1630
 
1631
-	$input = wp_parse_args( $overwrite, $defaults );
1631
+	$input = wp_parse_args($overwrite, $defaults);
1632 1632
 
1633 1633
 	return $input;
1634 1634
 }
1635 1635
 
1636 1636
 
1637
-function sd_get_flex_align_items_input( $type = 'align-items', $overwrite = array() ) {
1637
+function sd_get_flex_align_items_input($type = 'align-items', $overwrite = array()) {
1638 1638
 	$device_size = '';
1639
-	if ( ! empty( $overwrite['device_type'] ) ) {
1640
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1639
+	if (!empty($overwrite['device_type'])) {
1640
+		if ($overwrite['device_type'] == 'Tablet') {
1641 1641
 			$device_size = '-md';
1642
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1642
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1643 1643
 			$device_size = '-lg';
1644 1644
 		}
1645 1645
 	}
1646 1646
 	$options = array(
1647
-		''                                         => __( 'Default', 'ayecode-connect' ),
1647
+		''                                         => __('Default', 'ayecode-connect'),
1648 1648
 		'align-items' . $device_size . '-start'    => 'align-items-start',
1649 1649
 		'align-items' . $device_size . '-end'      => 'align-items-end',
1650 1650
 		'align-items' . $device_size . '-center'   => 'align-items-center',
@@ -1654,21 +1654,21 @@  discard block
 block discarded – undo
1654 1654
 
1655 1655
 	$defaults = array(
1656 1656
 		'type'            => 'select',
1657
-		'title'           => __( 'Vertical Align Items', 'ayecode-connect' ),
1657
+		'title'           => __('Vertical Align Items', 'ayecode-connect'),
1658 1658
 		'options'         => $options,
1659 1659
 		'default'         => '',
1660 1660
 		'desc_tip'        => true,
1661
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1661
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1662 1662
 		'element_require' => ' ( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1663 1663
 
1664 1664
 	);
1665 1665
 
1666
-	$input = wp_parse_args( $overwrite, $defaults );
1666
+	$input = wp_parse_args($overwrite, $defaults);
1667 1667
 
1668 1668
 	return $input;
1669 1669
 }
1670 1670
 
1671
-function sd_get_flex_align_items_input_group( $type = 'flex_align_items', $overwrite = array() ) {
1671
+function sd_get_flex_align_items_input_group($type = 'flex_align_items', $overwrite = array()) {
1672 1672
 	$inputs = array();
1673 1673
 	$sizes  = array(
1674 1674
 		''    => 'Mobile',
@@ -1676,28 +1676,28 @@  discard block
 block discarded – undo
1676 1676
 		'_lg' => 'Desktop',
1677 1677
 	);
1678 1678
 
1679
-	if ( $overwrite !== false ) {
1679
+	if ($overwrite !== false) {
1680 1680
 
1681
-		foreach ( $sizes as $ds => $dt ) {
1681
+		foreach ($sizes as $ds => $dt) {
1682 1682
 			$overwrite['device_type'] = $dt;
1683
-			$inputs[ $type . $ds ]    = sd_get_flex_align_items_input( $type, $overwrite );
1683
+			$inputs[$type . $ds]    = sd_get_flex_align_items_input($type, $overwrite);
1684 1684
 		}
1685 1685
 	}
1686 1686
 
1687 1687
 	return $inputs;
1688 1688
 }
1689 1689
 
1690
-function sd_get_flex_justify_content_input( $type = 'flex_justify_content', $overwrite = array() ) {
1690
+function sd_get_flex_justify_content_input($type = 'flex_justify_content', $overwrite = array()) {
1691 1691
 	$device_size = '';
1692
-	if ( ! empty( $overwrite['device_type'] ) ) {
1693
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1692
+	if (!empty($overwrite['device_type'])) {
1693
+		if ($overwrite['device_type'] == 'Tablet') {
1694 1694
 			$device_size = '-md';
1695
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1695
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1696 1696
 			$device_size = '-lg';
1697 1697
 		}
1698 1698
 	}
1699 1699
 	$options = array(
1700
-		''                                            => __( 'Default', 'ayecode-connect' ),
1700
+		''                                            => __('Default', 'ayecode-connect'),
1701 1701
 		'justify-content' . $device_size . '-start'   => 'justify-content-start',
1702 1702
 		'justify-content' . $device_size . '-end'     => 'justify-content-end',
1703 1703
 		'justify-content' . $device_size . '-center'  => 'justify-content-center',
@@ -1707,21 +1707,21 @@  discard block
 block discarded – undo
1707 1707
 
1708 1708
 	$defaults = array(
1709 1709
 		'type'            => 'select',
1710
-		'title'           => __( 'Justify content', 'ayecode-connect' ),
1710
+		'title'           => __('Justify content', 'ayecode-connect'),
1711 1711
 		'options'         => $options,
1712 1712
 		'default'         => '',
1713 1713
 		'desc_tip'        => true,
1714
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1714
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1715 1715
 		'element_require' => '( ( [%container%]=="row" ) || ( [%display%]=="d-flex" || [%display_md%]=="d-md-flex" || [%display_lg%]=="d-lg-flex" ) ) ',
1716 1716
 
1717 1717
 	);
1718 1718
 
1719
-	$input = wp_parse_args( $overwrite, $defaults );
1719
+	$input = wp_parse_args($overwrite, $defaults);
1720 1720
 
1721 1721
 	return $input;
1722 1722
 }
1723 1723
 
1724
-function sd_get_flex_justify_content_input_group( $type = 'flex_justify_content', $overwrite = array() ) {
1724
+function sd_get_flex_justify_content_input_group($type = 'flex_justify_content', $overwrite = array()) {
1725 1725
 	$inputs = array();
1726 1726
 	$sizes  = array(
1727 1727
 		''    => 'Mobile',
@@ -1729,11 +1729,11 @@  discard block
 block discarded – undo
1729 1729
 		'_lg' => 'Desktop',
1730 1730
 	);
1731 1731
 
1732
-	if ( $overwrite !== false ) {
1732
+	if ($overwrite !== false) {
1733 1733
 
1734
-		foreach ( $sizes as $ds => $dt ) {
1734
+		foreach ($sizes as $ds => $dt) {
1735 1735
 			$overwrite['device_type'] = $dt;
1736
-			$inputs[ $type . $ds ]    = sd_get_flex_justify_content_input( $type, $overwrite );
1736
+			$inputs[$type . $ds]    = sd_get_flex_justify_content_input($type, $overwrite);
1737 1737
 		}
1738 1738
 	}
1739 1739
 
@@ -1741,17 +1741,17 @@  discard block
 block discarded – undo
1741 1741
 }
1742 1742
 
1743 1743
 
1744
-function sd_get_flex_align_self_input( $type = 'flex_align_self', $overwrite = array() ) {
1744
+function sd_get_flex_align_self_input($type = 'flex_align_self', $overwrite = array()) {
1745 1745
 	$device_size = '';
1746
-	if ( ! empty( $overwrite['device_type'] ) ) {
1747
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1746
+	if (!empty($overwrite['device_type'])) {
1747
+		if ($overwrite['device_type'] == 'Tablet') {
1748 1748
 			$device_size = '-md';
1749
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1749
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1750 1750
 			$device_size = '-lg';
1751 1751
 		}
1752 1752
 	}
1753 1753
 	$options = array(
1754
-		''                                         => __( 'Default', 'ayecode-connect' ),
1754
+		''                                         => __('Default', 'ayecode-connect'),
1755 1755
 		'align-items' . $device_size . '-start'    => 'align-items-start',
1756 1756
 		'align-items' . $device_size . '-end'      => 'align-items-end',
1757 1757
 		'align-items' . $device_size . '-center'   => 'align-items-center',
@@ -1761,21 +1761,21 @@  discard block
 block discarded – undo
1761 1761
 
1762 1762
 	$defaults = array(
1763 1763
 		'type'            => 'select',
1764
-		'title'           => __( 'Align Self', 'ayecode-connect' ),
1764
+		'title'           => __('Align Self', 'ayecode-connect'),
1765 1765
 		'options'         => $options,
1766 1766
 		'default'         => '',
1767 1767
 		'desc_tip'        => true,
1768
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1768
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1769 1769
 		'element_require' => ' [%container%]=="col" ',
1770 1770
 
1771 1771
 	);
1772 1772
 
1773
-	$input = wp_parse_args( $overwrite, $defaults );
1773
+	$input = wp_parse_args($overwrite, $defaults);
1774 1774
 
1775 1775
 	return $input;
1776 1776
 }
1777 1777
 
1778
-function sd_get_flex_align_self_input_group( $type = 'flex_align_self', $overwrite = array() ) {
1778
+function sd_get_flex_align_self_input_group($type = 'flex_align_self', $overwrite = array()) {
1779 1779
 	$inputs = array();
1780 1780
 	$sizes  = array(
1781 1781
 		''    => 'Mobile',
@@ -1783,53 +1783,53 @@  discard block
 block discarded – undo
1783 1783
 		'_lg' => 'Desktop',
1784 1784
 	);
1785 1785
 
1786
-	if ( $overwrite !== false ) {
1786
+	if ($overwrite !== false) {
1787 1787
 
1788
-		foreach ( $sizes as $ds => $dt ) {
1788
+		foreach ($sizes as $ds => $dt) {
1789 1789
 			$overwrite['device_type'] = $dt;
1790
-			$inputs[ $type . $ds ]    = sd_get_flex_align_self_input( $type, $overwrite );
1790
+			$inputs[$type . $ds]    = sd_get_flex_align_self_input($type, $overwrite);
1791 1791
 		}
1792 1792
 	}
1793 1793
 
1794 1794
 	return $inputs;
1795 1795
 }
1796 1796
 
1797
-function sd_get_flex_order_input( $type = 'flex_order', $overwrite = array() ) {
1797
+function sd_get_flex_order_input($type = 'flex_order', $overwrite = array()) {
1798 1798
 	$device_size = '';
1799
-	if ( ! empty( $overwrite['device_type'] ) ) {
1800
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1799
+	if (!empty($overwrite['device_type'])) {
1800
+		if ($overwrite['device_type'] == 'Tablet') {
1801 1801
 			$device_size = '-md';
1802
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1802
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1803 1803
 			$device_size = '-lg';
1804 1804
 		}
1805 1805
 	}
1806 1806
 	$options = array(
1807
-		'' => __( 'Default', 'ayecode-connect' ),
1807
+		'' => __('Default', 'ayecode-connect'),
1808 1808
 	);
1809 1809
 
1810 1810
 	$i = 0;
1811
-	while ( $i <= 5 ) {
1812
-		$options[ 'order' . $device_size . '-' . $i ] = $i;
1811
+	while ($i <= 5) {
1812
+		$options['order' . $device_size . '-' . $i] = $i;
1813 1813
 		$i++;
1814 1814
 	}
1815 1815
 
1816 1816
 	$defaults = array(
1817 1817
 		'type'            => 'select',
1818
-		'title'           => __( 'Flex Order', 'ayecode-connect' ),
1818
+		'title'           => __('Flex Order', 'ayecode-connect'),
1819 1819
 		'options'         => $options,
1820 1820
 		'default'         => '',
1821 1821
 		'desc_tip'        => true,
1822
-		'group'           => __( 'Wrapper Styles', 'ayecode-connect' ),
1822
+		'group'           => __('Wrapper Styles', 'ayecode-connect'),
1823 1823
 		'element_require' => ' [%container%]=="col" ',
1824 1824
 
1825 1825
 	);
1826 1826
 
1827
-	$input = wp_parse_args( $overwrite, $defaults );
1827
+	$input = wp_parse_args($overwrite, $defaults);
1828 1828
 
1829 1829
 	return $input;
1830 1830
 }
1831 1831
 
1832
-function sd_get_flex_order_input_group( $type = 'flex_order', $overwrite = array() ) {
1832
+function sd_get_flex_order_input_group($type = 'flex_order', $overwrite = array()) {
1833 1833
 	$inputs = array();
1834 1834
 	$sizes  = array(
1835 1835
 		''    => 'Mobile',
@@ -1837,18 +1837,18 @@  discard block
 block discarded – undo
1837 1837
 		'_lg' => 'Desktop',
1838 1838
 	);
1839 1839
 
1840
-	if ( $overwrite !== false ) {
1840
+	if ($overwrite !== false) {
1841 1841
 
1842
-		foreach ( $sizes as $ds => $dt ) {
1842
+		foreach ($sizes as $ds => $dt) {
1843 1843
 			$overwrite['device_type'] = $dt;
1844
-			$inputs[ $type . $ds ]    = sd_get_flex_order_input( $type, $overwrite );
1844
+			$inputs[$type . $ds]    = sd_get_flex_order_input($type, $overwrite);
1845 1845
 		}
1846 1846
 	}
1847 1847
 
1848 1848
 	return $inputs;
1849 1849
 }
1850 1850
 
1851
-function sd_get_flex_wrap_group( $type = 'flex_wrap', $overwrite = array() ) {
1851
+function sd_get_flex_wrap_group($type = 'flex_wrap', $overwrite = array()) {
1852 1852
 	$inputs = array();
1853 1853
 	$sizes  = array(
1854 1854
 		''    => 'Mobile',
@@ -1856,28 +1856,28 @@  discard block
 block discarded – undo
1856 1856
 		'_lg' => 'Desktop',
1857 1857
 	);
1858 1858
 
1859
-	if ( $overwrite !== false ) {
1859
+	if ($overwrite !== false) {
1860 1860
 
1861
-		foreach ( $sizes as $ds => $dt ) {
1861
+		foreach ($sizes as $ds => $dt) {
1862 1862
 			$overwrite['device_type'] = $dt;
1863
-			$inputs[ $type . $ds ]    = sd_get_flex_wrap_input( $type, $overwrite );
1863
+			$inputs[$type . $ds]    = sd_get_flex_wrap_input($type, $overwrite);
1864 1864
 		}
1865 1865
 	}
1866 1866
 
1867 1867
 	return $inputs;
1868 1868
 }
1869 1869
 
1870
-function sd_get_flex_wrap_input( $type = 'flex_wrap', $overwrite = array() ) {
1870
+function sd_get_flex_wrap_input($type = 'flex_wrap', $overwrite = array()) {
1871 1871
 	$device_size = '';
1872
-	if ( ! empty( $overwrite['device_type'] ) ) {
1873
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1872
+	if (!empty($overwrite['device_type'])) {
1873
+		if ($overwrite['device_type'] == 'Tablet') {
1874 1874
 			$device_size = '-md';
1875
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1875
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1876 1876
 			$device_size = '-lg';
1877 1877
 		}
1878 1878
 	}
1879 1879
 	$options = array(
1880
-		''                                      => __( 'Default', 'ayecode-connect' ),
1880
+		''                                      => __('Default', 'ayecode-connect'),
1881 1881
 		'flex' . $device_size . '-nowrap'       => 'nowrap',
1882 1882
 		'flex' . $device_size . '-wrap'         => 'wrap',
1883 1883
 		'flex' . $device_size . '-wrap-reverse' => 'wrap-reverse',
@@ -1885,19 +1885,19 @@  discard block
 block discarded – undo
1885 1885
 
1886 1886
 	$defaults = array(
1887 1887
 		'type'     => 'select',
1888
-		'title'    => __( 'Flex wrap', 'ayecode-connect' ),
1888
+		'title'    => __('Flex wrap', 'ayecode-connect'),
1889 1889
 		'options'  => $options,
1890 1890
 		'default'  => '',
1891 1891
 		'desc_tip' => true,
1892
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1892
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
1893 1893
 	);
1894 1894
 
1895
-	$input = wp_parse_args( $overwrite, $defaults );
1895
+	$input = wp_parse_args($overwrite, $defaults);
1896 1896
 
1897 1897
 	return $input;
1898 1898
 }
1899 1899
 
1900
-function sd_get_float_group( $type = 'float', $overwrite = array() ) {
1900
+function sd_get_float_group($type = 'float', $overwrite = array()) {
1901 1901
 	$inputs = array();
1902 1902
 	$sizes  = array(
1903 1903
 		''    => 'Mobile',
@@ -1905,27 +1905,27 @@  discard block
 block discarded – undo
1905 1905
 		'_lg' => 'Desktop',
1906 1906
 	);
1907 1907
 
1908
-	if ( $overwrite !== false ) {
1908
+	if ($overwrite !== false) {
1909 1909
 
1910
-		foreach ( $sizes as $ds => $dt ) {
1910
+		foreach ($sizes as $ds => $dt) {
1911 1911
 			$overwrite['device_type'] = $dt;
1912
-			$inputs[ $type . $ds ]    = sd_get_float_input( $type, $overwrite );
1912
+			$inputs[$type . $ds]    = sd_get_float_input($type, $overwrite);
1913 1913
 		}
1914 1914
 	}
1915 1915
 
1916 1916
 	return $inputs;
1917 1917
 }
1918
-function sd_get_float_input( $type = 'float', $overwrite = array() ) {
1918
+function sd_get_float_input($type = 'float', $overwrite = array()) {
1919 1919
 	$device_size = '';
1920
-	if ( ! empty( $overwrite['device_type'] ) ) {
1921
-		if ( $overwrite['device_type'] == 'Tablet' ) {
1920
+	if (!empty($overwrite['device_type'])) {
1921
+		if ($overwrite['device_type'] == 'Tablet') {
1922 1922
 			$device_size = '-md';
1923
-		} elseif ( $overwrite['device_type'] == 'Desktop' ) {
1923
+		} elseif ($overwrite['device_type'] == 'Desktop') {
1924 1924
 			$device_size = '-lg';
1925 1925
 		}
1926 1926
 	}
1927 1927
 	$options = array(
1928
-		''                                      => __( 'Default', 'ayecode-connect' ),
1928
+		''                                      => __('Default', 'ayecode-connect'),
1929 1929
 		'float' . $device_size . '-start'       => 'left',
1930 1930
 		'float' . $device_size . '-end'         => 'right',
1931 1931
 		'float' . $device_size . '-none' => 'none',
@@ -1933,14 +1933,14 @@  discard block
 block discarded – undo
1933 1933
 
1934 1934
 	$defaults = array(
1935 1935
 		'type'     => 'select',
1936
-		'title'    => __( 'Float', 'ayecode-connect' ),
1936
+		'title'    => __('Float', 'ayecode-connect'),
1937 1937
 		'options'  => $options,
1938 1938
 		'default'  => '',
1939 1939
 		'desc_tip' => true,
1940
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1940
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
1941 1941
 	);
1942 1942
 
1943
-	$input = wp_parse_args( $overwrite, $defaults );
1943
+	$input = wp_parse_args($overwrite, $defaults);
1944 1944
 
1945 1945
 	return $input;
1946 1946
 }
@@ -1951,10 +1951,10 @@  discard block
 block discarded – undo
1951 1951
  *
1952 1952
  * @return array
1953 1953
  */
1954
-function sd_get_zindex_input( $type = 'zindex', $overwrite = array() ) {
1954
+function sd_get_zindex_input($type = 'zindex', $overwrite = array()) {
1955 1955
 
1956 1956
 	$options = array(
1957
-		''          => __( 'Default', 'ayecode-connect' ),
1957
+		''          => __('Default', 'ayecode-connect'),
1958 1958
 		'zindex-0'  => '0',
1959 1959
 		'zindex-1'  => '1',
1960 1960
 		'zindex-5'  => '5',
@@ -1963,14 +1963,14 @@  discard block
 block discarded – undo
1963 1963
 
1964 1964
 	$defaults = array(
1965 1965
 		'type'     => 'select',
1966
-		'title'    => __( 'Z-index', 'ayecode-connect' ),
1966
+		'title'    => __('Z-index', 'ayecode-connect'),
1967 1967
 		'options'  => $options,
1968 1968
 		'default'  => '',
1969 1969
 		'desc_tip' => true,
1970
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
1970
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
1971 1971
 	);
1972 1972
 
1973
-	$input = wp_parse_args( $overwrite, $defaults );
1973
+	$input = wp_parse_args($overwrite, $defaults);
1974 1974
 
1975 1975
 	return $input;
1976 1976
 }
@@ -1981,26 +1981,26 @@  discard block
 block discarded – undo
1981 1981
  *
1982 1982
  * @return array
1983 1983
  */
1984
-function sd_get_overflow_input( $type = 'overflow', $overwrite = array() ) {
1984
+function sd_get_overflow_input($type = 'overflow', $overwrite = array()) {
1985 1985
 
1986 1986
 	$options = array(
1987
-		''                 => __( 'Default', 'ayecode-connect' ),
1988
-		'overflow-auto'    => __( 'Auto', 'ayecode-connect' ),
1989
-		'overflow-hidden'  => __( 'Hidden', 'ayecode-connect' ),
1990
-		'overflow-visible' => __( 'Visible', 'ayecode-connect' ),
1991
-		'overflow-scroll'  => __( 'Scroll', 'ayecode-connect' ),
1987
+		''                 => __('Default', 'ayecode-connect'),
1988
+		'overflow-auto'    => __('Auto', 'ayecode-connect'),
1989
+		'overflow-hidden'  => __('Hidden', 'ayecode-connect'),
1990
+		'overflow-visible' => __('Visible', 'ayecode-connect'),
1991
+		'overflow-scroll'  => __('Scroll', 'ayecode-connect'),
1992 1992
 	);
1993 1993
 
1994 1994
 	$defaults = array(
1995 1995
 		'type'     => 'select',
1996
-		'title'    => __( 'Overflow', 'ayecode-connect' ),
1996
+		'title'    => __('Overflow', 'ayecode-connect'),
1997 1997
 		'options'  => $options,
1998 1998
 		'default'  => '',
1999 1999
 		'desc_tip' => true,
2000
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2000
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
2001 2001
 	);
2002 2002
 
2003
-	$input = wp_parse_args( $overwrite, $defaults );
2003
+	$input = wp_parse_args($overwrite, $defaults);
2004 2004
 
2005 2005
 	return $input;
2006 2006
 }
@@ -2011,19 +2011,19 @@  discard block
 block discarded – undo
2011 2011
  *
2012 2012
  * @return array
2013 2013
  */
2014
-function sd_get_max_height_input( $type = 'max_height', $overwrite = array() ) {
2014
+function sd_get_max_height_input($type = 'max_height', $overwrite = array()) {
2015 2015
 
2016 2016
 	$defaults = array(
2017 2017
 		'type'        => 'text',
2018
-		'title'       => __( 'Max height', 'ayecode-connect' ),
2018
+		'title'       => __('Max height', 'ayecode-connect'),
2019 2019
 		'value'       => '',
2020 2020
 		'default'     => '',
2021 2021
 		'placeholder' => '',
2022 2022
 		'desc_tip'    => true,
2023
-		'group'       => __( 'Wrapper Styles', 'ayecode-connect' ),
2023
+		'group'       => __('Wrapper Styles', 'ayecode-connect'),
2024 2024
 	);
2025 2025
 
2026
-	$input = wp_parse_args( $overwrite, $defaults );
2026
+	$input = wp_parse_args($overwrite, $defaults);
2027 2027
 
2028 2028
 	return $input;
2029 2029
 }
@@ -2034,23 +2034,23 @@  discard block
 block discarded – undo
2034 2034
  *
2035 2035
  * @return array
2036 2036
  */
2037
-function sd_get_scrollbars_input( $type = 'scrollbars', $overwrite = array() ) {
2037
+function sd_get_scrollbars_input($type = 'scrollbars', $overwrite = array()) {
2038 2038
 
2039 2039
 	$options = array(
2040
-		''               => __( 'Default', 'ayecode-connect' ),
2041
-		'scrollbars-ios' => __( 'IOS Style', 'ayecode-connect' ),
2040
+		''               => __('Default', 'ayecode-connect'),
2041
+		'scrollbars-ios' => __('IOS Style', 'ayecode-connect'),
2042 2042
 	);
2043 2043
 
2044 2044
 	$defaults = array(
2045 2045
 		'type'     => 'select',
2046
-		'title'    => __( 'Scrollbars', 'ayecode-connect' ),
2046
+		'title'    => __('Scrollbars', 'ayecode-connect'),
2047 2047
 		'options'  => $options,
2048 2048
 		'default'  => '',
2049 2049
 		'desc_tip' => true,
2050
-		'group'    => __( 'Wrapper Styles', 'ayecode-connect' ),
2050
+		'group'    => __('Wrapper Styles', 'ayecode-connect'),
2051 2051
 	);
2052 2052
 
2053
-	$input = wp_parse_args( $overwrite, $defaults );
2053
+	$input = wp_parse_args($overwrite, $defaults);
2054 2054
 
2055 2055
 	return $input;
2056 2056
 }
@@ -2061,17 +2061,17 @@  discard block
 block discarded – undo
2061 2061
  *
2062 2062
  * @return array
2063 2063
  */
2064
-function sd_get_new_window_input( $type = 'target', $overwrite = array() ) {
2064
+function sd_get_new_window_input($type = 'target', $overwrite = array()) {
2065 2065
 
2066 2066
 	$defaults = array(
2067 2067
 		'type'     => 'checkbox',
2068
-		'title'    => __( 'Open in new window', 'ayecode-connect' ),
2068
+		'title'    => __('Open in new window', 'ayecode-connect'),
2069 2069
 		'default'  => '',
2070 2070
 		'desc_tip' => true,
2071
-		'group'    => __( 'Link', 'ayecode-connect' ),
2071
+		'group'    => __('Link', 'ayecode-connect'),
2072 2072
 	);
2073 2073
 
2074
-	$input = wp_parse_args( $overwrite, $defaults );
2074
+	$input = wp_parse_args($overwrite, $defaults);
2075 2075
 
2076 2076
 	return $input;
2077 2077
 }
@@ -2082,17 +2082,17 @@  discard block
 block discarded – undo
2082 2082
  *
2083 2083
  * @return array
2084 2084
  */
2085
-function sd_get_nofollow_input( $type = 'nofollow', $overwrite = array() ) {
2085
+function sd_get_nofollow_input($type = 'nofollow', $overwrite = array()) {
2086 2086
 
2087 2087
 	$defaults = array(
2088 2088
 		'type'     => 'checkbox',
2089
-		'title'    => __( 'Add nofollow', 'ayecode-connect' ),
2089
+		'title'    => __('Add nofollow', 'ayecode-connect'),
2090 2090
 		'default'  => '',
2091 2091
 		'desc_tip' => true,
2092
-		'group'    => __( 'Link', 'ayecode-connect' ),
2092
+		'group'    => __('Link', 'ayecode-connect'),
2093 2093
 	);
2094 2094
 
2095
-	$input = wp_parse_args( $overwrite, $defaults );
2095
+	$input = wp_parse_args($overwrite, $defaults);
2096 2096
 
2097 2097
 	return $input;
2098 2098
 }
@@ -2103,19 +2103,19 @@  discard block
 block discarded – undo
2103 2103
  *
2104 2104
  * @return array
2105 2105
  */
2106
-function sd_get_attributes_input( $type = 'attributes', $overwrite = array() ) {
2106
+function sd_get_attributes_input($type = 'attributes', $overwrite = array()) {
2107 2107
 
2108 2108
 	$defaults = array(
2109 2109
 		'type'        => 'text',
2110
-		'title'       => __( 'Custom Attributes', 'ayecode-connect' ),
2110
+		'title'       => __('Custom Attributes', 'ayecode-connect'),
2111 2111
 		'value'       => '',
2112 2112
 		'default'     => '',
2113 2113
 		'placeholder' => 'key|value,key2|value2',
2114 2114
 		'desc_tip'    => true,
2115
-		'group'       => __( 'Link', 'ayecode-connect' ),
2115
+		'group'       => __('Link', 'ayecode-connect'),
2116 2116
 	);
2117 2117
 
2118
-	$input = wp_parse_args( $overwrite, $defaults );
2118
+	$input = wp_parse_args($overwrite, $defaults);
2119 2119
 
2120 2120
 	return $input;
2121 2121
 }
@@ -2125,28 +2125,28 @@  discard block
 block discarded – undo
2125 2125
  *
2126 2126
  * @return string
2127 2127
  */
2128
-function sd_build_attributes_string_escaped( $args ) {
2128
+function sd_build_attributes_string_escaped($args) {
2129 2129
 	global $aui_bs5;
2130 2130
 
2131 2131
 	$attributes = array();
2132 2132
 	$string_escaped = '';
2133 2133
 
2134
-	if ( ! empty( $args['custom'] ) ) {
2134
+	if (!empty($args['custom'])) {
2135 2135
 		$attributes = sd_parse_custom_attributes($args['custom']);
2136 2136
 	}
2137 2137
 
2138 2138
 	// new window
2139
-	if ( ! empty( $args['new_window'] ) ) {
2139
+	if (!empty($args['new_window'])) {
2140 2140
 		$attributes['target'] = '_blank';
2141 2141
 	}
2142 2142
 
2143 2143
 	// nofollow
2144
-	if ( ! empty( $args['nofollow'] ) ) {
2144
+	if (!empty($args['nofollow'])) {
2145 2145
 		$attributes['rel'] = isset($attributes['rel']) ? $attributes['rel'] . ' nofollow' : 'nofollow';
2146 2146
 	}
2147 2147
 
2148
-	if(!empty($attributes )){
2149
-		foreach ( $attributes as $key => $val ) {
2148
+	if (!empty($attributes)) {
2149
+		foreach ($attributes as $key => $val) {
2150 2150
 			$string_escaped .= esc_attr($key) . '="' . esc_attr($val) . '" ';
2151 2151
 		}
2152 2152
 	}
@@ -2162,36 +2162,36 @@  discard block
 block discarded – undo
2162 2162
  *
2163 2163
  * @return array
2164 2164
  */
2165
-function sd_parse_custom_attributes( $attributes_string, $delimiter = ',' ) {
2166
-	$attributes = explode( $delimiter, $attributes_string );
2165
+function sd_parse_custom_attributes($attributes_string, $delimiter = ',') {
2166
+	$attributes = explode($delimiter, $attributes_string);
2167 2167
 	$result = [];
2168 2168
 
2169
-	foreach ( $attributes as $attribute ) {
2170
-		$attr_key_value = explode( '|', $attribute );
2169
+	foreach ($attributes as $attribute) {
2170
+		$attr_key_value = explode('|', $attribute);
2171 2171
 
2172
-		$attr_key = mb_strtolower( $attr_key_value[0] );
2172
+		$attr_key = mb_strtolower($attr_key_value[0]);
2173 2173
 
2174 2174
 		// Remove any not allowed characters.
2175
-		preg_match( '/[-_a-z0-9]+/', $attr_key, $attr_key_matches );
2175
+		preg_match('/[-_a-z0-9]+/', $attr_key, $attr_key_matches);
2176 2176
 
2177
-		if ( empty( $attr_key_matches[0] ) ) {
2177
+		if (empty($attr_key_matches[0])) {
2178 2178
 			continue;
2179 2179
 		}
2180 2180
 
2181 2181
 		$attr_key = $attr_key_matches[0];
2182 2182
 
2183 2183
 		// Avoid Javascript events and unescaped href.
2184
-		if ( 'href' === $attr_key || 'on' === substr( $attr_key, 0, 2 ) ) {
2184
+		if ('href' === $attr_key || 'on' === substr($attr_key, 0, 2)) {
2185 2185
 			continue;
2186 2186
 		}
2187 2187
 
2188
-		if ( isset( $attr_key_value[1] ) ) {
2189
-			$attr_value = trim( $attr_key_value[1] );
2188
+		if (isset($attr_key_value[1])) {
2189
+			$attr_value = trim($attr_key_value[1]);
2190 2190
 		} else {
2191 2191
 			$attr_value = '';
2192 2192
 		}
2193 2193
 
2194
-		$result[ $attr_key ] = $attr_value;
2194
+		$result[$attr_key] = $attr_value;
2195 2195
 	}
2196 2196
 
2197 2197
 	return $result;
@@ -2205,12 +2205,12 @@  discard block
 block discarded – undo
2205 2205
  * @return string
2206 2206
  * @todo find best way to use px- py- or general p-
2207 2207
  */
2208
-function sd_build_aui_class( $args ) {
2208
+function sd_build_aui_class($args) {
2209 2209
 	global $aui_bs5;
2210 2210
 
2211 2211
 	$classes = array();
2212 2212
 
2213
-	if ( $aui_bs5 ) {
2213
+	if ($aui_bs5) {
2214 2214
 		$p_ml = 'ms-';
2215 2215
 		$p_mr = 'me-';
2216 2216
 
@@ -2225,254 +2225,254 @@  discard block
 block discarded – undo
2225 2225
 	}
2226 2226
 
2227 2227
 	// margins.
2228
-	if ( isset( $args['mt'] ) && $args['mt'] !== '' ) {
2229
-		$classes[] = 'mt-' . sanitize_html_class( $args['mt'] );
2228
+	if (isset($args['mt']) && $args['mt'] !== '') {
2229
+		$classes[] = 'mt-' . sanitize_html_class($args['mt']);
2230 2230
 		$mt        = $args['mt'];
2231 2231
 	} else {
2232 2232
 		$mt = null;
2233 2233
 	}
2234
-	if ( isset( $args['mr'] ) && $args['mr'] !== '' ) {
2235
-		$classes[] = $p_mr . sanitize_html_class( $args['mr'] );
2234
+	if (isset($args['mr']) && $args['mr'] !== '') {
2235
+		$classes[] = $p_mr . sanitize_html_class($args['mr']);
2236 2236
 		$mr        = $args['mr'];
2237 2237
 	} else {
2238 2238
 		$mr = null;
2239 2239
 	}
2240
-	if ( isset( $args['mb'] ) && $args['mb'] !== '' ) {
2241
-		$classes[] = 'mb-' . sanitize_html_class( $args['mb'] );
2240
+	if (isset($args['mb']) && $args['mb'] !== '') {
2241
+		$classes[] = 'mb-' . sanitize_html_class($args['mb']);
2242 2242
 		$mb        = $args['mb'];
2243 2243
 	} else {
2244 2244
 		$mb = null;
2245 2245
 	}
2246
-	if ( isset( $args['ml'] ) && $args['ml'] !== '' ) {
2247
-		$classes[] = $p_ml . sanitize_html_class( $args['ml'] );
2246
+	if (isset($args['ml']) && $args['ml'] !== '') {
2247
+		$classes[] = $p_ml . sanitize_html_class($args['ml']);
2248 2248
 		$ml        = $args['ml'];
2249 2249
 	} else {
2250 2250
 		$ml = null;
2251 2251
 	}
2252 2252
 
2253 2253
 	// margins tablet.
2254
-	if ( isset( $args['mt_md'] ) && $args['mt_md'] !== '' ) {
2255
-		$classes[] = 'mt-md-' . sanitize_html_class( $args['mt_md'] );
2254
+	if (isset($args['mt_md']) && $args['mt_md'] !== '') {
2255
+		$classes[] = 'mt-md-' . sanitize_html_class($args['mt_md']);
2256 2256
 		$mt_md     = $args['mt_md'];
2257 2257
 	} else {
2258 2258
 		$mt_md = null;
2259 2259
 	}
2260
-	if ( isset( $args['mr_md'] ) && $args['mr_md'] !== '' ) {
2261
-		$classes[] = $p_mr . 'md-' . sanitize_html_class( $args['mr_md'] );
2260
+	if (isset($args['mr_md']) && $args['mr_md'] !== '') {
2261
+		$classes[] = $p_mr . 'md-' . sanitize_html_class($args['mr_md']);
2262 2262
 		$mt_md     = $args['mr_md'];
2263 2263
 	} else {
2264 2264
 		$mr_md = null;
2265 2265
 	}
2266
-	if ( isset( $args['mb_md'] ) && $args['mb_md'] !== '' ) {
2267
-		$classes[] = 'mb-md-' . sanitize_html_class( $args['mb_md'] );
2266
+	if (isset($args['mb_md']) && $args['mb_md'] !== '') {
2267
+		$classes[] = 'mb-md-' . sanitize_html_class($args['mb_md']);
2268 2268
 		$mt_md     = $args['mb_md'];
2269 2269
 	} else {
2270 2270
 		$mb_md = null;
2271 2271
 	}
2272
-	if ( isset( $args['ml_md'] ) && $args['ml_md'] !== '' ) {
2273
-		$classes[] = $p_ml . 'md-' . sanitize_html_class( $args['ml_md'] );
2272
+	if (isset($args['ml_md']) && $args['ml_md'] !== '') {
2273
+		$classes[] = $p_ml . 'md-' . sanitize_html_class($args['ml_md']);
2274 2274
 		$mt_md     = $args['ml_md'];
2275 2275
 	} else {
2276 2276
 		$ml_md = null;
2277 2277
 	}
2278 2278
 
2279 2279
 	// margins desktop.
2280
-	if ( isset( $args['mt_lg'] ) && $args['mt_lg'] !== '' ) {
2281
-		if ( $mt == null && $mt_md == null ) {
2282
-			$classes[] = 'mt-' . sanitize_html_class( $args['mt_lg'] );
2280
+	if (isset($args['mt_lg']) && $args['mt_lg'] !== '') {
2281
+		if ($mt == null && $mt_md == null) {
2282
+			$classes[] = 'mt-' . sanitize_html_class($args['mt_lg']);
2283 2283
 		} else {
2284
-			$classes[] = 'mt-lg-' . sanitize_html_class( $args['mt_lg'] );
2284
+			$classes[] = 'mt-lg-' . sanitize_html_class($args['mt_lg']);
2285 2285
 		}
2286 2286
 	}
2287
-	if ( isset( $args['mr_lg'] ) && $args['mr_lg'] !== '' ) {
2288
-		if ( $mr == null && $mr_md == null ) {
2289
-			$classes[] = $p_mr . sanitize_html_class( $args['mr_lg'] );
2287
+	if (isset($args['mr_lg']) && $args['mr_lg'] !== '') {
2288
+		if ($mr == null && $mr_md == null) {
2289
+			$classes[] = $p_mr . sanitize_html_class($args['mr_lg']);
2290 2290
 		} else {
2291
-			$classes[] = $p_mr . 'lg-' . sanitize_html_class( $args['mr_lg'] );
2291
+			$classes[] = $p_mr . 'lg-' . sanitize_html_class($args['mr_lg']);
2292 2292
 		}
2293 2293
 	}
2294
-	if ( isset( $args['mb_lg'] ) && $args['mb_lg'] !== '' ) {
2295
-		if ( $mb == null && $mb_md == null ) {
2296
-			$classes[] = 'mb-' . sanitize_html_class( $args['mb_lg'] );
2294
+	if (isset($args['mb_lg']) && $args['mb_lg'] !== '') {
2295
+		if ($mb == null && $mb_md == null) {
2296
+			$classes[] = 'mb-' . sanitize_html_class($args['mb_lg']);
2297 2297
 		} else {
2298
-			$classes[] = 'mb-lg-' . sanitize_html_class( $args['mb_lg'] );
2298
+			$classes[] = 'mb-lg-' . sanitize_html_class($args['mb_lg']);
2299 2299
 		}
2300 2300
 	}
2301
-	if ( isset( $args['ml_lg'] ) && $args['ml_lg'] !== '' ) {
2302
-		if ( $ml == null && $ml_md == null ) {
2303
-			$classes[] = $p_ml . sanitize_html_class( $args['ml_lg'] );
2301
+	if (isset($args['ml_lg']) && $args['ml_lg'] !== '') {
2302
+		if ($ml == null && $ml_md == null) {
2303
+			$classes[] = $p_ml . sanitize_html_class($args['ml_lg']);
2304 2304
 		} else {
2305
-			$classes[] = $p_ml . 'lg-' . sanitize_html_class( $args['ml_lg'] );
2305
+			$classes[] = $p_ml . 'lg-' . sanitize_html_class($args['ml_lg']);
2306 2306
 		}
2307 2307
 	}
2308 2308
 
2309 2309
 	// padding.
2310
-	if ( isset( $args['pt'] ) && $args['pt'] !== '' ) {
2311
-		$classes[] = 'pt-' . sanitize_html_class( $args['pt'] );
2310
+	if (isset($args['pt']) && $args['pt'] !== '') {
2311
+		$classes[] = 'pt-' . sanitize_html_class($args['pt']);
2312 2312
 		$pt        = $args['pt'];
2313 2313
 	} else {
2314 2314
 		$pt = null;
2315 2315
 	}
2316
-	if ( isset( $args['pr'] ) && $args['pr'] !== '' ) {
2317
-		$classes[] = $p_pr . sanitize_html_class( $args['pr'] );
2316
+	if (isset($args['pr']) && $args['pr'] !== '') {
2317
+		$classes[] = $p_pr . sanitize_html_class($args['pr']);
2318 2318
 		$pr        = $args['pr'];
2319 2319
 	} else {
2320 2320
 		$pr = null;
2321 2321
 	}
2322
-	if ( isset( $args['pb'] ) && $args['pb'] !== '' ) {
2323
-		$classes[] = 'pb-' . sanitize_html_class( $args['pb'] );
2322
+	if (isset($args['pb']) && $args['pb'] !== '') {
2323
+		$classes[] = 'pb-' . sanitize_html_class($args['pb']);
2324 2324
 		$pb        = $args['pb'];
2325 2325
 	} else {
2326 2326
 		$pb = null;
2327 2327
 	}
2328
-	if ( isset( $args['pl'] ) && $args['pl'] !== '' ) {
2329
-		$classes[] = $p_pl . sanitize_html_class( $args['pl'] );
2328
+	if (isset($args['pl']) && $args['pl'] !== '') {
2329
+		$classes[] = $p_pl . sanitize_html_class($args['pl']);
2330 2330
 		$pl        = $args['pl'];
2331 2331
 	} else {
2332 2332
 		$pl = null;
2333 2333
 	}
2334 2334
 
2335 2335
 	// padding tablet.
2336
-	if ( isset( $args['pt_md'] ) && $args['pt_md'] !== '' ) {
2337
-		$classes[] = 'pt-md-' . sanitize_html_class( $args['pt_md'] );
2336
+	if (isset($args['pt_md']) && $args['pt_md'] !== '') {
2337
+		$classes[] = 'pt-md-' . sanitize_html_class($args['pt_md']);
2338 2338
 		$pt_md     = $args['pt_md'];
2339 2339
 	} else {
2340 2340
 		$pt_md = null;
2341 2341
 	}
2342
-	if ( isset( $args['pr_md'] ) && $args['pr_md'] !== '' ) {
2343
-		$classes[] = $p_pr . 'md-' . sanitize_html_class( $args['pr_md'] );
2342
+	if (isset($args['pr_md']) && $args['pr_md'] !== '') {
2343
+		$classes[] = $p_pr . 'md-' . sanitize_html_class($args['pr_md']);
2344 2344
 		$pr_md     = $args['pr_md'];
2345 2345
 	} else {
2346 2346
 		$pr_md = null;
2347 2347
 	}
2348
-	if ( isset( $args['pb_md'] ) && $args['pb_md'] !== '' ) {
2349
-		$classes[] = 'pb-md-' . sanitize_html_class( $args['pb_md'] );
2348
+	if (isset($args['pb_md']) && $args['pb_md'] !== '') {
2349
+		$classes[] = 'pb-md-' . sanitize_html_class($args['pb_md']);
2350 2350
 		$pb_md     = $args['pb_md'];
2351 2351
 	} else {
2352 2352
 		$pb_md = null;
2353 2353
 	}
2354
-	if ( isset( $args['pl_md'] ) && $args['pl_md'] !== '' ) {
2355
-		$classes[] = $p_pl . 'md-' . sanitize_html_class( $args['pl_md'] );
2354
+	if (isset($args['pl_md']) && $args['pl_md'] !== '') {
2355
+		$classes[] = $p_pl . 'md-' . sanitize_html_class($args['pl_md']);
2356 2356
 		$pl_md     = $args['pl_md'];
2357 2357
 	} else {
2358 2358
 		$pl_md = null;
2359 2359
 	}
2360 2360
 
2361 2361
 	// padding desktop.
2362
-	if ( isset( $args['pt_lg'] ) && $args['pt_lg'] !== '' ) {
2363
-		if ( $pt == null && $pt_md == null ) {
2364
-			$classes[] = 'pt-' . sanitize_html_class( $args['pt_lg'] );
2362
+	if (isset($args['pt_lg']) && $args['pt_lg'] !== '') {
2363
+		if ($pt == null && $pt_md == null) {
2364
+			$classes[] = 'pt-' . sanitize_html_class($args['pt_lg']);
2365 2365
 		} else {
2366
-			$classes[] = 'pt-lg-' . sanitize_html_class( $args['pt_lg'] );
2366
+			$classes[] = 'pt-lg-' . sanitize_html_class($args['pt_lg']);
2367 2367
 		}
2368 2368
 	}
2369
-	if ( isset( $args['pr_lg'] ) && $args['pr_lg'] !== '' ) {
2370
-		if ( $pr == null && $pr_md == null ) {
2371
-			$classes[] = $p_pr . sanitize_html_class( $args['pr_lg'] );
2369
+	if (isset($args['pr_lg']) && $args['pr_lg'] !== '') {
2370
+		if ($pr == null && $pr_md == null) {
2371
+			$classes[] = $p_pr . sanitize_html_class($args['pr_lg']);
2372 2372
 		} else {
2373
-			$classes[] = $p_pr . 'lg-' . sanitize_html_class( $args['pr_lg'] );
2373
+			$classes[] = $p_pr . 'lg-' . sanitize_html_class($args['pr_lg']);
2374 2374
 		}
2375 2375
 	}
2376
-	if ( isset( $args['pb_lg'] ) && $args['pb_lg'] !== '' ) {
2377
-		if ( $pb == null && $pb_md == null ) {
2378
-			$classes[] = 'pb-' . sanitize_html_class( $args['pb_lg'] );
2376
+	if (isset($args['pb_lg']) && $args['pb_lg'] !== '') {
2377
+		if ($pb == null && $pb_md == null) {
2378
+			$classes[] = 'pb-' . sanitize_html_class($args['pb_lg']);
2379 2379
 		} else {
2380
-			$classes[] = 'pb-lg-' . sanitize_html_class( $args['pb_lg'] );
2380
+			$classes[] = 'pb-lg-' . sanitize_html_class($args['pb_lg']);
2381 2381
 		}
2382 2382
 	}
2383
-	if ( isset( $args['pl_lg'] ) && $args['pl_lg'] !== '' ) {
2384
-		if ( $pl == null && $pl_md == null ) {
2385
-			$classes[] = $p_pl . sanitize_html_class( $args['pl_lg'] );
2383
+	if (isset($args['pl_lg']) && $args['pl_lg'] !== '') {
2384
+		if ($pl == null && $pl_md == null) {
2385
+			$classes[] = $p_pl . sanitize_html_class($args['pl_lg']);
2386 2386
 		} else {
2387
-			$classes[] = $p_pl . 'lg-' . sanitize_html_class( $args['pl_lg'] );
2387
+			$classes[] = $p_pl . 'lg-' . sanitize_html_class($args['pl_lg']);
2388 2388
 		}
2389 2389
 	}
2390 2390
 
2391 2391
 	// row cols, mobile, tablet, desktop
2392
-	if ( ! empty( $args['row_cols'] ) && $args['row_cols'] !== '' ) {
2393
-		$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols'] );
2392
+	if (!empty($args['row_cols']) && $args['row_cols'] !== '') {
2393
+		$classes[] = sanitize_html_class('row-cols-' . $args['row_cols']);
2394 2394
 		$row_cols  = $args['row_cols'];
2395 2395
 	} else {
2396 2396
 		$row_cols = null;
2397 2397
 	}
2398
-	if ( ! empty( $args['row_cols_md'] ) && $args['row_cols_md'] !== '' ) {
2399
-		$classes[]   = sanitize_html_class( 'row-cols-md-' . $args['row_cols_md'] );
2398
+	if (!empty($args['row_cols_md']) && $args['row_cols_md'] !== '') {
2399
+		$classes[]   = sanitize_html_class('row-cols-md-' . $args['row_cols_md']);
2400 2400
 		$row_cols_md = $args['row_cols_md'];
2401 2401
 	} else {
2402 2402
 		$row_cols_md = null;
2403 2403
 	}
2404
-	if ( ! empty( $args['row_cols_lg'] ) && $args['row_cols_lg'] !== '' ) {
2405
-		if ( $row_cols == null && $row_cols_md == null ) {
2406
-			$classes[] = sanitize_html_class( 'row-cols-' . $args['row_cols_lg'] );
2404
+	if (!empty($args['row_cols_lg']) && $args['row_cols_lg'] !== '') {
2405
+		if ($row_cols == null && $row_cols_md == null) {
2406
+			$classes[] = sanitize_html_class('row-cols-' . $args['row_cols_lg']);
2407 2407
 		} else {
2408
-			$classes[] = sanitize_html_class( 'row-cols-lg-' . $args['row_cols_lg'] );
2408
+			$classes[] = sanitize_html_class('row-cols-lg-' . $args['row_cols_lg']);
2409 2409
 		}
2410 2410
 	}
2411 2411
 
2412 2412
 	// columns , mobile, tablet, desktop
2413
-	if ( ! empty( $args['col'] ) && $args['col'] !== '' ) {
2414
-		$classes[] = sanitize_html_class( 'col-' . $args['col'] );
2413
+	if (!empty($args['col']) && $args['col'] !== '') {
2414
+		$classes[] = sanitize_html_class('col-' . $args['col']);
2415 2415
 		$col       = $args['col'];
2416 2416
 	} else {
2417 2417
 		$col = null;
2418 2418
 	}
2419
-	if ( ! empty( $args['col_md'] ) && $args['col_md'] !== '' ) {
2420
-		$classes[] = sanitize_html_class( 'col-md-' . $args['col_md'] );
2419
+	if (!empty($args['col_md']) && $args['col_md'] !== '') {
2420
+		$classes[] = sanitize_html_class('col-md-' . $args['col_md']);
2421 2421
 		$col_md    = $args['col_md'];
2422 2422
 	} else {
2423 2423
 		$col_md = null;
2424 2424
 	}
2425
-	if ( ! empty( $args['col_lg'] ) && $args['col_lg'] !== '' ) {
2426
-		if ( $col == null && $col_md == null ) {
2427
-			$classes[] = sanitize_html_class( 'col-' . $args['col_lg'] );
2425
+	if (!empty($args['col_lg']) && $args['col_lg'] !== '') {
2426
+		if ($col == null && $col_md == null) {
2427
+			$classes[] = sanitize_html_class('col-' . $args['col_lg']);
2428 2428
 		} else {
2429
-			$classes[] = sanitize_html_class( 'col-lg-' . $args['col_lg'] );
2429
+			$classes[] = sanitize_html_class('col-lg-' . $args['col_lg']);
2430 2430
 		}
2431 2431
 	}
2432 2432
 
2433 2433
 	// border
2434
-	if ( isset( $args['border'] ) && ( $args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0 ) ) {
2434
+	if (isset($args['border']) && ($args['border'] == 'none' || $args['border'] === '0' || $args['border'] === 0)) {
2435 2435
 		$classes[] = 'border-0';
2436
-	} elseif ( ! empty( $args['border'] ) ) {
2436
+	} elseif (!empty($args['border'])) {
2437 2437
 		$border_class = 'border';
2438
-		if ( ! empty( $args['border_type'] ) && strpos( $args['border_type'], '-0' ) === false ) {
2438
+		if (!empty($args['border_type']) && strpos($args['border_type'], '-0') === false) {
2439 2439
 			$border_class = '';
2440 2440
 		}
2441
-		$classes[] = $border_class . ' border-' . sanitize_html_class( $args['border'] );
2441
+		$classes[] = $border_class . ' border-' . sanitize_html_class($args['border']);
2442 2442
 	}
2443 2443
 
2444 2444
 	// border radius type
2445
-	if ( ! empty( $args['rounded'] ) ) {
2446
-		$classes[] = sanitize_html_class( $args['rounded'] );
2445
+	if (!empty($args['rounded'])) {
2446
+		$classes[] = sanitize_html_class($args['rounded']);
2447 2447
 	}
2448 2448
 
2449 2449
 	// border radius size BS4
2450
-	if ( isset( $args['rounded_size'] ) && in_array( $args['rounded_size'], array( 'sm', 'lg' ) ) ) {
2451
-		$classes[] = 'rounded-' . sanitize_html_class( $args['rounded_size'] );
2450
+	if (isset($args['rounded_size']) && in_array($args['rounded_size'], array('sm', 'lg'))) {
2451
+		$classes[] = 'rounded-' . sanitize_html_class($args['rounded_size']);
2452 2452
 		// if we set a size then we need to remove "rounded" if set
2453
-		if ( ( $key = array_search( 'rounded', $classes ) ) !== false ) {
2454
-			unset( $classes[ $key ] );
2453
+		if (($key = array_search('rounded', $classes)) !== false) {
2454
+			unset($classes[$key]);
2455 2455
 		}
2456 2456
 	} else {
2457 2457
 
2458 2458
 		// border radius size , mobile, tablet, desktop
2459
-		if ( isset( $args['rounded_size'] ) && $args['rounded_size'] !== '' ) {
2460
-			$classes[]    = sanitize_html_class( 'rounded-' . $args['rounded_size'] );
2459
+		if (isset($args['rounded_size']) && $args['rounded_size'] !== '') {
2460
+			$classes[]    = sanitize_html_class('rounded-' . $args['rounded_size']);
2461 2461
 			$rounded_size = $args['rounded_size'];
2462 2462
 		} else {
2463 2463
 			$rounded_size = null;
2464 2464
 		}
2465
-		if ( isset( $args['rounded_size_md'] ) && $args['rounded_size_md'] !== '' ) {
2466
-			$classes[]       = sanitize_html_class( 'rounded-md-' . $args['rounded_size_md'] );
2465
+		if (isset($args['rounded_size_md']) && $args['rounded_size_md'] !== '') {
2466
+			$classes[]       = sanitize_html_class('rounded-md-' . $args['rounded_size_md']);
2467 2467
 			$rounded_size_md = $args['rounded_size_md'];
2468 2468
 		} else {
2469 2469
 			$rounded_size_md = null;
2470 2470
 		}
2471
-		if ( isset( $args['rounded_size_lg'] ) && $args['rounded_size_lg'] !== '' ) {
2472
-			if ( $rounded_size == null && $rounded_size_md == null ) {
2473
-				$classes[] = sanitize_html_class( 'rounded-' . $args['rounded_size_lg'] );
2471
+		if (isset($args['rounded_size_lg']) && $args['rounded_size_lg'] !== '') {
2472
+			if ($rounded_size == null && $rounded_size_md == null) {
2473
+				$classes[] = sanitize_html_class('rounded-' . $args['rounded_size_lg']);
2474 2474
 			} else {
2475
-				$classes[] = sanitize_html_class( 'rounded-lg-' . $args['rounded_size_lg'] );
2475
+				$classes[] = sanitize_html_class('rounded-lg-' . $args['rounded_size_lg']);
2476 2476
 			}
2477 2477
 		}
2478 2478
 	}
@@ -2481,144 +2481,144 @@  discard block
 block discarded – undo
2481 2481
 	//if ( !empty( $args['shadow'] ) ) { $classes[] = sanitize_html_class($args['shadow']); }
2482 2482
 
2483 2483
 	// background
2484
-	if ( ! empty( $args['bg'] ) ) {
2485
-		$classes[] = 'bg-' . sanitize_html_class( $args['bg'] );
2484
+	if (!empty($args['bg'])) {
2485
+		$classes[] = 'bg-' . sanitize_html_class($args['bg']);
2486 2486
 	}
2487 2487
 
2488 2488
 	// text_color
2489
-	if ( ! empty( $args['text_color'] ) ) {
2490
-		$classes[] = 'text-' . sanitize_html_class( $args['text_color'] );
2489
+	if (!empty($args['text_color'])) {
2490
+		$classes[] = 'text-' . sanitize_html_class($args['text_color']);
2491 2491
 	}
2492 2492
 
2493 2493
 	// text_align
2494
-	if ( ! empty( $args['text_justify'] ) ) {
2494
+	if (!empty($args['text_justify'])) {
2495 2495
 		$classes[] = 'text-justify';
2496 2496
 	} else {
2497
-		if ( ! empty( $args['text_align'] ) ) {
2498
-			$classes[]  = sanitize_html_class( $args['text_align'] );
2497
+		if (!empty($args['text_align'])) {
2498
+			$classes[]  = sanitize_html_class($args['text_align']);
2499 2499
 			$text_align = $args['text_align'];
2500 2500
 		} else {
2501 2501
 			$text_align = null;
2502 2502
 		}
2503
-		if ( ! empty( $args['text_align_md'] ) && $args['text_align_md'] !== '' ) {
2504
-			$classes[]     = sanitize_html_class( $args['text_align_md'] );
2503
+		if (!empty($args['text_align_md']) && $args['text_align_md'] !== '') {
2504
+			$classes[]     = sanitize_html_class($args['text_align_md']);
2505 2505
 			$text_align_md = $args['text_align_md'];
2506 2506
 		} else {
2507 2507
 			$text_align_md = null;
2508 2508
 		}
2509
-		if ( ! empty( $args['text_align_lg'] ) && $args['text_align_lg'] !== '' ) {
2510
-			if ( $text_align == null && $text_align_md == null ) {
2511
-				$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['text_align_lg'] ) );
2509
+		if (!empty($args['text_align_lg']) && $args['text_align_lg'] !== '') {
2510
+			if ($text_align == null && $text_align_md == null) {
2511
+				$classes[] = sanitize_html_class(str_replace('-lg', '', $args['text_align_lg']));
2512 2512
 			} else {
2513
-				$classes[] = sanitize_html_class( $args['text_align_lg'] );
2513
+				$classes[] = sanitize_html_class($args['text_align_lg']);
2514 2514
 			}
2515 2515
 		}
2516 2516
 	}
2517 2517
 
2518 2518
 	// display
2519
-	if ( ! empty( $args['display'] ) ) {
2520
-		$classes[] = sanitize_html_class( $args['display'] );
2519
+	if (!empty($args['display'])) {
2520
+		$classes[] = sanitize_html_class($args['display']);
2521 2521
 		$display   = $args['display'];
2522 2522
 	} else {
2523 2523
 		$display = null;
2524 2524
 	}
2525
-	if ( ! empty( $args['display_md'] ) && $args['display_md'] !== '' ) {
2526
-		$classes[]  = sanitize_html_class( $args['display_md'] );
2525
+	if (!empty($args['display_md']) && $args['display_md'] !== '') {
2526
+		$classes[]  = sanitize_html_class($args['display_md']);
2527 2527
 		$display_md = $args['display_md'];
2528 2528
 	} else {
2529 2529
 		$display_md = null;
2530 2530
 	}
2531
-	if ( ! empty( $args['display_lg'] ) && $args['display_lg'] !== '' ) {
2532
-		if ( $display == null && $display_md == null ) {
2533
-			$classes[] = sanitize_html_class( str_replace( '-lg', '', $args['display_lg'] ) );
2531
+	if (!empty($args['display_lg']) && $args['display_lg'] !== '') {
2532
+		if ($display == null && $display_md == null) {
2533
+			$classes[] = sanitize_html_class(str_replace('-lg', '', $args['display_lg']));
2534 2534
 		} else {
2535
-			$classes[] = sanitize_html_class( $args['display_lg'] );
2535
+			$classes[] = sanitize_html_class($args['display_lg']);
2536 2536
 		}
2537 2537
 	}
2538 2538
 
2539 2539
 	// bgtus - background transparent until scroll
2540
-	if ( ! empty( $args['bgtus'] ) ) {
2541
-		$classes[] = sanitize_html_class( 'bg-transparent-until-scroll' );
2540
+	if (!empty($args['bgtus'])) {
2541
+		$classes[] = sanitize_html_class('bg-transparent-until-scroll');
2542 2542
 	}
2543 2543
 
2544 2544
 	// cscos - change color scheme on scroll
2545
-	if ( ! empty( $args['bgtus'] ) && ! empty( $args['cscos'] ) ) {
2546
-		$classes[] = sanitize_html_class( 'color-scheme-flip-on-scroll' );
2545
+	if (!empty($args['bgtus']) && !empty($args['cscos'])) {
2546
+		$classes[] = sanitize_html_class('color-scheme-flip-on-scroll');
2547 2547
 	}
2548 2548
 
2549 2549
 	// hover animations
2550
-	if ( ! empty( $args['hover_animations'] ) ) {
2551
-		$classes[] = sd_sanitize_html_classes( str_replace( ',', ' ', $args['hover_animations'] ) );
2550
+	if (!empty($args['hover_animations'])) {
2551
+		$classes[] = sd_sanitize_html_classes(str_replace(',', ' ', $args['hover_animations']));
2552 2552
 	}
2553 2553
 
2554 2554
 	// absolute_position
2555
-	if ( ! empty( $args['absolute_position'] ) ) {
2556
-		if ( 'top-left' === $args['absolute_position'] ) {
2555
+	if (!empty($args['absolute_position'])) {
2556
+		if ('top-left' === $args['absolute_position']) {
2557 2557
 			$classes[] = 'start-0 top-0';
2558
-		} elseif ( 'top-center' === $args['absolute_position'] ) {
2558
+		} elseif ('top-center' === $args['absolute_position']) {
2559 2559
 			$classes[] = 'start-50 top-0 translate-middle';
2560
-		} elseif ( 'top-right' === $args['absolute_position'] ) {
2560
+		} elseif ('top-right' === $args['absolute_position']) {
2561 2561
 			$classes[] = 'end-0 top-0';
2562
-		} elseif ( 'center-left' === $args['absolute_position'] ) {
2562
+		} elseif ('center-left' === $args['absolute_position']) {
2563 2563
 			$classes[] = 'start-0 top-50';
2564
-		} elseif ( 'center' === $args['absolute_position'] ) {
2564
+		} elseif ('center' === $args['absolute_position']) {
2565 2565
 			$classes[] = 'start-50 top-50 translate-middle';
2566
-		} elseif ( 'center-right' === $args['absolute_position'] ) {
2566
+		} elseif ('center-right' === $args['absolute_position']) {
2567 2567
 			$classes[] = 'end-0 top-50';
2568
-		} elseif ( 'bottom-left' === $args['absolute_position'] ) {
2568
+		} elseif ('bottom-left' === $args['absolute_position']) {
2569 2569
 			$classes[] = 'start-0 bottom-0';
2570
-		} elseif ( 'bottom-center' === $args['absolute_position'] ) {
2570
+		} elseif ('bottom-center' === $args['absolute_position']) {
2571 2571
 			$classes[] = 'start-50 bottom-0 translate-middle';
2572
-		} elseif ( 'bottom-right' === $args['absolute_position'] ) {
2572
+		} elseif ('bottom-right' === $args['absolute_position']) {
2573 2573
 			$classes[] = 'end-0 bottom-0';
2574 2574
 		}
2575 2575
 	}
2576 2576
 
2577 2577
 	// build classes from build keys
2578 2578
 	$build_keys = sd_get_class_build_keys();
2579
-	if ( ! empty( $build_keys ) ) {
2580
-		foreach ( $build_keys as $key ) {
2579
+	if (!empty($build_keys)) {
2580
+		foreach ($build_keys as $key) {
2581 2581
 
2582
-			if ( substr( $key, -4 ) == '-MTD' ) {
2582
+			if (substr($key, -4) == '-MTD') {
2583 2583
 
2584
-				$k = str_replace( '-MTD', '', $key );
2584
+				$k = str_replace('-MTD', '', $key);
2585 2585
 
2586 2586
 				// Mobile, Tablet, Desktop
2587
-				if ( ! empty( $args[ $k ] ) && $args[ $k ] !== '' ) {
2588
-					$classes[] = sanitize_html_class( $args[ $k ] );
2589
-					$v         = $args[ $k ];
2587
+				if (!empty($args[$k]) && $args[$k] !== '') {
2588
+					$classes[] = sanitize_html_class($args[$k]);
2589
+					$v         = $args[$k];
2590 2590
 				} else {
2591 2591
 					$v = null;
2592 2592
 				}
2593
-				if ( ! empty( $args[ $k . '_md' ] ) && $args[ $k . '_md' ] !== '' ) {
2594
-					$classes[] = sanitize_html_class( $args[ $k . '_md' ] );
2595
-					$v_md      = $args[ $k . '_md' ];
2593
+				if (!empty($args[$k . '_md']) && $args[$k . '_md'] !== '') {
2594
+					$classes[] = sanitize_html_class($args[$k . '_md']);
2595
+					$v_md      = $args[$k . '_md'];
2596 2596
 				} else {
2597 2597
 					$v_md = null;
2598 2598
 				}
2599
-				if ( ! empty( $args[ $k . '_lg' ] ) && $args[ $k . '_lg' ] !== '' ) {
2600
-					if ( $v == null && $v_md == null ) {
2601
-						$classes[] = sanitize_html_class( str_replace( '-lg', '', $args[ $k . '_lg' ] ) );
2599
+				if (!empty($args[$k . '_lg']) && $args[$k . '_lg'] !== '') {
2600
+					if ($v == null && $v_md == null) {
2601
+						$classes[] = sanitize_html_class(str_replace('-lg', '', $args[$k . '_lg']));
2602 2602
 					} else {
2603
-						$classes[] = sanitize_html_class( $args[ $k . '_lg' ] );
2603
+						$classes[] = sanitize_html_class($args[$k . '_lg']);
2604 2604
 					}
2605 2605
 				}
2606 2606
 			} else {
2607
-				if ( $key == 'font_size' && ! empty( $args[ $key ] ) && $args[ $key ] == 'custom' ) {
2607
+				if ($key == 'font_size' && !empty($args[$key]) && $args[$key] == 'custom') {
2608 2608
 					continue;
2609 2609
 				}
2610
-				if ( ! empty( $args[ $key ] ) ) {
2611
-					$classes[] = sd_sanitize_html_classes( $args[ $key ] );
2610
+				if (!empty($args[$key])) {
2611
+					$classes[] = sd_sanitize_html_classes($args[$key]);
2612 2612
 				}
2613 2613
 			}
2614 2614
 		}
2615 2615
 	}
2616 2616
 
2617
-	if ( ! empty( $classes ) ) {
2618
-		$classes = array_unique( array_filter( array_map( 'trim', $classes ) ) );
2617
+	if (!empty($classes)) {
2618
+		$classes = array_unique(array_filter(array_map('trim', $classes)));
2619 2619
 	}
2620 2620
 
2621
-	return implode( ' ', $classes );
2621
+	return implode(' ', $classes);
2622 2622
 }
2623 2623
 
2624 2624
 /**
@@ -2628,19 +2628,19 @@  discard block
 block discarded – undo
2628 2628
  *
2629 2629
  * @return array
2630 2630
  */
2631
-function sd_build_aui_styles( $args ) {
2631
+function sd_build_aui_styles($args) {
2632 2632
 
2633 2633
 	$styles = array();
2634 2634
 
2635 2635
 	// background color
2636
-	if ( ! empty( $args['bg'] ) && $args['bg'] !== '' ) {
2637
-		if ( $args['bg'] == 'custom-color' ) {
2636
+	if (!empty($args['bg']) && $args['bg'] !== '') {
2637
+		if ($args['bg'] == 'custom-color') {
2638 2638
 			$styles['background-color'] = $args['bg_color'];
2639
-		} elseif ( $args['bg'] == 'custom-gradient' ) {
2639
+		} elseif ($args['bg'] == 'custom-gradient') {
2640 2640
 			$styles['background-image'] = $args['bg_gradient'];
2641 2641
 
2642 2642
 			// use background on text.
2643
-			if ( ! empty( $args['bg_on_text'] ) && $args['bg_on_text'] ) {
2643
+			if (!empty($args['bg_on_text']) && $args['bg_on_text']) {
2644 2644
 				$styles['background-clip']         = 'text';
2645 2645
 				$styles['-webkit-background-clip'] = 'text';
2646 2646
 				$styles['text-fill-color']         = 'transparent';
@@ -2649,67 +2649,67 @@  discard block
 block discarded – undo
2649 2649
 		}
2650 2650
 	}
2651 2651
 
2652
-	if ( ! empty( $args['bg_image'] ) && $args['bg_image'] !== '' ) {
2652
+	if (!empty($args['bg_image']) && $args['bg_image'] !== '') {
2653 2653
 		$hasImage = true;
2654
-		if ( ! empty( $styles['background-color'] ) && $args['bg'] == 'custom-color' ) {
2654
+		if (!empty($styles['background-color']) && $args['bg'] == 'custom-color') {
2655 2655
 			$styles['background-image']      = 'url(' . $args['bg_image'] . ')';
2656 2656
 			$styles['background-blend-mode'] = 'overlay';
2657
-		} elseif ( ! empty( $styles['background-image'] ) && $args['bg'] == 'custom-gradient' ) {
2657
+		} elseif (!empty($styles['background-image']) && $args['bg'] == 'custom-gradient') {
2658 2658
 			$styles['background-image'] .= ',url(' . $args['bg_image'] . ')';
2659
-		} elseif ( ! empty( $args['bg'] ) && $args['bg'] != '' && $args['bg'] != 'transparent' ) {
2659
+		} elseif (!empty($args['bg']) && $args['bg'] != '' && $args['bg'] != 'transparent') {
2660 2660
 			// do nothing as we alreay have a preset
2661 2661
 			$hasImage = false;
2662 2662
 		} else {
2663 2663
 			$styles['background-image'] = 'url(' . $args['bg_image'] . ')';
2664 2664
 		}
2665 2665
 
2666
-		if ( $hasImage ) {
2666
+		if ($hasImage) {
2667 2667
 			$styles['background-size'] = 'cover';
2668 2668
 
2669
-			if ( ! empty( $args['bg_image_fixed'] ) && $args['bg_image_fixed'] ) {
2669
+			if (!empty($args['bg_image_fixed']) && $args['bg_image_fixed']) {
2670 2670
 				$styles['background-attachment'] = 'fixed';
2671 2671
 			}
2672 2672
 		}
2673 2673
 
2674
-		if ( $hasImage && ! empty( $args['bg_image_xy'] ) && ! empty( $args['bg_image_xy']['x'] ) ) {
2675
-			$styles['background-position'] = ( $args['bg_image_xy']['x'] * 100 ) . '% ' . ( $args['bg_image_xy']['y'] * 100 ) . '%';
2674
+		if ($hasImage && !empty($args['bg_image_xy']) && !empty($args['bg_image_xy']['x'])) {
2675
+			$styles['background-position'] = ($args['bg_image_xy']['x'] * 100) . '% ' . ($args['bg_image_xy']['y'] * 100) . '%';
2676 2676
 		}
2677 2677
 	}
2678 2678
 
2679 2679
 	// sticky offset top
2680
-	if ( ! empty( $args['sticky_offset_top'] ) && $args['sticky_offset_top'] !== '' ) {
2681
-		$styles['top'] = absint( $args['sticky_offset_top'] );
2680
+	if (!empty($args['sticky_offset_top']) && $args['sticky_offset_top'] !== '') {
2681
+		$styles['top'] = absint($args['sticky_offset_top']);
2682 2682
 	}
2683 2683
 
2684 2684
 	// sticky offset bottom
2685
-	if ( ! empty( $args['sticky_offset_bottom'] ) && $args['sticky_offset_bottom'] !== '' ) {
2686
-		$styles['bottom'] = absint( $args['sticky_offset_bottom'] );
2685
+	if (!empty($args['sticky_offset_bottom']) && $args['sticky_offset_bottom'] !== '') {
2686
+		$styles['bottom'] = absint($args['sticky_offset_bottom']);
2687 2687
 	}
2688 2688
 
2689 2689
 	// font size
2690
-	if ( ! empty( $args['font_size_custom'] ) && $args['font_size_custom'] !== '' ) {
2690
+	if (!empty($args['font_size_custom']) && $args['font_size_custom'] !== '') {
2691 2691
 		$styles['font-size'] = (float) $args['font_size_custom'] . 'rem';
2692 2692
 	}
2693 2693
 
2694 2694
 	// font color
2695
-	if ( ! empty( $args['text_color_custom'] ) && $args['text_color_custom'] !== '' ) {
2696
-		$styles['color'] = esc_attr( $args['text_color_custom'] );
2695
+	if (!empty($args['text_color_custom']) && $args['text_color_custom'] !== '') {
2696
+		$styles['color'] = esc_attr($args['text_color_custom']);
2697 2697
 	}
2698 2698
 
2699 2699
 	// font line height
2700
-	if ( ! empty( $args['font_line_height'] ) && $args['font_line_height'] !== '' ) {
2701
-		$styles['line-height'] = esc_attr( $args['font_line_height'] );
2700
+	if (!empty($args['font_line_height']) && $args['font_line_height'] !== '') {
2701
+		$styles['line-height'] = esc_attr($args['font_line_height']);
2702 2702
 	}
2703 2703
 
2704 2704
 	// max height
2705
-	if ( ! empty( $args['max_height'] ) && $args['max_height'] !== '' ) {
2706
-		$styles['max-height'] = esc_attr( $args['max_height'] );
2705
+	if (!empty($args['max_height']) && $args['max_height'] !== '') {
2706
+		$styles['max-height'] = esc_attr($args['max_height']);
2707 2707
 	}
2708 2708
 
2709 2709
 	$style_string = '';
2710
-	if ( ! empty( $styles ) ) {
2711
-		foreach ( $styles as $key => $val ) {
2712
-			$style_string .= esc_attr( $key ) . ':' . esc_attr( $val ) . ';';
2710
+	if (!empty($styles)) {
2711
+		foreach ($styles as $key => $val) {
2712
+			$style_string .= esc_attr($key) . ':' . esc_attr($val) . ';';
2713 2713
 		}
2714 2714
 	}
2715 2715
 
@@ -2725,28 +2725,28 @@  discard block
 block discarded – undo
2725 2725
  *
2726 2726
  * @return string
2727 2727
  */
2728
-function sd_build_hover_styles( $args, $is_preview = false ) {
2728
+function sd_build_hover_styles($args, $is_preview = false) {
2729 2729
 	$rules = '';
2730 2730
 	// text color
2731
-	if ( ! empty( $args['styleid'] ) ) {
2732
-		$styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr( $args['styleid'] ) : 'html .' . esc_attr( $args['styleid'] );
2731
+	if (!empty($args['styleid'])) {
2732
+		$styleid = $is_preview ? 'html .editor-styles-wrapper .' . esc_attr($args['styleid']) : 'html .' . esc_attr($args['styleid']);
2733 2733
 
2734 2734
 		// text
2735
-		if ( ! empty( $args['text_color_hover'] ) ) {
2736
-			$key    = 'custom' === $args['text_color_hover'] && ! empty( $args['text_color_hover_custom'] ) ? 'text_color_hover_custom' : 'text_color_hover';
2737
-			$color  = sd_get_color_from_var( $args[ $key ] );
2735
+		if (!empty($args['text_color_hover'])) {
2736
+			$key    = 'custom' === $args['text_color_hover'] && !empty($args['text_color_hover_custom']) ? 'text_color_hover_custom' : 'text_color_hover';
2737
+			$color  = sd_get_color_from_var($args[$key]);
2738 2738
 			$rules .= $styleid . ':hover {color: ' . $color . ' !important;} ';
2739 2739
 		}
2740 2740
 
2741 2741
 		// bg
2742
-		if ( ! empty( $args['bg_hover'] ) ) {
2743
-			if ( 'custom-gradient' === $args['bg_hover'] ) {
2742
+		if (!empty($args['bg_hover'])) {
2743
+			if ('custom-gradient' === $args['bg_hover']) {
2744 2744
 				$color  = $args['bg_hover_gradient'];
2745 2745
 				$rules .= $styleid . ':hover {background-image: ' . $color . ' !important;} ';
2746 2746
 				$rules .= $styleid . '.btn:hover {border-color: transparent !important;} ';
2747 2747
 			} else {
2748 2748
 				$key    = 'custom-color' === $args['bg_hover'] ? 'bg_hover_color' : 'bg_hover';
2749
-				$color  = sd_get_color_from_var( $args[ $key ] );
2749
+				$color  = sd_get_color_from_var($args[$key]);
2750 2750
 				$rules .= $styleid . ':hover {background: ' . $color . ' !important;} ';
2751 2751
 				$rules .= $styleid . '.btn:hover {border-color: ' . $color . ' !important;} ';
2752 2752
 			}
@@ -2763,11 +2763,11 @@  discard block
 block discarded – undo
2763 2763
  *
2764 2764
  * @return mixed|string
2765 2765
  */
2766
-function sd_get_color_from_var( $var ) {
2766
+function sd_get_color_from_var($var) {
2767 2767
 
2768 2768
 	//sanitize_hex_color() @todo this does not cover transparency
2769
-	if ( strpos( $var, '#' ) === false ) {
2770
-		$var = defined( 'BLOCKSTRAP_BLOCKS_VERSION' ) ? 'var(--wp--preset--color--' . esc_attr( $var ) . ')' : 'var(--' . esc_attr( $var ) . ')';
2769
+	if (strpos($var, '#') === false) {
2770
+		$var = defined('BLOCKSTRAP_BLOCKS_VERSION') ? 'var(--wp--preset--color--' . esc_attr($var) . ')' : 'var(--' . esc_attr($var) . ')';
2771 2771
 	}
2772 2772
 
2773 2773
 	return $var;
@@ -2781,16 +2781,16 @@  discard block
 block discarded – undo
2781 2781
  *
2782 2782
  * @return string
2783 2783
  */
2784
-function sd_sanitize_html_classes( $classes, $sep = ' ' ) {
2784
+function sd_sanitize_html_classes($classes, $sep = ' ') {
2785 2785
 	$return = '';
2786 2786
 
2787
-	if ( ! is_array( $classes ) ) {
2788
-		$classes = explode( $sep, $classes );
2787
+	if (!is_array($classes)) {
2788
+		$classes = explode($sep, $classes);
2789 2789
 	}
2790 2790
 
2791
-	if ( ! empty( $classes ) ) {
2792
-		foreach ( $classes as $class ) {
2793
-			$return .= sanitize_html_class( $class ) . ' ';
2791
+	if (!empty($classes)) {
2792
+		foreach ($classes as $class) {
2793
+			$return .= sanitize_html_class($class) . ' ';
2794 2794
 		}
2795 2795
 	}
2796 2796
 
@@ -2835,7 +2835,7 @@  discard block
 block discarded – undo
2835 2835
 		'float-MTD'
2836 2836
 	);
2837 2837
 
2838
-	return apply_filters( 'sd_class_build_keys', $keys );
2838
+	return apply_filters('sd_class_build_keys', $keys);
2839 2839
 }
2840 2840
 
2841 2841
 /**
@@ -2846,17 +2846,17 @@  discard block
 block discarded – undo
2846 2846
  *
2847 2847
  * @return array
2848 2848
  */
2849
-function sd_get_visibility_conditions_input( $type = 'visibility_conditions', $overwrite = array() ) {
2849
+function sd_get_visibility_conditions_input($type = 'visibility_conditions', $overwrite = array()) {
2850 2850
 	$defaults = array(
2851 2851
 		'type'         => 'visibility_conditions',
2852
-		'title'        => __( 'Block Visibility', 'ayecode-connect' ),
2853
-		'button_title' => __( 'Set Block Visibility', 'ayecode-connect' ),
2852
+		'title'        => __('Block Visibility', 'ayecode-connect'),
2853
+		'button_title' => __('Set Block Visibility', 'ayecode-connect'),
2854 2854
 		'default'      => '',
2855 2855
 		'desc_tip'     => true,
2856
-		'group'        => __( 'Visibility Conditions', 'ayecode-connect' ),
2856
+		'group'        => __('Visibility Conditions', 'ayecode-connect'),
2857 2857
 	);
2858 2858
 
2859
-	$input = wp_parse_args( $overwrite, $defaults );
2859
+	$input = wp_parse_args($overwrite, $defaults);
2860 2860
 
2861 2861
 	return $input;
2862 2862
 }
@@ -2869,22 +2869,22 @@  discard block
 block discarded – undo
2869 2869
  * @param array $exclude An array of roles to exclude from the return array.
2870 2870
  * @return array An array of roles.
2871 2871
  */
2872
-function sd_user_roles_options( $exclude = array() ) {
2872
+function sd_user_roles_options($exclude = array()) {
2873 2873
 	$user_roles = array();
2874 2874
 
2875
-	if ( !function_exists('get_editable_roles') ) {
2876
-		require_once( ABSPATH . '/wp-admin/includes/user.php' );
2875
+	if (!function_exists('get_editable_roles')) {
2876
+		require_once(ABSPATH . '/wp-admin/includes/user.php');
2877 2877
 	}
2878 2878
 
2879 2879
 	$roles = get_editable_roles();
2880 2880
 
2881
-	foreach ( $roles as $role => $data ) {
2882
-		if ( ! ( ! empty( $exclude ) && in_array( $role, $exclude ) ) ) {
2883
-			$user_roles[ esc_attr( $role ) ] = translate_user_role( $data['name'] );
2881
+	foreach ($roles as $role => $data) {
2882
+		if (!(!empty($exclude) && in_array($role, $exclude))) {
2883
+			$user_roles[esc_attr($role)] = translate_user_role($data['name']);
2884 2884
 		}
2885 2885
 	}
2886 2886
 
2887
-	return apply_filters( 'sd_user_roles_options', $user_roles );
2887
+	return apply_filters('sd_user_roles_options', $user_roles);
2888 2888
 }
2889 2889
 
2890 2890
 /**
@@ -2896,17 +2896,17 @@  discard block
 block discarded – undo
2896 2896
  */
2897 2897
 function sd_visibility_rules_options() {
2898 2898
 	$options = array(
2899
-		'logged_in'  => __( 'Logged In', 'ayecode-connect' ),
2900
-		'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
2901
-		'post_author'  => __( 'Post Author', 'ayecode-connect' ),
2902
-		'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
2899
+		'logged_in'  => __('Logged In', 'ayecode-connect'),
2900
+		'logged_out' => __('Logged Out', 'ayecode-connect'),
2901
+		'post_author'  => __('Post Author', 'ayecode-connect'),
2902
+		'user_roles' => __('Specific User Roles', 'ayecode-connect')
2903 2903
 	);
2904 2904
 
2905
-	if ( class_exists( 'GeoDirectory' ) ) {
2906
-		$options['gd_field'] = __( 'GD Field', 'ayecode-connect' );
2905
+	if (class_exists('GeoDirectory')) {
2906
+		$options['gd_field'] = __('GD Field', 'ayecode-connect');
2907 2907
 	}
2908 2908
 
2909
-	return apply_filters( 'sd_visibility_rules_options', $options );
2909
+	return apply_filters('sd_visibility_rules_options', $options);
2910 2910
 }
2911 2911
 
2912 2912
 /**
@@ -2915,22 +2915,22 @@  discard block
 block discarded – undo
2915 2915
  * @return array
2916 2916
  */
2917 2917
 function sd_visibility_gd_field_options() {
2918
-	$fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );
2918
+	$fields = geodir_post_custom_fields('', 'all', 'all', 'none');
2919 2919
 
2920 2920
 	$keys = array();
2921
-	if ( ! empty( $fields ) ) {
2922
-		foreach( $fields as $field ) {
2923
-			if ( apply_filters( 'geodir_badge_field_skip_key', false, $field ) ) {
2921
+	if (!empty($fields)) {
2922
+		foreach ($fields as $field) {
2923
+			if (apply_filters('geodir_badge_field_skip_key', false, $field)) {
2924 2924
 				continue;
2925 2925
 			}
2926 2926
 
2927
-			$keys[ $field['htmlvar_name'] ] = $field['htmlvar_name'] . ' ( ' . __( $field['admin_title'], 'geodirectory' ) . ' )';
2927
+			$keys[$field['htmlvar_name']] = $field['htmlvar_name'] . ' ( ' . __($field['admin_title'], 'geodirectory') . ' )';
2928 2928
 
2929 2929
 			// Extra address fields
2930
-			if ( $field['htmlvar_name'] == 'address' && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
2931
-				foreach ( $address_fields as $_field => $args ) {
2932
-					if ( $_field != 'map_directions' && $_field != 'street' ) {
2933
-						$keys[ $_field ] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2930
+			if ($field['htmlvar_name'] == 'address' && ($address_fields = geodir_post_meta_address_fields(''))) {
2931
+				foreach ($address_fields as $_field => $args) {
2932
+					if ($_field != 'map_directions' && $_field != 'street') {
2933
+						$keys[$_field] = $_field . ' ( ' . $args['frontend_title'] . ' )';
2934 2934
 					}
2935 2935
 				}
2936 2936
 			}
@@ -2939,15 +2939,15 @@  discard block
 block discarded – undo
2939 2939
 
2940 2940
 	$standard_fields = sd_visibility_gd_standard_field_options();
2941 2941
 
2942
-	if ( ! empty( $standard_fields ) ) {
2943
-		foreach ( $standard_fields as $key => $option ) {
2944
-			$keys[ $key ] = $option;
2942
+	if (!empty($standard_fields)) {
2943
+		foreach ($standard_fields as $key => $option) {
2944
+			$keys[$key] = $option;
2945 2945
 		}
2946 2946
 	}
2947 2947
 
2948
-	$options = apply_filters( 'geodir_badge_field_keys', $keys );
2948
+	$options = apply_filters('geodir_badge_field_keys', $keys);
2949 2949
 
2950
-	return apply_filters( 'sd_visibility_gd_field_options', $options );
2950
+	return apply_filters('sd_visibility_gd_field_options', $options);
2951 2951
 }
2952 2952
 
2953 2953
 /**
@@ -2955,18 +2955,18 @@  discard block
 block discarded – undo
2955 2955
  *
2956 2956
  * @return array
2957 2957
  */
2958
-function sd_visibility_gd_standard_field_options( $post_type = '' ) {
2959
-	$fields = sd_visibility_gd_standard_fields( $post_type );
2958
+function sd_visibility_gd_standard_field_options($post_type = '') {
2959
+	$fields = sd_visibility_gd_standard_fields($post_type);
2960 2960
 
2961 2961
 	$options = array();
2962 2962
 
2963
-	foreach ( $fields as $key => $field ) {
2964
-		if ( ! empty( $field['frontend_title'] ) ) {
2965
-			$options[ $key ] = $key . ' ( ' . $field['frontend_title'] . ' )';
2963
+	foreach ($fields as $key => $field) {
2964
+		if (!empty($field['frontend_title'])) {
2965
+			$options[$key] = $key . ' ( ' . $field['frontend_title'] . ' )';
2966 2966
 		}
2967 2967
 	}
2968 2968
 
2969
-	return apply_filters( 'sd_visibility_gd_standard_field_options', $options, $fields );
2969
+	return apply_filters('sd_visibility_gd_standard_field_options', $options, $fields);
2970 2970
 }
2971 2971
 
2972 2972
 /**
@@ -2974,18 +2974,18 @@  discard block
 block discarded – undo
2974 2974
  *
2975 2975
  * @return array
2976 2976
  */
2977
-function sd_visibility_gd_standard_fields( $post_type = '' ) {
2978
-	$standard_fields = geodir_post_meta_standard_fields( $post_type );
2977
+function sd_visibility_gd_standard_fields($post_type = '') {
2978
+	$standard_fields = geodir_post_meta_standard_fields($post_type);
2979 2979
 
2980 2980
 	$fields = array();
2981 2981
 
2982
-	foreach ( $standard_fields as $key => $field ) {
2983
-		if ( $key != 'post_link' && strpos( $key, 'event' ) === false && ! empty( $field['frontend_title'] ) ) {
2984
-			$fields[ $key ] = $field;
2982
+	foreach ($standard_fields as $key => $field) {
2983
+		if ($key != 'post_link' && strpos($key, 'event') === false && !empty($field['frontend_title'])) {
2984
+			$fields[$key] = $field;
2985 2985
 		}
2986 2986
 	}
2987 2987
 
2988
-	return apply_filters( 'sd_visibility_gd_standard_fields', $fields );
2988
+	return apply_filters('sd_visibility_gd_standard_fields', $fields);
2989 2989
 }
2990 2990
 
2991 2991
 /**
@@ -2993,19 +2993,19 @@  discard block
 block discarded – undo
2993 2993
  *
2994 2994
  * @return array
2995 2995
  */
2996
-function sd_visibility_field_condition_options(){
2996
+function sd_visibility_field_condition_options() {
2997 2997
 	$options = array(
2998
-		'is_empty' => __( 'is empty', 'ayecode-connect' ),
2999
-		'is_not_empty' => __( 'is not empty', 'ayecode-connect' ),
3000
-		'is_equal' => __( 'is equal', 'ayecode-connect' ),
3001
-		'is_not_equal' => __( 'is not equal', 'ayecode-connect' ),
3002
-		'is_greater_than' => __( 'is greater than', 'ayecode-connect' ),
3003
-		'is_less_than' => __( 'is less than', 'ayecode-connect' ),
3004
-		'is_contains' => __( 'is contains', 'ayecode-connect' ),
3005
-		'is_not_contains' => __( 'is not contains', 'ayecode-connect' ),
2998
+		'is_empty' => __('is empty', 'ayecode-connect'),
2999
+		'is_not_empty' => __('is not empty', 'ayecode-connect'),
3000
+		'is_equal' => __('is equal', 'ayecode-connect'),
3001
+		'is_not_equal' => __('is not equal', 'ayecode-connect'),
3002
+		'is_greater_than' => __('is greater than', 'ayecode-connect'),
3003
+		'is_less_than' => __('is less than', 'ayecode-connect'),
3004
+		'is_contains' => __('is contains', 'ayecode-connect'),
3005
+		'is_not_contains' => __('is not contains', 'ayecode-connect'),
3006 3006
 	);
3007 3007
 
3008
-	return apply_filters( 'sd_visibility_field_condition_options', $options );
3008
+	return apply_filters('sd_visibility_field_condition_options', $options);
3009 3009
 }
3010 3010
 
3011 3011
 /**
@@ -3017,13 +3017,13 @@  discard block
 block discarded – undo
3017 3017
  */
3018 3018
 function sd_visibility_output_options() {
3019 3019
 	$options = array(
3020
-		'hide'          => __( 'Hide Block', 'ayecode-connect' ),
3021
-		'message'       => __( 'Show Custom Message', 'ayecode-connect' ),
3022
-		'page'          => __( 'Show Page Content', 'ayecode-connect' ),
3023
-		'template_part' => __( 'Show Template Part', 'ayecode-connect' ),
3020
+		'hide'          => __('Hide Block', 'ayecode-connect'),
3021
+		'message'       => __('Show Custom Message', 'ayecode-connect'),
3022
+		'page'          => __('Show Page Content', 'ayecode-connect'),
3023
+		'template_part' => __('Show Template Part', 'ayecode-connect'),
3024 3024
 	);
3025 3025
 
3026
-	return apply_filters( 'sd_visibility_output_options', $options );
3026
+	return apply_filters('sd_visibility_output_options', $options);
3027 3027
 }
3028 3028
 
3029 3029
 /**
@@ -3034,46 +3034,46 @@  discard block
 block discarded – undo
3034 3034
  * @param array $args Array of arguments.
3035 3035
  * @return array Template page options.
3036 3036
  */
3037
-function sd_template_page_options( $args = array() ) {
3037
+function sd_template_page_options($args = array()) {
3038 3038
 	global $sd_tmpl_page_options;
3039 3039
 
3040
-	if ( ! empty( $sd_tmpl_page_options ) ) {
3040
+	if (!empty($sd_tmpl_page_options)) {
3041 3041
 		return $sd_tmpl_page_options;
3042 3042
 	}
3043 3043
 
3044
-	$args = wp_parse_args( $args, array(
3044
+	$args = wp_parse_args($args, array(
3045 3045
 		'child_of'    => 0,
3046 3046
 		'sort_column' => 'post_title',
3047 3047
 		'sort_order'  => 'ASC'
3048
-	) );
3048
+	));
3049 3049
 
3050 3050
 	$exclude_pages = array();
3051
-	if ( $page_on_front = get_option( 'page_on_front' ) ) {
3051
+	if ($page_on_front = get_option('page_on_front')) {
3052 3052
 		$exclude_pages[] = $page_on_front;
3053 3053
 	}
3054 3054
 
3055
-	if ( $page_for_posts = get_option( 'page_for_posts' ) ) {
3055
+	if ($page_for_posts = get_option('page_for_posts')) {
3056 3056
 		$exclude_pages[] = $page_for_posts;
3057 3057
 	}
3058 3058
 
3059
-	if ( ! empty( $exclude_pages ) ) {
3059
+	if (!empty($exclude_pages)) {
3060 3060
 		$args['exclude'] = $exclude_pages;
3061 3061
 	}
3062 3062
 
3063
-	$pages = get_pages( $args );
3063
+	$pages = get_pages($args);
3064 3064
 
3065
-	$options = array( '' => __( 'Select Page...', 'ayecode-connect' ) );
3066
-	if ( ! empty( $pages ) ) {
3067
-		foreach ( $pages as $page ) {
3068
-			if ( ! empty( $page->ID ) && ! empty( $page->post_title ) ) {
3069
-				$options[ $page->ID ] = $page->post_title . ' (#' . $page->ID . ')';
3065
+	$options = array('' => __('Select Page...', 'ayecode-connect'));
3066
+	if (!empty($pages)) {
3067
+		foreach ($pages as $page) {
3068
+			if (!empty($page->ID) && !empty($page->post_title)) {
3069
+				$options[$page->ID] = $page->post_title . ' (#' . $page->ID . ')';
3070 3070
 			}
3071 3071
 		}
3072 3072
 	}
3073 3073
 
3074 3074
 	$sd_tmpl_page_options = $options;
3075 3075
 
3076
-	return apply_filters( 'sd_template_page_options', $options );
3076
+	return apply_filters('sd_template_page_options', $options);
3077 3077
 }
3078 3078
 
3079 3079
 /**
@@ -3084,26 +3084,26 @@  discard block
 block discarded – undo
3084 3084
  * @param array $args Array of arguments.
3085 3085
  * @return array Template part options.
3086 3086
  */
3087
-function sd_template_part_options( $args = array() ) {
3087
+function sd_template_part_options($args = array()) {
3088 3088
 	global $sd_tmpl_part_options;
3089 3089
 
3090
-	if ( ! empty( $sd_tmpl_part_options ) ) {
3090
+	if (!empty($sd_tmpl_part_options)) {
3091 3091
 		return $sd_tmpl_part_options;
3092 3092
 	}
3093 3093
 
3094
-	$options = array( '' => __( 'Select Template Part...', 'ayecode-connect' ) );
3094
+	$options = array('' => __('Select Template Part...', 'ayecode-connect'));
3095 3095
 
3096
-	$parts = get_block_templates( array(), 'wp_template_part' );
3096
+	$parts = get_block_templates(array(), 'wp_template_part');
3097 3097
 
3098
-	if ( ! empty( $parts ) ) {
3099
-		foreach ( $parts as $part ) {
3100
-			$options[ $part->slug ] = $part->title . ' (#' . $part->slug . ')';
3098
+	if (!empty($parts)) {
3099
+		foreach ($parts as $part) {
3100
+			$options[$part->slug] = $part->title . ' (#' . $part->slug . ')';
3101 3101
 		}
3102 3102
 	}
3103 3103
 
3104 3104
 	$sd_tmpl_part_options = $options;
3105 3105
 
3106
-	return apply_filters( 'sd_template_part_options', $options, $args );
3106
+	return apply_filters('sd_template_part_options', $options, $args);
3107 3107
 }
3108 3108
 
3109 3109
 /**
@@ -3114,26 +3114,26 @@  discard block
 block discarded – undo
3114 3114
  * @param string $slug Template slug.
3115 3115
  * @return array Template part object.
3116 3116
  */
3117
-function sd_get_template_part_by_slug( $slug ) {
3117
+function sd_get_template_part_by_slug($slug) {
3118 3118
 	global $bs_tmpl_part_by_slug;
3119 3119
 
3120
-	if ( empty( $bs_tmpl_part_by_slug ) ) {
3120
+	if (empty($bs_tmpl_part_by_slug)) {
3121 3121
 		$bs_tmpl_part_by_slug = array();
3122 3122
 	}
3123 3123
 
3124
-	if ( isset( $bs_tmpl_part_by_slug[ $slug ] ) ) {
3125
-		return $bs_tmpl_part_by_slug[ $slug ];
3124
+	if (isset($bs_tmpl_part_by_slug[$slug])) {
3125
+		return $bs_tmpl_part_by_slug[$slug];
3126 3126
 	}
3127 3127
 
3128
-	$template_query = get_block_templates( array( 'slug__in' => array( $slug ) ), 'wp_template_part' );
3128
+	$template_query = get_block_templates(array('slug__in' => array($slug)), 'wp_template_part');
3129 3129
 
3130
-	$query_post = ! empty( $template_query ) ? $template_query[0] : array();
3130
+	$query_post = !empty($template_query) ? $template_query[0] : array();
3131 3131
 
3132
-	$template_part = ! empty( $query_post ) && $query_post->status == 'publish' ? $query_post : array();
3132
+	$template_part = !empty($query_post) && $query_post->status == 'publish' ? $query_post : array();
3133 3133
 
3134
-	$bs_tmpl_part_by_slug[ $slug ] = $template_part;
3134
+	$bs_tmpl_part_by_slug[$slug] = $template_part;
3135 3135
 
3136
-	return apply_filters( 'sd_get_template_part_by_slug', $template_part, $slug );
3136
+	return apply_filters('sd_get_template_part_by_slug', $template_part, $slug);
3137 3137
 }
3138 3138
 
3139 3139
 /**
@@ -3145,25 +3145,25 @@  discard block
 block discarded – undo
3145 3145
  * @param array    $block         The full block, including name and attributes.
3146 3146
  * @param WP_Block $instance      The block instance.
3147 3147
  */
3148
-function sd_render_block( $block_content, $block, $instance = '' ) {
3148
+function sd_render_block($block_content, $block, $instance = '') {
3149 3149
 	// No block visibility conditions set.
3150
-	if ( empty( $block['attrs']['visibility_conditions'] ) ) {
3150
+	if (empty($block['attrs']['visibility_conditions'])) {
3151 3151
 		return $block_content;
3152 3152
 	}
3153 3153
 
3154
-	$attributes = json_decode( $block['attrs']['visibility_conditions'], true );
3155
-	$rules = ! empty( $attributes ) ? sd_block_parse_rules( $attributes ) : array();
3154
+	$attributes = json_decode($block['attrs']['visibility_conditions'], true);
3155
+	$rules = !empty($attributes) ? sd_block_parse_rules($attributes) : array();
3156 3156
 
3157 3157
 	// No rules set.
3158
-	if ( empty( $rules ) ) {
3158
+	if (empty($rules)) {
3159 3159
 		return $block_content;
3160 3160
 	}
3161 3161
 
3162 3162
 	$_block_content = $block_content;
3163 3163
 
3164
-	if ( ! empty( $rules ) && sd_block_check_rules( $rules ) ) {
3165
-		if ( ! empty( $attributes['output']['type'] ) ) {
3166
-			switch ( $attributes['output']['type'] ) {
3164
+	if (!empty($rules) && sd_block_check_rules($rules)) {
3165
+		if (!empty($attributes['output']['type'])) {
3166
+			switch ($attributes['output']['type']) {
3167 3167
 				case 'hide':
3168 3168
 					$valid_type = true;
3169 3169
 					$content = '';
@@ -3172,11 +3172,11 @@  discard block
 block discarded – undo
3172 3172
 				case 'message':
3173 3173
 					$valid_type = true;
3174 3174
 
3175
-					if ( isset( $attributes['output']['message'] ) ) {
3176
-						$content = $attributes['output']['message'] != '' ? __( stripslashes( $attributes['output']['message'] ), 'ayecode-connect' ) : $attributes['output']['message'];
3175
+					if (isset($attributes['output']['message'])) {
3176
+						$content = $attributes['output']['message'] != '' ? __(stripslashes($attributes['output']['message']), 'ayecode-connect') : $attributes['output']['message'];
3177 3177
 
3178
-						if ( ! empty( $attributes['output']['message_type'] ) ) {
3179
-							$content = aui()->alert( array(
3178
+						if (!empty($attributes['output']['message_type'])) {
3179
+							$content = aui()->alert(array(
3180 3180
 									'type'=> $attributes['output']['message_type'],
3181 3181
 									'content'=> $content
3182 3182
 								)
@@ -3188,15 +3188,15 @@  discard block
 block discarded – undo
3188 3188
 				case 'page':
3189 3189
 					$valid_type = true;
3190 3190
 
3191
-					$page_id = ! empty( $attributes['output']['page'] ) ? absint( $attributes['output']['page'] ) : 0;
3192
-					$content = sd_get_page_content( $page_id );
3191
+					$page_id = !empty($attributes['output']['page']) ? absint($attributes['output']['page']) : 0;
3192
+					$content = sd_get_page_content($page_id);
3193 3193
 
3194 3194
 					break;
3195 3195
 				case 'template_part':
3196 3196
 					$valid_type = true;
3197 3197
 
3198
-					$template_part = ! empty( $attributes['output']['template_part'] ) ? $attributes['output']['template_part'] : '';
3199
-					$content = sd_get_template_part_content( $template_part );
3198
+					$template_part = !empty($attributes['output']['template_part']) ? $attributes['output']['template_part'] : '';
3199
+					$content = sd_get_template_part_content($template_part);
3200 3200
 
3201 3201
 					break;
3202 3202
 				default:
@@ -3204,104 +3204,104 @@  discard block
 block discarded – undo
3204 3204
 					break;
3205 3205
 			}
3206 3206
 
3207
-			if ( $valid_type ) {
3208
-				$block_content = '<div class="' . esc_attr( wp_get_block_default_classname( $instance->name ) ) . ' sd-block-has-rule">' . $content . '</div>';
3207
+			if ($valid_type) {
3208
+				$block_content = '<div class="' . esc_attr(wp_get_block_default_classname($instance->name)) . ' sd-block-has-rule">' . $content . '</div>';
3209 3209
 			}
3210 3210
 		}
3211 3211
 	}
3212 3212
 
3213
-	return apply_filters( 'sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance );
3213
+	return apply_filters('sd_render_block_visibility_content', $block_content, $_block_content, $attributes, $block, $instance);
3214 3214
 }
3215
-add_filter( 'render_block', 'sd_render_block', 9, 3 );
3215
+add_filter('render_block', 'sd_render_block', 9, 3);
3216 3216
 
3217
-function sd_get_page_content( $page_id ) {
3218
-	$content = $page_id > 0 ? get_post_field( 'post_content', (int) $page_id ) : '';
3217
+function sd_get_page_content($page_id) {
3218
+	$content = $page_id > 0 ? get_post_field('post_content', (int) $page_id) : '';
3219 3219
 
3220 3220
 	// Maybe bypass content
3221
-	$bypass_content = apply_filters( 'sd_bypass_page_content', '', $content, $page_id );
3222
-	if ( $bypass_content ) {
3221
+	$bypass_content = apply_filters('sd_bypass_page_content', '', $content, $page_id);
3222
+	if ($bypass_content) {
3223 3223
 		return $bypass_content;
3224 3224
 	}
3225 3225
 
3226 3226
 	// Run the shortcodes on the content.
3227
-	$content = do_shortcode( $content );
3227
+	$content = do_shortcode($content);
3228 3228
 
3229 3229
 	// Run block content if its available.
3230
-	if ( function_exists( 'do_blocks' ) ) {
3231
-		$content = do_blocks( $content );
3230
+	if (function_exists('do_blocks')) {
3231
+		$content = do_blocks($content);
3232 3232
 	}
3233 3233
 
3234
-	return apply_filters( 'sd_get_page_content', $content, $page_id );
3234
+	return apply_filters('sd_get_page_content', $content, $page_id);
3235 3235
 }
3236 3236
 
3237
-function sd_get_template_part_content( $template_part ) {
3238
-	$template_part_post = $template_part ? sd_get_template_part_by_slug( $template_part ) : array();
3239
-	$content = ! empty( $template_part_post ) ? $template_part_post->content : '';
3237
+function sd_get_template_part_content($template_part) {
3238
+	$template_part_post = $template_part ? sd_get_template_part_by_slug($template_part) : array();
3239
+	$content = !empty($template_part_post) ? $template_part_post->content : '';
3240 3240
 
3241 3241
 	// Maybe bypass content
3242
-	$bypass_content = apply_filters( 'sd_bypass_template_part_content', '', $content, $template_part );
3243
-	if ( $bypass_content ) {
3242
+	$bypass_content = apply_filters('sd_bypass_template_part_content', '', $content, $template_part);
3243
+	if ($bypass_content) {
3244 3244
 		return $bypass_content;
3245 3245
 	}
3246 3246
 
3247 3247
 	// Run the shortcodes on the content.
3248
-	$content = do_shortcode( $content );
3248
+	$content = do_shortcode($content);
3249 3249
 
3250 3250
 	// Run block content if its available.
3251
-	if ( function_exists( 'do_blocks' ) ) {
3252
-		$content = do_blocks( $content );
3251
+	if (function_exists('do_blocks')) {
3252
+		$content = do_blocks($content);
3253 3253
 	}
3254 3254
 
3255
-	return apply_filters( 'sd_get_template_part_content', $content, $template_part );
3255
+	return apply_filters('sd_get_template_part_content', $content, $template_part);
3256 3256
 }
3257 3257
 
3258
-function sd_block_parse_rules( $attrs ) {
3258
+function sd_block_parse_rules($attrs) {
3259 3259
 	$rules = array();
3260 3260
 
3261
-	if ( ! empty( $attrs ) && is_array( $attrs ) ) {
3262
-		$attrs_keys = array_keys( $attrs );
3261
+	if (!empty($attrs) && is_array($attrs)) {
3262
+		$attrs_keys = array_keys($attrs);
3263 3263
 
3264
-		for ( $i = 1; $i <= count( $attrs_keys ); $i++ ) {
3265
-			if ( ! empty( $attrs[ 'rule' . $i ] ) && is_array( $attrs[ 'rule' . $i ] ) ) {
3266
-				$rules[] = $attrs[ 'rule' . $i ];
3264
+		for ($i = 1; $i <= count($attrs_keys); $i++) {
3265
+			if (!empty($attrs['rule' . $i]) && is_array($attrs['rule' . $i])) {
3266
+				$rules[] = $attrs['rule' . $i];
3267 3267
 			}
3268 3268
 		}
3269 3269
 	}
3270 3270
 
3271
-	return apply_filters( 'sd_block_parse_rules', $rules, $attrs );
3271
+	return apply_filters('sd_block_parse_rules', $rules, $attrs);
3272 3272
 }
3273 3273
 
3274
-function sd_block_check_rules( $rules ) {
3275
-	if ( ! ( is_array( $rules ) && ! empty( $rules ) ) ) {
3274
+function sd_block_check_rules($rules) {
3275
+	if (!(is_array($rules) && !empty($rules))) {
3276 3276
 		return true;
3277 3277
 	}
3278 3278
 
3279
-	foreach ( $rules as $key => $rule ) {
3280
-		$match = apply_filters( 'sd_block_check_rule', true, $rule );
3279
+	foreach ($rules as $key => $rule) {
3280
+		$match = apply_filters('sd_block_check_rule', true, $rule);
3281 3281
 
3282
-		if ( ! $match ) {
3282
+		if (!$match) {
3283 3283
 			break;
3284 3284
 		}
3285 3285
 	}
3286 3286
 
3287
-	return apply_filters( 'sd_block_check_rules', $match, $rules );
3287
+	return apply_filters('sd_block_check_rules', $match, $rules);
3288 3288
 }
3289 3289
 
3290
-function sd_block_check_rule( $match, $rule ) {
3290
+function sd_block_check_rule($match, $rule) {
3291 3291
 	global $post;
3292 3292
 
3293
-	if ( $match && ! empty( $rule['type'] ) ) {
3294
-		switch ( $rule['type'] ) {
3293
+	if ($match && !empty($rule['type'])) {
3294
+		switch ($rule['type']) {
3295 3295
 			case 'logged_in':
3296 3296
 				$match = (bool) is_user_logged_in();
3297 3297
 
3298 3298
 				break;
3299 3299
 			case 'logged_out':
3300
-				$match = ! is_user_logged_in();
3300
+				$match = !is_user_logged_in();
3301 3301
 
3302 3302
 				break;
3303 3303
 			case 'post_author':
3304
-				if ( ! empty( $post ) && $post->post_type != 'page' && ! empty( $post->post_author ) && is_user_logged_in() ) {
3304
+				if (!empty($post) && $post->post_type != 'page' && !empty($post->post_author) && is_user_logged_in()) {
3305 3305
 					$match = (int) $post->post_author === (int) get_current_user_id() ? true : false;
3306 3306
 				} else {
3307 3307
 					$match = false;
@@ -3311,18 +3311,18 @@  discard block
 block discarded – undo
3311 3311
 			case 'user_roles':
3312 3312
 				$match = false;
3313 3313
 
3314
-				if ( ! empty( $rule['user_roles'] ) ) {
3315
-					$user_roles = is_scalar( $rule['user_roles'] ) ? explode( ",", $rule['user_roles'] ) : $rule['user_roles'];
3314
+				if (!empty($rule['user_roles'])) {
3315
+					$user_roles = is_scalar($rule['user_roles']) ? explode(",", $rule['user_roles']) : $rule['user_roles'];
3316 3316
 
3317
-					if ( is_array( $user_roles ) ) {
3318
-						$user_roles = array_filter( array_map( 'trim', $user_roles ) );
3317
+					if (is_array($user_roles)) {
3318
+						$user_roles = array_filter(array_map('trim', $user_roles));
3319 3319
 					}
3320 3320
 
3321
-					if ( ! empty( $user_roles ) && is_array( $user_roles ) && is_user_logged_in() && ( $current_user = wp_get_current_user() ) ) {
3321
+					if (!empty($user_roles) && is_array($user_roles) && is_user_logged_in() && ($current_user = wp_get_current_user())) {
3322 3322
 						$current_user_roles = $current_user->roles;
3323 3323
 
3324
-						foreach ( $user_roles as $role ) {
3325
-							if ( in_array( $role, $current_user_roles ) ) {
3324
+						foreach ($user_roles as $role) {
3325
+							if (in_array($role, $current_user_roles)) {
3326 3326
 								$match = true;
3327 3327
 							}
3328 3328
 						}
@@ -3331,7 +3331,7 @@  discard block
 block discarded – undo
3331 3331
 
3332 3332
 				break;
3333 3333
 			case 'gd_field':
3334
-				$match = sd_block_check_rule_gd_field( $rule );
3334
+				$match = sd_block_check_rule_gd_field($rule);
3335 3335
 
3336 3336
 				break;
3337 3337
 		}
@@ -3339,145 +3339,145 @@  discard block
 block discarded – undo
3339 3339
 
3340 3340
 	return $match;
3341 3341
 }
3342
-add_filter( 'sd_block_check_rule', 'sd_block_check_rule', 10, 2 );
3342
+add_filter('sd_block_check_rule', 'sd_block_check_rule', 10, 2);
3343 3343
 
3344
-function sd_block_check_rule_gd_field( $rule ) {
3344
+function sd_block_check_rule_gd_field($rule) {
3345 3345
 	global $gd_post;
3346 3346
 
3347 3347
 	$match_found = false;
3348 3348
 
3349
-	if ( class_exists( 'GeoDirectory' ) && ! empty( $gd_post->ID ) && ! empty( $rule['field'] ) && ! empty( $rule['condition'] ) ) {
3349
+	if (class_exists('GeoDirectory') && !empty($gd_post->ID) && !empty($rule['field']) && !empty($rule['condition'])) {
3350 3350
 		$args['block_visibility'] = true;
3351 3351
 		$args['key'] = $rule['field'];
3352 3352
 		$args['condition'] = $rule['condition'];
3353
-		$args['search'] = isset( $rule['search'] ) ? $rule['search'] : '';
3353
+		$args['search'] = isset($rule['search']) ? $rule['search'] : '';
3354 3354
 
3355
-		if ( $args['key'] == 'street' ) {
3355
+		if ($args['key'] == 'street') {
3356 3356
 			$args['key'] = 'address';
3357 3357
 		}
3358 3358
 
3359 3359
 		$match_field = $_match_field = $args['key'];
3360 3360
 
3361
-		if ( $match_field == 'address' ) {
3361
+		if ($match_field == 'address') {
3362 3362
 			$match_field = 'street';
3363
-		} elseif ( $match_field == 'post_images' ) {
3363
+		} elseif ($match_field == 'post_images') {
3364 3364
 			$match_field = 'featured_image';
3365 3365
 		}
3366 3366
 
3367 3367
 		$find_post = $gd_post;
3368
-		$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3368
+		$find_post_keys = !empty($find_post) ? array_keys((array) $find_post) : array();
3369 3369
 
3370
-		if ( ! empty( $find_post->ID ) && ! in_array( 'post_category', $find_post_keys ) ) {
3371
-			$find_post = geodir_get_post_info( (int) $find_post->ID );
3372
-			$find_post_keys = ! empty( $find_post ) ? array_keys( (array) $find_post ) : array();
3370
+		if (!empty($find_post->ID) && !in_array('post_category', $find_post_keys)) {
3371
+			$find_post = geodir_get_post_info((int) $find_post->ID);
3372
+			$find_post_keys = !empty($find_post) ? array_keys((array) $find_post) : array();
3373 3373
 		}
3374 3374
 
3375
-		if ( $match_field === '' || ( ! empty( $find_post_keys ) && ( in_array( $match_field, $find_post_keys ) || in_array( $_match_field, $find_post_keys ) ) ) ) {
3376
-			$address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
3375
+		if ($match_field === '' || (!empty($find_post_keys) && (in_array($match_field, $find_post_keys) || in_array($_match_field, $find_post_keys)))) {
3376
+			$address_fields = array('street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude'); // Address fields
3377 3377
 			$field = array();
3378 3378
 			$empty_field = false;
3379 3379
 
3380 3380
 			$standard_fields = sd_visibility_gd_standard_fields();
3381 3381
 
3382
-			if ( $match_field && ! in_array( $match_field, array_keys( $standard_fields ) ) && ! in_array( $match_field, $address_fields ) ) {
3383
-				$package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
3384
-				$fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );
3382
+			if ($match_field && !in_array($match_field, array_keys($standard_fields)) && !in_array($match_field, $address_fields)) {
3383
+				$package_id = geodir_get_post_package_id($find_post->ID, $find_post->post_type);
3384
+				$fields = geodir_post_custom_fields($package_id, 'all', $find_post->post_type, 'none');
3385 3385
 
3386
-				foreach ( $fields as $field_info ) {
3387
-					if ( $match_field == $field_info['htmlvar_name'] ) {
3386
+				foreach ($fields as $field_info) {
3387
+					if ($match_field == $field_info['htmlvar_name']) {
3388 3388
 						$field = $field_info;
3389 3389
 						break;
3390
-					} elseif( $_match_field == $field_info['htmlvar_name'] ) {
3390
+					} elseif ($_match_field == $field_info['htmlvar_name']) {
3391 3391
 						$field = $field_info;
3392 3392
 						break;
3393 3393
 					}
3394 3394
 				}
3395 3395
 
3396
-				if ( empty( $field ) ) {
3396
+				if (empty($field)) {
3397 3397
 					$empty_field = true;
3398 3398
 				}
3399 3399
 			}
3400 3400
 
3401 3401
 			// Address fields.
3402
-			if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
3403
-				if ( ! empty( $address_fields[ $match_field ] ) ) {
3404
-					$field = $address_fields[ $match_field ];
3402
+			if (in_array($match_field, $address_fields) && ($address_fields = geodir_post_meta_address_fields(''))) {
3403
+				if (!empty($address_fields[$match_field])) {
3404
+					$field = $address_fields[$match_field];
3405 3405
 				}
3406
-			} else if ( in_array( $match_field, array_keys( $standard_fields ) ) ) {
3407
-				if ( ! empty( $standard_fields[ $match_field ] ) ) {
3408
-					$field = $standard_fields[ $match_field ];
3406
+			} else if (in_array($match_field, array_keys($standard_fields))) {
3407
+				if (!empty($standard_fields[$match_field])) {
3408
+					$field = $standard_fields[$match_field];
3409 3409
 				}
3410 3410
 			}
3411 3411
 
3412 3412
 			// Parse search.
3413
-			$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3413
+			$search = sd_gd_field_rule_search($args['search'], $find_post->post_type, $rule, $field, $find_post);
3414 3414
 
3415
-			$is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
3416
-			$is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );
3415
+			$is_date = (!empty($field['type']) && $field['type'] == 'datepicker') || in_array($match_field, array('post_date', 'post_modified')) ? true : false;
3416
+			$is_date = apply_filters('geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post);
3417 3417
 
3418
-			$match_value = isset( $find_post->{$match_field} ) && empty( $empty_field ) ? esc_attr( trim( $find_post->{$match_field} ) ) : '';
3418
+			$match_value = isset($find_post->{$match_field} ) && empty($empty_field) ? esc_attr(trim($find_post->{$match_field} )) : '';
3419 3419
 			$match_found = $match_field === '' ? true : false;
3420 3420
 
3421
-			if ( ! $match_found ) {
3422
-				if ( ( $match_field == 'post_date' || $match_field == 'post_modified' ) && ( empty( $args['condition'] ) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than' ) ) {
3423
-					if ( strpos( $search, '+' ) === false && strpos( $search, '-' ) === false ) {
3421
+			if (!$match_found) {
3422
+				if (($match_field == 'post_date' || $match_field == 'post_modified') && (empty($args['condition']) || $args['condition'] == 'is_greater_than' || $args['condition'] == 'is_less_than')) {
3423
+					if (strpos($search, '+') === false && strpos($search, '-') === false) {
3424 3424
 						$search = '+' . $search;
3425 3425
 					}
3426
-					$the_time = $match_field == 'post_modified' ? get_the_modified_date( 'Y-m-d', $find_post ) : get_the_time( 'Y-m-d', $find_post );
3427
-					$until_time = strtotime( $the_time . ' ' . $search . ' days' );
3428
-					$now_time   = strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) );
3429
-					if ( ( empty( $args['condition'] ) || $args['condition'] == 'is_less_than' ) && $until_time > $now_time ) {
3426
+					$the_time = $match_field == 'post_modified' ? get_the_modified_date('Y-m-d', $find_post) : get_the_time('Y-m-d', $find_post);
3427
+					$until_time = strtotime($the_time . ' ' . $search . ' days');
3428
+					$now_time   = strtotime(date_i18n('Y-m-d', current_time('timestamp')));
3429
+					if ((empty($args['condition']) || $args['condition'] == 'is_less_than') && $until_time > $now_time) {
3430 3430
 						$match_found = true;
3431
-					} elseif ( $args['condition'] == 'is_greater_than' && $until_time < $now_time ) {
3431
+					} elseif ($args['condition'] == 'is_greater_than' && $until_time < $now_time) {
3432 3432
 						$match_found = true;
3433 3433
 					}
3434 3434
 				} else {
3435
-					switch ( $args['condition'] ) {
3435
+					switch ($args['condition']) {
3436 3436
 						case 'is_equal':
3437
-							$match_found = (bool) ( $search != '' && $match_value == $search );
3437
+							$match_found = (bool) ($search != '' && $match_value == $search);
3438 3438
 							break;
3439 3439
 						case 'is_not_equal':
3440
-							$match_found = (bool) ( $search != '' && $match_value != $search );
3440
+							$match_found = (bool) ($search != '' && $match_value != $search);
3441 3441
 							break;
3442 3442
 						case 'is_greater_than':
3443
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value > $search );
3443
+							$match_found = (bool) ($search != '' && (is_float($search) || is_numeric($search)) && (is_float($match_value) || is_numeric($match_value)) && $match_value > $search);
3444 3444
 							break;
3445 3445
 						case 'is_less_than':
3446
-							$match_found = (bool) ( $search != '' && ( is_float( $search ) || is_numeric( $search ) ) && ( is_float( $match_value ) || is_numeric( $match_value ) ) && $match_value < $search );
3446
+							$match_found = (bool) ($search != '' && (is_float($search) || is_numeric($search)) && (is_float($match_value) || is_numeric($match_value)) && $match_value < $search);
3447 3447
 							break;
3448 3448
 						case 'is_empty':
3449
-							$match_found = (bool) ( $match_value === '' || $match_value === false || $match_value === '0' || is_null( $match_value ) );
3449
+							$match_found = (bool) ($match_value === '' || $match_value === false || $match_value === '0' || is_null($match_value));
3450 3450
 							break;
3451 3451
 						case 'is_not_empty':
3452
-							$match_found = (bool) ( $match_value !== '' && $match_value !== false && $match_value !== '0' && ! is_null( $match_value ) );
3452
+							$match_found = (bool) ($match_value !== '' && $match_value !== false && $match_value !== '0' && !is_null($match_value));
3453 3453
 							break;
3454 3454
 						case 'is_contains':
3455
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) !== false );
3455
+							$match_found = (bool) ($search != '' && stripos($match_value, $search) !== false);
3456 3456
 							break;
3457 3457
 						case 'is_not_contains':
3458
-							$match_found = (bool) ( $search != '' && stripos( $match_value, $search ) === false );
3458
+							$match_found = (bool) ($search != '' && stripos($match_value, $search) === false);
3459 3459
 							break;
3460 3460
 					}
3461 3461
 				}
3462 3462
 			}
3463 3463
 
3464
-			$match_found = apply_filters( 'geodir_post_badge_check_match_found', $match_found, $args, $find_post );
3464
+			$match_found = apply_filters('geodir_post_badge_check_match_found', $match_found, $args, $find_post);
3465 3465
 		} else {
3466 3466
 			$field = array();
3467 3467
 
3468 3468
 			// Parse search.
3469
-			$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );
3469
+			$search = sd_gd_field_rule_search($args['search'], $find_post->post_type, $rule, $field, $find_post);
3470 3470
 
3471 3471
 			$match_value = '';
3472 3472
 			$match_found = $match_field === '' ? true : false;
3473 3473
 
3474
-			if ( ! $match_found ) {
3475
-				switch ( $args['condition'] ) {
3474
+			if (!$match_found) {
3475
+				switch ($args['condition']) {
3476 3476
 					case 'is_equal':
3477
-						$match_found = (bool) ( $search != '' && $match_value == $search );
3477
+						$match_found = (bool) ($search != '' && $match_value == $search);
3478 3478
 						break;
3479 3479
 					case 'is_not_equal':
3480
-						$match_found = (bool) ( $search != '' && $match_value != $search );
3480
+						$match_found = (bool) ($search != '' && $match_value != $search);
3481 3481
 						break;
3482 3482
 					case 'is_greater_than':
3483 3483
 						$match_found = false;
@@ -3500,74 +3500,74 @@  discard block
 block discarded – undo
3500 3500
 				}
3501 3501
 			}
3502 3502
 
3503
-			$match_found = apply_filters( 'geodir_post_badge_check_match_found_empty', $match_found, $args, $find_post );
3503
+			$match_found = apply_filters('geodir_post_badge_check_match_found_empty', $match_found, $args, $find_post);
3504 3504
 		}
3505 3505
 	}
3506 3506
 
3507 3507
 	return $match_found;
3508 3508
 }
3509 3509
 
3510
-function sd_gd_field_rule_search( $search, $post_type, $rule, $field = array(), $gd_post = array() ) {
3510
+function sd_gd_field_rule_search($search, $post_type, $rule, $field = array(), $gd_post = array()) {
3511 3511
 	global $post;
3512 3512
 
3513
-	if ( ! $search ) {
3513
+	if (!$search) {
3514 3514
 		return $search;
3515 3515
 	}
3516 3516
 
3517 3517
 	$orig_search = $search;
3518
-	$_search = strtolower( $search );
3518
+	$_search = strtolower($search);
3519 3519
 
3520
-	if ( ! empty( $rule['field'] ) && $rule['field'] == 'post_author' ) {
3521
-		if ( $search == 'current_user' ) {
3520
+	if (!empty($rule['field']) && $rule['field'] == 'post_author') {
3521
+		if ($search == 'current_user') {
3522 3522
 			$search = is_user_logged_in() ? (int) get_current_user_id() : - 1;
3523
-		} else if ( $search == 'current_author' ) {
3524
-			$search = ( ! empty( $post ) && $post->post_type != 'page' && isset( $post->post_author ) ) ? absint( $post->post_author ) : - 1;
3525
-		}
3526
-	} else if ( $_search == 'date_today' ) {
3527
-		$search = date( 'Y-m-d' );
3528
-	} else if ( $_search == 'date_tomorrow' ) {
3529
-		$search = date( 'Y-m-d', strtotime( "+1 day" ) );
3530
-	} else if ( $_search == 'date_yesterday' ) {
3531
-		$search = date( 'Y-m-d', strtotime( "-1 day" ) );
3532
-	} else if ( $_search == 'time_his' ) {
3533
-		$search = date( 'H:i:s' );
3534
-	} else if ( $_search == 'time_hi' ) {
3535
-		$search = date( 'H:i' );
3536
-	} else if ( $_search == 'datetime_now' ) {
3537
-		$search = date( 'Y-m-d H:i:s' );
3538
-	} else if ( strpos( $_search, 'datetime_after_' ) === 0 ) {
3539
-		$_searches = explode( 'datetime_after_', $_search, 2 );
3540
-
3541
-		if ( ! empty( $_searches[1] ) ) {
3542
-			$search = date( 'Y-m-d H:i:s', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3523
+		} else if ($search == 'current_author') {
3524
+			$search = (!empty($post) && $post->post_type != 'page' && isset($post->post_author)) ? absint($post->post_author) : - 1;
3525
+		}
3526
+	} else if ($_search == 'date_today') {
3527
+		$search = date('Y-m-d');
3528
+	} else if ($_search == 'date_tomorrow') {
3529
+		$search = date('Y-m-d', strtotime("+1 day"));
3530
+	} else if ($_search == 'date_yesterday') {
3531
+		$search = date('Y-m-d', strtotime("-1 day"));
3532
+	} else if ($_search == 'time_his') {
3533
+		$search = date('H:i:s');
3534
+	} else if ($_search == 'time_hi') {
3535
+		$search = date('H:i');
3536
+	} else if ($_search == 'datetime_now') {
3537
+		$search = date('Y-m-d H:i:s');
3538
+	} else if (strpos($_search, 'datetime_after_') === 0) {
3539
+		$_searches = explode('datetime_after_', $_search, 2);
3540
+
3541
+		if (!empty($_searches[1])) {
3542
+			$search = date('Y-m-d H:i:s', strtotime("+ " . str_replace("_", " ", $_searches[1])));
3543 3543
 		} else {
3544
-			$search = date( 'Y-m-d H:i:s' );
3544
+			$search = date('Y-m-d H:i:s');
3545 3545
 		}
3546
-	} else if ( strpos( $_search, 'datetime_before_' ) === 0 ) {
3547
-		$_searches = explode( 'datetime_before_', $_search, 2 );
3546
+	} else if (strpos($_search, 'datetime_before_') === 0) {
3547
+		$_searches = explode('datetime_before_', $_search, 2);
3548 3548
 
3549
-		if ( ! empty( $_searches[1] ) ) {
3550
-			$search = date( 'Y-m-d H:i:s', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3549
+		if (!empty($_searches[1])) {
3550
+			$search = date('Y-m-d H:i:s', strtotime("- " . str_replace("_", " ", $_searches[1])));
3551 3551
 		} else {
3552
-			$search = date( 'Y-m-d H:i:s' );
3552
+			$search = date('Y-m-d H:i:s');
3553 3553
 		}
3554
-	} else if ( strpos( $_search, 'date_after_' ) === 0 ) {
3555
-		$_searches = explode( 'date_after_', $_search, 2 );
3554
+	} else if (strpos($_search, 'date_after_') === 0) {
3555
+		$_searches = explode('date_after_', $_search, 2);
3556 3556
 
3557
-		if ( ! empty( $_searches[1] ) ) {
3558
-			$search = date( 'Y-m-d', strtotime( "+ " . str_replace( "_", " ", $_searches[1] ) ) );
3557
+		if (!empty($_searches[1])) {
3558
+			$search = date('Y-m-d', strtotime("+ " . str_replace("_", " ", $_searches[1])));
3559 3559
 		} else {
3560
-			$search = date( 'Y-m-d' );
3560
+			$search = date('Y-m-d');
3561 3561
 		}
3562
-	} else if ( strpos( $_search, 'date_before_' ) === 0 ) {
3563
-		$_searches = explode( 'date_before_', $_search, 2 );
3562
+	} else if (strpos($_search, 'date_before_') === 0) {
3563
+		$_searches = explode('date_before_', $_search, 2);
3564 3564
 
3565
-		if ( ! empty( $_searches[1] ) ) {
3566
-			$search = date( 'Y-m-d', strtotime( "- " . str_replace( "_", " ", $_searches[1] ) ) );
3565
+		if (!empty($_searches[1])) {
3566
+			$search = date('Y-m-d', strtotime("- " . str_replace("_", " ", $_searches[1])));
3567 3567
 		} else {
3568
-			$search = date( 'Y-m-d' );
3568
+			$search = date('Y-m-d');
3569 3569
 		}
3570 3570
 	}
3571 3571
 
3572
-	return apply_filters( 'sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search );
3572
+	return apply_filters('sd_gd_field_rule_search', $search, $post_type, $rule, $orig_search);
3573 3573
 }
Please login to merge, or discard this patch.