Supreme Modules Lite – Divi Theme, Extra Theme and Divi Builder - Version 2.2.3

Version Description

22.05.2020 = * Enhanced: Format and follow WordPress Coding Standards for all PHP files in /modules/. * Enhanced: isset() check for uninstall php.

Download this release

Release Info

Developer divisupreme
Plugin Icon 128x128 Supreme Modules Lite – Divi Theme, Extra Theme and Divi Builder
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

includes/modules/Badges/Badges.php CHANGED
@@ -204,8 +204,8 @@ class DSM_Text_Badges extends ET_Builder_Module {
204
  '<%1$s class="dsm-text-badges et_pb_module_header">%3$s%2$s%4$s</%1$s>',
205
  et_pb_process_header_level( $header_level, 'h4' ),
206
  $main_text,
207
- ( 'before' == $badges_placement ? $badges_text : '' ),
208
- ( 'after' == $badges_placement ? $badges_text : '' )
209
  );
210
  }
211
 
@@ -230,7 +230,7 @@ class DSM_Text_Badges extends ET_Builder_Module {
230
  'tablet' => $badges_gap_responsive_active ? $badges_gap_tablet : '',
231
  'phone' => $badges_gap_responsive_active ? $badges_gap_phone : '',
232
  );
233
- if ( 'after' == $badges_placement ) {
234
  et_pb_generate_responsive_css( $badges_gap_values, '%%order_class%% .dsm-badges-after', 'margin-left', $render_slug );
235
  } else {
236
  et_pb_generate_responsive_css( $badges_gap_values, '%%order_class%% .dsm-badges-before', 'margin-right', $render_slug );
204
  '<%1$s class="dsm-text-badges et_pb_module_header">%3$s%2$s%4$s</%1$s>',
205
  et_pb_process_header_level( $header_level, 'h4' ),
206
  $main_text,
207
+ ( 'before' === $badges_placement ? $badges_text : '' ),
208
+ ( 'after' === $badges_placement ? $badges_text : '' )
209
  );
210
  }
211
 
230
  'tablet' => $badges_gap_responsive_active ? $badges_gap_tablet : '',
231
  'phone' => $badges_gap_responsive_active ? $badges_gap_phone : '',
232
  );
233
+ if ( 'after' === $badges_placement ) {
234
  et_pb_generate_responsive_css( $badges_gap_values, '%%order_class%% .dsm-badges-after', 'margin-left', $render_slug );
235
  } else {
236
  et_pb_generate_responsive_css( $badges_gap_values, '%%order_class%% .dsm-badges-before', 'margin-right', $render_slug );
includes/modules/FacebookSimpleComments/FacebookSimpleComments.php CHANGED
@@ -73,13 +73,7 @@ class DSM_FacebookSimpleComments extends ET_Builder_Module {
73
  'type' => 'warning',
74
  'value' => isset( get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ) && '' !== get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ? true : false,
75
  'display_if' => false,
76
- 'message' => esc_html__(
77
- sprintf(
78
- 'The Facebook APP ID is currently empty in the <a href="%s" target="_blank">Divi Supreme Plugin Page</a>. This module might not function properly without the Facebook APP ID.',
79
- admin_url( 'admin.php?page=divi_supreme_settings#dsm_settings_social_media' )
80
- ),
81
- 'dsm-supreme-modules-for-divi'
82
- ),
83
  'toggle_slug' => 'main_content',
84
  ),
85
  'fb_app_id' => array(
73
  'type' => 'warning',
74
  'value' => isset( get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ) && '' !== get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ? true : false,
75
  'display_if' => false,
76
+ 'message' => et_get_safe_localization( sprintf( __( 'The Facebook APP ID is currently empty in the <a href="%s" target="_blank">Divi Supreme Plugin Page</a>. This module might not function properly without the Facebook APP ID.', 'dsm-supreme-modules-for-divi' ), admin_url( 'admin.php?page=divi_supreme_settings#dsm_settings_social_media' ) ) ),
 
 
 
 
 
 
77
  'toggle_slug' => 'main_content',
78
  ),
79
  'fb_app_id' => array(
includes/modules/FacebookSimpleFeed/FacebookSimpleFeed.php CHANGED
@@ -73,13 +73,7 @@ class DSM_FacebookSimpleFeed extends ET_Builder_Module {
73
  'type' => 'warning',
74
  'value' => isset( get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ) && '' !== get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ? true : false,
75
  'display_if' => false,
76
- 'message' => esc_html__(
77
- sprintf(
78
- 'The Facebook APP ID is currently empty in the <a href="%s" target="_blank">Divi Supreme Plugin Page</a>. This module might not function properly without the Facebook APP ID.',
79
- admin_url( 'admin.php?page=divi_supreme_settings#dsm_settings_social_media' )
80
- ),
81
- 'dsm-supreme-modules-for-divi'
82
- ),
83
  'toggle_slug' => 'main_content',
84
  ),
85
  'fb_app_id' => array(
73
  'type' => 'warning',
74
  'value' => isset( get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ) && '' !== get_option( 'dsm_settings_social_media' )['dsm_facebook_app_id'] ? true : false,
75
  'display_if' => false,
76
+ 'message' => et_get_safe_localization( sprintf( __( 'The Facebook APP ID is currently empty in the <a href="%s" target="_blank">Divi Supreme Plugin Page</a>. This module might not function properly without the Facebook APP ID.', 'dsm-supreme-modules-for-divi' ), admin_url( 'admin.php?page=divi_supreme_settings#dsm_settings_social_media' ) ) ),
 
 
 
 
 
 
77
  'toggle_slug' => 'main_content',
78
  ),
79
  'fb_app_id' => array(
includes/modules/IconList/IconList.php CHANGED
@@ -14,9 +14,9 @@ class DSM_Icon_List extends ET_Builder_Module {
14
 
15
  public function init() {
16
  $this->name = esc_html__( 'Supreme Icon List', 'dsm-supreme-modules-for-divi' );
17
- $this->icon = 'd';
18
  // Toggle settings
19
- $this->settings_modal_toggles = array(
20
  'general' => array(
21
  'toggles' => array(
22
  'main_content' => esc_html__( 'Icon Lists', 'dsm-supreme-modules-for-divi' ),
@@ -24,7 +24,7 @@ class DSM_Icon_List extends ET_Builder_Module {
24
  ),
25
  'advanced' => array(
26
  'toggles' => array(
27
- 'icon_settings' => array(
28
  'title' => esc_html__( 'Icon', 'dsm-supreme-modules-for-divi' ),
29
  'priority' => 70,
30
  ),
@@ -39,130 +39,130 @@ class DSM_Icon_List extends ET_Builder_Module {
39
 
40
  public function get_advanced_fields_config() {
41
  return array(
42
- 'fonts' => array(
43
  'text' => array(
44
- 'label' => esc_html__( '', 'dsm-supreme-modules-for-divi' ),
45
- 'css' => array(
46
- 'main' => '%%order_class%% .dsm_icon_list_items, %%order_class%% .dsm_icon_list_child a .dsm_icon_list_text',
47
  'important' => '',
48
  ),
49
- 'font_size' => array(
50
- 'default' => '14px',
51
  ),
52
- 'line_height' => array(
53
  'default' => '1.7em',
54
  ),
55
- 'letter_spacing' => array(
56
  'default' => '0px',
57
  ),
58
- 'tab_slug' => 'advanced',
59
- 'toggle_slug' => 'text',
60
  'hide_header_level' => true,
61
- 'hide_text_align' => true,
62
- 'hide_text_shadow' => false,
63
  ),
64
  ),
65
- 'text' => array(
66
- 'use_text_orientation' => false,
67
  'use_background_layout' => false,
68
- 'css' => array(
69
  'text_shadow' => '%%order_class%% .dsm_icon_list_child',
70
  ),
71
  ),
72
- 'borders' => array(
73
- 'default' => array(
74
  'css' => array(
75
  'main' => array(
76
- 'border_radii' => "%%order_class%%",
77
- 'border_styles' => "%%order_class%%",
78
  ),
79
  ),
80
  ),
81
- 'icon' => array(
82
- 'css' => array(
83
  'main' => array(
84
- 'border_radii' => "%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon",
85
- 'border_styles' => "%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon",
86
- )
87
  ),
88
- 'label_prefix' => esc_html__( 'Icon', 'dsm-supreme-modules-for-divi' ),
89
- 'tab_slug' => 'advanced',
90
- 'toggle_slug' => 'icon_settings',
91
  ),
92
- 'list_item' => array(
93
- 'css' => array(
94
  'main' => array(
95
- 'border_radii' => "%%order_class%% .dsm_icon_list_items .dsm_icon_list_child",
96
- 'border_styles' => "%%order_class%% .dsm_icon_list_items .dsm_icon_list_child",
97
- )
98
  ),
99
- 'label_prefix' => esc_html__( 'List Item', 'dsm-supreme-modules-for-divi' ),
100
- 'tab_slug' => 'advanced',
101
- 'toggle_slug' => 'list',
102
  ),
103
  ),
104
- 'box_shadow' => array(
105
  'default' => array(
106
- 'css' => array(
107
  'main' => '%%order_class%%',
108
  ),
109
  ),
110
- 'icon' => array(
111
- 'label' => esc_html__( 'icon Box Shadow', 'dsm-supreme-modules-for-divi' ),
112
- 'option_category' => 'layout',
113
- 'tab_slug' => 'advanced',
114
- 'toggle_slug' => 'icon_settings',
115
- 'css' => array(
116
  'main' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon',
117
  ),
118
- 'default_on_fronts' => array(
119
  'color' => '',
120
  'position' => '',
121
  ),
122
  ),
123
- 'list_item' => array(
124
- 'label' => esc_html__( 'List Item Box Shadow', 'dsm-supreme-modules-for-divi' ),
125
- 'option_category' => 'layout',
126
- 'tab_slug' => 'advanced',
127
- 'toggle_slug' => 'list',
128
- 'css' => array(
129
  'main' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
130
  ),
131
- 'default_on_fronts' => array(
132
  'color' => '',
133
  'position' => '',
134
  ),
135
  ),
136
  ),
137
- 'button' => false,
138
- 'link_options' => false,
139
-
140
  );
141
  }
142
 
143
  public function get_fields() {
144
  $et_accent_color = et_builder_accent_color();
145
  return array(
146
- 'icon_color' => array(
147
- 'default' => $et_accent_color,
148
- 'label' => esc_html__( 'Icon Color', 'dsm-supreme-modules-for-divi' ),
149
- 'type' => 'color-alpha',
150
- 'description' => esc_html__( 'Here you can define a custom color for your icon.', 'dsm-supreme-modules-for-divi' ),
151
- 'tab_slug' => 'advanced',
152
- 'toggle_slug' => 'icon_settings',
153
- 'hover' => 'tabs',
154
- 'mobile_options' => true,
155
  ),
156
- 'icon_background_color' => array(
157
- 'label' => esc_html__( 'Icon Background Color', 'dsm-supreme-modules-for-divi' ),
158
- 'type' => 'color-alpha',
159
- 'description' => esc_html__( 'Here you can define a custom background color for your icon.', 'dsm-supreme-modules-for-divi' ),
160
- 'tab_slug' => 'advanced',
161
- 'toggle_slug' => 'icon_settings',
162
- 'hover' => 'tabs',
163
- 'mobile_options' => true,
164
  ),
165
- 'icon_padding' => array(
166
  'label' => esc_html__( 'Icon Padding', 'dsm-supreme-modules-for-divi' ),
167
  'description' => esc_html__( 'Here you can define a custom padding size for the icon.', 'dsm-supreme-modules-for-divi' ),
168
  'type' => 'range',
@@ -171,7 +171,7 @@ class DSM_Icon_List extends ET_Builder_Module {
171
  'toggle_slug' => 'icon_settings',
172
  'default_unit' => 'px',
173
  'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
174
- 'range_settings' => array(
175
  'min' => '1',
176
  'max' => '30',
177
  'step' => '1',
@@ -180,40 +180,40 @@ class DSM_Icon_List extends ET_Builder_Module {
180
  'responsive' => true,
181
  'hover' => 'tabs',
182
  ),
183
- 'icon_font_size' => array(
184
- 'label' => esc_html__( 'Icon Font Size', 'dsm-supreme-modules-for-divi' ),
185
- 'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'dsm-supreme-modules-for-divi' ),
186
- 'type' => 'range',
187
- 'option_category' => 'font_option',
188
- 'tab_slug' => 'advanced',
189
- 'toggle_slug' => 'icon_settings',
190
- 'default' => '14px',
191
- 'default_unit' => 'px',
192
- 'default_on_front'=> '',
193
- 'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
194
- 'range_settings' => array(
195
  'min' => '1',
196
  'max' => '120',
197
  'step' => '1',
198
  ),
199
- 'mobile_options' => true,
200
- 'responsive' => true,
201
- 'hover' => 'tabs',
202
  ),
203
- 'list_alignment' => array(
204
  'label' => esc_html__( 'Alignment', 'dsm-supreme-modules-for-divi' ),
205
  'description' => esc_html__( 'The List can be placed either above, below or in the center of the module.', 'dsm-supreme-modules-for-divi' ),
206
  'type' => 'select',
207
  'option_category' => 'layout',
208
  'options' => array(
209
- 'flex-start' => esc_html__( 'Left', 'dsm-supreme-modules-for-divi' ),
210
- 'center' => esc_html__( 'Center', 'dsm-supreme-modules-for-divi' ),
211
- 'flex-end' => esc_html__( 'Right', 'dsm-supreme-modules-for-divi' ),
212
  ),
213
- 'default' => 'flex-start',
214
  'mobile_options' => true,
215
  'responsive' => true,
216
- 'tab_slug' => 'advanced',
217
  'toggle_slug' => 'list',
218
  ),
219
  'list_vertical_alignment' => array(
@@ -222,79 +222,79 @@ class DSM_Icon_List extends ET_Builder_Module {
222
  'type' => 'select',
223
  'option_category' => 'layout',
224
  'options' => array(
225
- 'flex-start' => esc_html__( 'Top', 'dsm-supreme-modules-for-divi' ),
226
- 'center' => esc_html__( 'Vertically Centered', 'dsm-supreme-modules-for-divi' ),
227
- 'flex-end' => esc_html__( 'Bottom', 'dsm-supreme-modules-for-divi' ),
228
  ),
229
- 'default' => 'center',
230
  'mobile_options' => true,
231
  'responsive' => true,
232
- 'tab_slug' => 'advanced',
233
  'toggle_slug' => 'list',
234
  ),
235
- 'list_space_between' => array(
236
- 'label' => esc_html__( 'Space Between', 'dsm-supreme-modules-for-divi' ),
237
- 'type' => 'range',
238
- 'option_category' => 'configuration',
239
- 'default' => '0px',
240
  'default_on_front' => '0px',
241
- 'default_unit' => 'px',
242
- 'range_settings' => array(
243
- 'min' => '0',
244
- 'max' => '100',
245
- 'step' => '1',
246
  ),
247
- 'mobile_options' => true,
248
- 'responsive' => true,
249
- 'hover' => 'tabs',
250
- 'tab_slug' => 'advanced',
251
- 'toggle_slug' => 'list',
252
  ),
253
- 'list_background' => array(
254
- 'label' => esc_html__( 'Background Color', 'dsm-supreme-modules-for-divi' ),
255
- 'type' => 'color-alpha',
256
- 'description' => esc_html__( 'Here you can define a custom color for your list items.', 'dsm-supreme-modules-for-divi' ),
257
- 'tab_slug' => 'advanced',
258
- 'toggle_slug' => 'list',
259
- 'hover' => 'tabs',
260
- 'mobile_options' => true,
261
  ),
262
- 'list_padding' => array(
263
  'label' => esc_html__( 'Padding', 'dsm-supreme-modules-for-divi' ),
264
  'type' => 'custom_padding',
265
  'mobile_options' => true,
266
- 'hover' => 'tabs',
267
  'option_category' => 'layout',
268
  'description' => esc_html__( 'Adjust padding to specific values, or leave blank to use the default padding.', 'dsm-supreme-modules-for-divi' ),
269
- 'tab_slug' => 'advanced',
270
- 'toggle_slug' => 'list',
271
- 'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
272
- ),
273
- 'text_indent' => array(
274
- 'label' => esc_html__( 'Text Indent', 'dsm-supreme-modules-for-divi' ),
275
- 'description' => esc_html__( 'Here you can add padding between the icons and the text.', 'dsm-supreme-modules-for-divi' ),
276
- 'type' => 'range',
277
- 'option_category' => 'font_option',
278
  'tab_slug' => 'advanced',
279
- 'toggle_slug' => 'text',
280
- 'default' => '5px',
281
- 'default_unit' => 'px',
282
- 'default_on_front'=> '5px',
283
  'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
284
- 'range_settings' => array(
 
 
 
 
 
 
 
 
 
 
 
 
285
  'min' => '1',
286
  'max' => '100',
287
  'step' => '1',
288
  ),
289
- 'mobile_options' => true,
290
- 'responsive' => true,
291
- 'hover' => 'tabs',
292
  ),
293
  );
294
  }
295
 
296
  public function get_transition_fields_css_props() {
297
- $fields = parent::get_transition_fields_css_props();
298
  $fields['icon_color'] = array(
299
  'color' => '%%order_class%% .dsm_icon_list_child .dsm_icon_list_icon',
300
  );
@@ -314,7 +314,7 @@ class DSM_Icon_List extends ET_Builder_Module {
314
  $fields['text_indent'] = array(
315
  'padding-left' => '%%order_class%% .dsm_icon_list_child .dsm_icon_list_text',
316
  );
317
-
318
  $fields['list_space_between'] = array(
319
  'margin-bottom' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)',
320
  );
@@ -331,16 +331,16 @@ class DSM_Icon_List extends ET_Builder_Module {
331
  }
332
 
333
  public function render( $attrs, $content = null, $render_slug ) {
334
- $multi_view = et_pb_multi_view_options( $this );
335
-
336
- $icon_color_hover = $this->get_hover_value( 'icon_color' );
337
- $icon_color = $this->props['icon_color'];
338
  $icon_color_tablet = $this->props['icon_color_tablet'];
339
  $icon_color_phone = $this->props['icon_color_phone'];
340
  $icon_color_last_edited = $this->props['icon_color_last_edited'];
341
 
342
- $icon_background_color_hover = $this->get_hover_value( 'icon_background_color' );
343
- $icon_background_color = $this->props['icon_background_color'];
344
  $icon_background_color_tablet = $this->props['icon_background_color_tablet'];
345
  $icon_background_color_phone = $this->props['icon_background_color_phone'];
346
  $icon_background_color_last_edited = $this->props['icon_background_color_last_edited'];
@@ -349,44 +349,44 @@ class DSM_Icon_List extends ET_Builder_Module {
349
  $icon_padding_hover = $this->get_hover_value( 'icon_padding' );
350
  $icon_padding_tablet = $this->props['icon_padding_tablet'];
351
  $icon_padding_phone = $this->props['icon_padding_phone'];
352
- $icon_padding_last_edited = $this->props['icon_padding_last_edited'];
353
 
354
- $icon_font_size = $this->props['icon_font_size'];
355
  $icon_font_size_hover = $this->get_hover_value( 'icon_font_size' );
356
  $icon_font_size_tablet = $this->props['icon_font_size_tablet'];
357
  $icon_font_size_phone = $this->props['icon_font_size_phone'];
358
  $icon_font_size_last_edited = $this->props['icon_font_size_last_edited'];
359
 
360
- $list_space_between_hover = $this->get_hover_value( 'list_space_between' );
361
- $list_space_between = $this->props['list_space_between'];
362
  $list_space_between_tablet = $this->props['list_space_between_tablet'];
363
  $list_space_between_phone = $this->props['list_space_between_phone'];
364
  $list_space_between_last_edited = $this->props['list_space_between_last_edited'];
365
 
366
- $list_background_hover = $this->get_hover_value( 'list_background' );
367
- $list_background = $this->props['list_background'];
368
  $list_background_tablet = $this->props['list_background_tablet'];
369
  $list_background_phone = $this->props['list_background_phone'];
370
  $list_background_last_edited = $this->props['list_background_last_edited'];
371
 
372
- $list_padding_hover = $this->get_hover_value( 'list_padding' );
373
- $list_padding = $this->props['list_padding'];
374
  $list_padding_values = et_pb_responsive_options()->get_property_values( $this->props, 'list_padding' );
375
- $list_padding_size_tablet = isset( $list_padding_values['tablet'] ) ? $list_padding_values['tablet'] : '';
376
- $list_padding_size_phone = isset( $list_padding_values['phone'] ) ? $list_padding_values['phone'] : '';
377
 
378
- $text_indent = $this->props['text_indent'];
379
- $text_indent_hover = $this->get_hover_value( 'text_indent' );
380
  $text_indent_tablet = $this->props['text_indent_tablet'];
381
  $text_indent_phone = $this->props['text_indent_phone'];
382
  $text_indent_last_edited = $this->props['text_indent_last_edited'];
383
 
384
- $list_alignment = $this->props['list_alignment'];
385
  $list_alignment_tablet = $this->props['list_alignment_tablet'];
386
  $list_alignment_phone = $this->props['list_alignment_phone'];
387
  $list_alignment_last_edited = $this->props['list_alignment_last_edited'];
388
 
389
- $list_vertical_alignment = $this->props['list_vertical_alignment'];
390
  $list_vertical_alignment_tablet = $this->props['list_vertical_alignment_tablet'];
391
  $list_vertical_alignment_phone = $this->props['list_vertical_alignment_phone'];
392
  $list_vertical_alignment_last_edited = $this->props['list_vertical_alignment_last_edited'];
@@ -406,23 +406,26 @@ class DSM_Icon_List extends ET_Builder_Module {
406
 
407
  if ( '' !== $icon_padding ) {
408
  $icon_padding_responsive_active = et_pb_get_responsive_status( $icon_padding_last_edited );
409
-
410
  $icon_padding_values = array(
411
- 'desktop' => $icon_padding,
412
- 'tablet' => $icon_padding_responsive_active ? $icon_padding_tablet : '',
413
- 'phone' => $icon_padding_responsive_active ? $icon_padding_phone : '',
414
  );
415
-
416
  et_pb_generate_responsive_css( $icon_padding_values, $icon_selector, 'padding', $render_slug );
417
-
418
  if ( et_builder_is_hover_enabled( 'icon_padding', $this->props ) ) {
419
- ET_Builder_Element::set_style( $render_slug, array(
420
- 'selector' => $this->add_hover_to_order_class( $icon_selector ),
421
- 'declaration' => sprintf(
422
- 'padding: %1$s;',
423
- esc_html( $icon_padding_hover )
424
- ),
425
- ) );
 
 
 
426
  }
427
  }
428
 
@@ -435,28 +438,40 @@ class DSM_Icon_List extends ET_Builder_Module {
435
  $icon_style_hover = sprintf( 'color: %1$s;', esc_attr( $icon_color_hover ) );
436
  }
437
 
438
- ET_Builder_Element::set_style( $render_slug, array(
439
- 'selector' => $icon_selector,
440
- 'declaration' => $icon_style,
441
- ) );
 
 
 
442
 
443
- ET_Builder_Element::set_style( $render_slug, array(
444
- 'selector' => $icon_selector,
445
- 'declaration' => $icon_tablet_style,
446
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
447
- ) );
 
 
 
448
 
449
- ET_Builder_Element::set_style( $render_slug, array(
450
- 'selector' => $icon_selector,
451
- 'declaration' => $icon_phone_style,
452
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
453
- ) );
 
 
 
454
 
455
  if ( '' !== $icon_style_hover ) {
456
- ET_Builder_Element::set_style( $render_slug, array(
457
- 'selector' => $this->add_hover_to_order_class( $icon_selector ),
458
- 'declaration' => $icon_style_hover,
459
- ) );
 
 
 
460
  }
461
 
462
  $icon_background_style = sprintf( 'background-color: %1$s;', esc_attr( $icon_background_color ) );
@@ -469,168 +484,216 @@ class DSM_Icon_List extends ET_Builder_Module {
469
  }
470
 
471
  if ( '' !== $icon_background_color ) {
472
- ET_Builder_Element::set_style( $render_slug, array(
473
- 'selector' => $icon_selector,
474
- 'declaration' => $icon_background_style,
475
- ) );
 
 
 
476
  }
477
 
478
- ET_Builder_Element::set_style( $render_slug, array(
479
- 'selector' => $icon_selector,
480
- 'declaration' => $icon_background_tablet_style,
481
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
482
- ) );
 
 
 
483
 
484
- ET_Builder_Element::set_style( $render_slug, array(
485
- 'selector' => $icon_selector,
486
- 'declaration' => $icon_background_phone_style,
487
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
488
- ) );
 
 
 
489
 
490
  if ( '' !== $icon_background_style_hover ) {
491
- ET_Builder_Element::set_style( $render_slug, array(
492
- 'selector' => $this->add_hover_to_order_class( $icon_selector ),
493
- 'declaration' => $icon_background_style_hover,
494
- ) );
 
 
 
495
  }
496
 
497
  if ( '5px' !== $text_indent ) {
498
  $text_indent_responsive_active = et_pb_get_responsive_status( $text_indent_last_edited );
499
-
500
  $text_indent_values = array(
501
- 'desktop' => $text_indent,
502
- 'tablet' => $text_indent_responsive_active ? $text_indent_tablet : '',
503
- 'phone' => $text_indent_responsive_active ? $text_indent_phone : '',
504
  );
505
-
506
  et_pb_generate_responsive_css( $text_indent_values, $text_selector, 'padding-left', $render_slug );
507
-
508
  if ( et_builder_is_hover_enabled( 'text_indent', $this->props ) ) {
509
- ET_Builder_Element::set_style( $render_slug, array(
 
 
510
  'selector' => $this->add_hover_to_order_class( $text_selector ),
511
  'declaration' => sprintf(
512
- 'padding-left: %1$s;',
513
- esc_html( $text_indent_hover )
514
  ),
515
- ) );
 
516
  }
517
  }
518
 
519
  $list_alignment_style = sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment ) );
520
  $list_alignment_tablet_style = '' !== $list_alignment_tablet ? sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment_tablet ) ) : '';
521
- $list_alignment_tablet_style = '' !== $list_alignment_phone ? sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment_phone ) ) : '';
522
 
523
  if ( 'flex-start' !== $list_alignment ) {
524
- ET_Builder_Element::set_style( $render_slug, array(
525
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
526
- 'declaration' => $list_alignment_style,
527
- ) );
 
 
 
528
  }
529
 
530
- ET_Builder_Element::set_style( $render_slug, array(
531
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
532
- 'declaration' => $list_alignment_tablet_style,
533
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
534
- ) );
 
 
 
535
 
536
- ET_Builder_Element::set_style( $render_slug, array(
537
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
538
- 'declaration' => $list_alignment_tablet_style,
539
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
540
- ) );
 
 
 
541
 
542
  $list_vertical_alignment_style = sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment ) );
543
  $list_vertical_alignment_tablet_style = '' !== $list_vertical_alignment_tablet ? sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment_tablet ) ) : '';
544
- $list_vertical_alignment_tablet_style = '' !== $list_vertical_alignment_phone ? sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment_phone ) ) : '';
545
 
546
  if ( 'center' !== $list_vertical_alignment ) {
547
- ET_Builder_Element::set_style( $render_slug, array(
548
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
549
- 'declaration' => $list_vertical_alignment_style,
550
- ) );
 
 
 
551
  }
552
 
553
- ET_Builder_Element::set_style( $render_slug, array(
554
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
555
- 'declaration' => $list_vertical_alignment_tablet_style,
556
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
557
- ) );
558
-
559
- ET_Builder_Element::set_style( $render_slug, array(
560
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
561
- 'declaration' => $list_vertical_alignment_tablet_style,
562
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
563
- ) );
564
-
 
 
 
 
 
 
565
  if ( '' !== $list_space_between ) {
566
  $list_space_between_responsive_active = et_pb_get_responsive_status( $list_space_between_last_edited );
567
-
568
  $list_space_between_values = array(
569
- 'desktop' => $list_space_between,
570
- 'tablet' => $list_space_between_responsive_active ? $list_space_between_tablet : '',
571
- 'phone' => $list_space_between_responsive_active ? $list_space_between_phone : '',
572
  );
573
-
574
  et_pb_generate_responsive_css( $list_space_between_values, '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)', 'margin-bottom', $render_slug );
575
-
576
  if ( et_builder_is_hover_enabled( 'list_space_between', $this->props ) ) {
577
- ET_Builder_Element::set_style( $render_slug, array(
578
- 'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)' ),
579
- 'declaration' => sprintf(
580
- 'margin-bottom: %1$s;',
581
- esc_html( $list_space_between_hover )
582
- ),
583
- ) );
 
 
 
584
  }
585
  }
586
 
587
  if ( '' !== $list_background ) {
588
- ET_Builder_Element::set_style( $render_slug, array(
589
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
590
- 'declaration' => sprintf(
591
- 'background-color: %1$s;',
592
- esc_html( $list_background )
593
- ),
594
- ) );
 
 
 
595
  }
596
 
597
  if ( '' !== $list_background_tablet ) {
598
- ET_Builder_Element::set_style( $render_slug, array(
599
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
600
- 'declaration' => sprintf(
601
- 'background-color: %1$s;',
602
- esc_html( $list_background_tablet )
603
- ),
604
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
605
- ) );
 
 
 
606
  }
607
 
608
  if ( '' !== $list_background_phone ) {
609
- ET_Builder_Element::set_style( $render_slug, array(
610
- 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
611
- 'declaration' => sprintf(
612
- 'background-color: %1$s;',
613
- esc_html( $list_background_phone )
614
- ),
615
- 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
616
- ) );
 
 
 
617
  }
618
 
619
  if ( et_builder_is_hover_enabled( 'list_background', $this->props ) ) {
620
- ET_Builder_Element::set_style( $render_slug, array(
621
- 'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child' ),
622
- 'declaration' => sprintf(
623
- 'background-color: %1$s;',
624
- esc_html( $list_background_hover )
625
- ),
626
- ) );
 
 
 
627
  }
628
 
629
  $this->apply_custom_margin_padding(
630
- $render_slug,
631
- 'list_padding',
632
- 'padding',
633
- '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child'
634
  );
635
 
636
  // Render module content
@@ -642,47 +705,59 @@ class DSM_Icon_List extends ET_Builder_Module {
642
  return $output;
643
  }
644
  /*credits https://github.com/elegantthemes/create-divi-extension/issues/125#issuecomment-445442095*/
645
- public function apply_custom_margin_padding($function_name, $slug, $type, $class, $important = false) {
646
- $slug_value = $this->props[$slug];
647
- $slug_value_tablet = $this->props[$slug . '_tablet'];
648
- $slug_value_phone = $this->props[$slug . '_phone'];
649
- $slug_value_last_edited = $this->props[$slug . '_last_edited'];
650
- $slug_value_responsive_active = et_pb_get_responsive_status($slug_value_last_edited);
651
-
652
- if (isset($slug_value) && !empty($slug_value)) {
653
- ET_Builder_Element::set_style($function_name, array(
654
- 'selector' => $class,
655
- 'declaration' => et_builder_get_element_style_css($slug_value, $type, $important),
656
- ));
657
- }
658
-
659
- if (isset($slug_value_tablet) && !empty($slug_value_tablet) && $slug_value_responsive_active) {
660
- ET_Builder_Element::set_style($function_name, array(
661
- 'selector' => $class,
662
- 'declaration' => et_builder_get_element_style_css($slug_value_tablet, $type, $important),
663
- 'media_query' => ET_Builder_Element::get_media_query('max_width_980'),
664
- ));
665
- }
666
-
667
- if (isset($slug_value_phone) && !empty($slug_value_phone) && $slug_value_responsive_active) {
668
- ET_Builder_Element::set_style($function_name, array(
669
- 'selector' => $class,
670
- 'declaration' => et_builder_get_element_style_css($slug_value_phone, $type, $important),
671
- 'media_query' => ET_Builder_Element::get_media_query('max_width_767'),
672
- ));
 
 
 
 
 
 
 
 
 
673
  }
674
 
675
  if ( et_builder_is_hover_enabled( $slug, $this->props ) ) {
676
- if (isset($this->props[$slug.'__hover']) ) {
677
- $hover = $this->props[$slug.'__hover'];
678
- ET_Builder_Element::set_style($function_name, array(
679
- 'selector' => $this->add_hover_to_order_class($class),
680
- 'declaration' => et_builder_get_element_style_css($hover, $type, $important),
681
- ));
 
 
 
682
  }
683
  }
684
 
685
- }
686
  }
687
 
688
  new DSM_Icon_List;
14
 
15
  public function init() {
16
  $this->name = esc_html__( 'Supreme Icon List', 'dsm-supreme-modules-for-divi' );
17
+ $this->icon = 'd';
18
  // Toggle settings
19
+ $this->settings_modal_toggles = array(
20
  'general' => array(
21
  'toggles' => array(
22
  'main_content' => esc_html__( 'Icon Lists', 'dsm-supreme-modules-for-divi' ),
24
  ),
25
  'advanced' => array(
26
  'toggles' => array(
27
+ 'icon_settings' => array(
28
  'title' => esc_html__( 'Icon', 'dsm-supreme-modules-for-divi' ),
29
  'priority' => 70,
30
  ),
39
 
40
  public function get_advanced_fields_config() {
41
  return array(
42
+ 'fonts' => array(
43
  'text' => array(
44
+ 'label' => esc_html__( '', 'dsm-supreme-modules-for-divi' ),
45
+ 'css' => array(
46
+ 'main' => '%%order_class%% .dsm_icon_list_items, %%order_class%% .dsm_icon_list_child a .dsm_icon_list_text',
47
  'important' => '',
48
  ),
49
+ 'font_size' => array(
50
+ 'default' => '14px',
51
  ),
52
+ 'line_height' => array(
53
  'default' => '1.7em',
54
  ),
55
+ 'letter_spacing' => array(
56
  'default' => '0px',
57
  ),
58
+ 'tab_slug' => 'advanced',
59
+ 'toggle_slug' => 'text',
60
  'hide_header_level' => true,
61
+ 'hide_text_align' => true,
62
+ 'hide_text_shadow' => false,
63
  ),
64
  ),
65
+ 'text' => array(
66
+ 'use_text_orientation' => false,
67
  'use_background_layout' => false,
68
+ 'css' => array(
69
  'text_shadow' => '%%order_class%% .dsm_icon_list_child',
70
  ),
71
  ),
72
+ 'borders' => array(
73
+ 'default' => array(
74
  'css' => array(
75
  'main' => array(
76
+ 'border_radii' => '%%order_class%%',
77
+ 'border_styles' => '%%order_class%%',
78
  ),
79
  ),
80
  ),
81
+ 'icon' => array(
82
+ 'css' => array(
83
  'main' => array(
84
+ 'border_radii' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon',
85
+ 'border_styles' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon',
86
+ ),
87
  ),
88
+ 'label_prefix' => esc_html__( 'Icon', 'dsm-supreme-modules-for-divi' ),
89
+ 'tab_slug' => 'advanced',
90
+ 'toggle_slug' => 'icon_settings',
91
  ),
92
+ 'list_item' => array(
93
+ 'css' => array(
94
  'main' => array(
95
+ 'border_radii' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
96
+ 'border_styles' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
97
+ ),
98
  ),
99
+ 'label_prefix' => esc_html__( 'List Item', 'dsm-supreme-modules-for-divi' ),
100
+ 'tab_slug' => 'advanced',
101
+ 'toggle_slug' => 'list',
102
  ),
103
  ),
104
+ 'box_shadow' => array(
105
  'default' => array(
106
+ 'css' => array(
107
  'main' => '%%order_class%%',
108
  ),
109
  ),
110
+ 'icon' => array(
111
+ 'label' => esc_html__( 'icon Box Shadow', 'dsm-supreme-modules-for-divi' ),
112
+ 'option_category' => 'layout',
113
+ 'tab_slug' => 'advanced',
114
+ 'toggle_slug' => 'icon_settings',
115
+ 'css' => array(
116
  'main' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_icon',
117
  ),
118
+ 'default_on_fronts' => array(
119
  'color' => '',
120
  'position' => '',
121
  ),
122
  ),
123
+ 'list_item' => array(
124
+ 'label' => esc_html__( 'List Item Box Shadow', 'dsm-supreme-modules-for-divi' ),
125
+ 'option_category' => 'layout',
126
+ 'tab_slug' => 'advanced',
127
+ 'toggle_slug' => 'list',
128
+ 'css' => array(
129
  'main' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
130
  ),
131
+ 'default_on_fronts' => array(
132
  'color' => '',
133
  'position' => '',
134
  ),
135
  ),
136
  ),
137
+ 'button' => false,
138
+ 'link_options' => false,
139
+
140
  );
141
  }
142
 
143
  public function get_fields() {
144
  $et_accent_color = et_builder_accent_color();
145
  return array(
146
+ 'icon_color' => array(
147
+ 'default' => $et_accent_color,
148
+ 'label' => esc_html__( 'Icon Color', 'dsm-supreme-modules-for-divi' ),
149
+ 'type' => 'color-alpha',
150
+ 'description' => esc_html__( 'Here you can define a custom color for your icon.', 'dsm-supreme-modules-for-divi' ),
151
+ 'tab_slug' => 'advanced',
152
+ 'toggle_slug' => 'icon_settings',
153
+ 'hover' => 'tabs',
154
+ 'mobile_options' => true,
155
  ),
156
+ 'icon_background_color' => array(
157
+ 'label' => esc_html__( 'Icon Background Color', 'dsm-supreme-modules-for-divi' ),
158
+ 'type' => 'color-alpha',
159
+ 'description' => esc_html__( 'Here you can define a custom background color for your icon.', 'dsm-supreme-modules-for-divi' ),
160
+ 'tab_slug' => 'advanced',
161
+ 'toggle_slug' => 'icon_settings',
162
+ 'hover' => 'tabs',
163
+ 'mobile_options' => true,
164
  ),
165
+ 'icon_padding' => array(
166
  'label' => esc_html__( 'Icon Padding', 'dsm-supreme-modules-for-divi' ),
167
  'description' => esc_html__( 'Here you can define a custom padding size for the icon.', 'dsm-supreme-modules-for-divi' ),
168
  'type' => 'range',
171
  'toggle_slug' => 'icon_settings',
172
  'default_unit' => 'px',
173
  'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
174
+ 'range_settings' => array(
175
  'min' => '1',
176
  'max' => '30',
177
  'step' => '1',
180
  'responsive' => true,
181
  'hover' => 'tabs',
182
  ),
183
+ 'icon_font_size' => array(
184
+ 'label' => esc_html__( 'Icon Font Size', 'dsm-supreme-modules-for-divi' ),
185
+ 'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'dsm-supreme-modules-for-divi' ),
186
+ 'type' => 'range',
187
+ 'option_category' => 'font_option',
188
+ 'tab_slug' => 'advanced',
189
+ 'toggle_slug' => 'icon_settings',
190
+ 'default' => '14px',
191
+ 'default_unit' => 'px',
192
+ 'default_on_front' => '',
193
+ 'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
194
+ 'range_settings' => array(
195
  'min' => '1',
196
  'max' => '120',
197
  'step' => '1',
198
  ),
199
+ 'mobile_options' => true,
200
+ 'responsive' => true,
201
+ 'hover' => 'tabs',
202
  ),
203
+ 'list_alignment' => array(
204
  'label' => esc_html__( 'Alignment', 'dsm-supreme-modules-for-divi' ),
205
  'description' => esc_html__( 'The List can be placed either above, below or in the center of the module.', 'dsm-supreme-modules-for-divi' ),
206
  'type' => 'select',
207
  'option_category' => 'layout',
208
  'options' => array(
209
+ 'flex-start' => esc_html__( 'Left', 'dsm-supreme-modules-for-divi' ),
210
+ 'center' => esc_html__( 'Center', 'dsm-supreme-modules-for-divi' ),
211
+ 'flex-end' => esc_html__( 'Right', 'dsm-supreme-modules-for-divi' ),
212
  ),
213
+ 'default' => 'flex-start',
214
  'mobile_options' => true,
215
  'responsive' => true,
216
+ 'tab_slug' => 'advanced',
217
  'toggle_slug' => 'list',
218
  ),
219
  'list_vertical_alignment' => array(
222
  'type' => 'select',
223
  'option_category' => 'layout',
224
  'options' => array(
225
+ 'flex-start' => esc_html__( 'Top', 'dsm-supreme-modules-for-divi' ),
226
+ 'center' => esc_html__( 'Vertically Centered', 'dsm-supreme-modules-for-divi' ),
227
+ 'flex-end' => esc_html__( 'Bottom', 'dsm-supreme-modules-for-divi' ),
228
  ),
229
+ 'default' => 'center',
230
  'mobile_options' => true,
231
  'responsive' => true,
232
+ 'tab_slug' => 'advanced',
233
  'toggle_slug' => 'list',
234
  ),
235
+ 'list_space_between' => array(
236
+ 'label' => esc_html__( 'Space Between', 'dsm-supreme-modules-for-divi' ),
237
+ 'type' => 'range',
238
+ 'option_category' => 'configuration',
239
+ 'default' => '0px',
240
  'default_on_front' => '0px',
241
+ 'default_unit' => 'px',
242
+ 'range_settings' => array(
243
+ 'min' => '0',
244
+ 'max' => '100',
245
+ 'step' => '1',
246
  ),
247
+ 'mobile_options' => true,
248
+ 'responsive' => true,
249
+ 'hover' => 'tabs',
250
+ 'tab_slug' => 'advanced',
251
+ 'toggle_slug' => 'list',
252
  ),
253
+ 'list_background' => array(
254
+ 'label' => esc_html__( 'Background Color', 'dsm-supreme-modules-for-divi' ),
255
+ 'type' => 'color-alpha',
256
+ 'description' => esc_html__( 'Here you can define a custom color for your list items.', 'dsm-supreme-modules-for-divi' ),
257
+ 'tab_slug' => 'advanced',
258
+ 'toggle_slug' => 'list',
259
+ 'hover' => 'tabs',
260
+ 'mobile_options' => true,
261
  ),
262
+ 'list_padding' => array(
263
  'label' => esc_html__( 'Padding', 'dsm-supreme-modules-for-divi' ),
264
  'type' => 'custom_padding',
265
  'mobile_options' => true,
266
+ 'hover' => 'tabs',
267
  'option_category' => 'layout',
268
  'description' => esc_html__( 'Adjust padding to specific values, or leave blank to use the default padding.', 'dsm-supreme-modules-for-divi' ),
 
 
 
 
 
 
 
 
 
269
  'tab_slug' => 'advanced',
270
+ 'toggle_slug' => 'list',
 
 
 
271
  'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
272
+ ),
273
+ 'text_indent' => array(
274
+ 'label' => esc_html__( 'Text Indent', 'dsm-supreme-modules-for-divi' ),
275
+ 'description' => esc_html__( 'Here you can add padding between the icons and the text.', 'dsm-supreme-modules-for-divi' ),
276
+ 'type' => 'range',
277
+ 'option_category' => 'font_option',
278
+ 'tab_slug' => 'advanced',
279
+ 'toggle_slug' => 'text',
280
+ 'default' => '5px',
281
+ 'default_unit' => 'px',
282
+ 'default_on_front' => '5px',
283
+ 'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
284
+ 'range_settings' => array(
285
  'min' => '1',
286
  'max' => '100',
287
  'step' => '1',
288
  ),
289
+ 'mobile_options' => true,
290
+ 'responsive' => true,
291
+ 'hover' => 'tabs',
292
  ),
293
  );
294
  }
295
 
296
  public function get_transition_fields_css_props() {
297
+ $fields = parent::get_transition_fields_css_props();
298
  $fields['icon_color'] = array(
299
  'color' => '%%order_class%% .dsm_icon_list_child .dsm_icon_list_icon',
300
  );
314
  $fields['text_indent'] = array(
315
  'padding-left' => '%%order_class%% .dsm_icon_list_child .dsm_icon_list_text',
316
  );
317
+
318
  $fields['list_space_between'] = array(
319
  'margin-bottom' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)',
320
  );
331
  }
332
 
333
  public function render( $attrs, $content = null, $render_slug ) {
334
+ $multi_view = et_pb_multi_view_options( $this );
335
+
336
+ $icon_color_hover = $this->get_hover_value( 'icon_color' );
337
+ $icon_color = $this->props['icon_color'];
338
  $icon_color_tablet = $this->props['icon_color_tablet'];
339
  $icon_color_phone = $this->props['icon_color_phone'];
340
  $icon_color_last_edited = $this->props['icon_color_last_edited'];
341
 
342
+ $icon_background_color_hover = $this->get_hover_value( 'icon_background_color' );
343
+ $icon_background_color = $this->props['icon_background_color'];
344
  $icon_background_color_tablet = $this->props['icon_background_color_tablet'];
345
  $icon_background_color_phone = $this->props['icon_background_color_phone'];
346
  $icon_background_color_last_edited = $this->props['icon_background_color_last_edited'];
349
  $icon_padding_hover = $this->get_hover_value( 'icon_padding' );
350
  $icon_padding_tablet = $this->props['icon_padding_tablet'];
351
  $icon_padding_phone = $this->props['icon_padding_phone'];
352
+ $icon_padding_last_edited = $this->props['icon_padding_last_edited'];
353
 
354
+ $icon_font_size = $this->props['icon_font_size'];
355
  $icon_font_size_hover = $this->get_hover_value( 'icon_font_size' );
356
  $icon_font_size_tablet = $this->props['icon_font_size_tablet'];
357
  $icon_font_size_phone = $this->props['icon_font_size_phone'];
358
  $icon_font_size_last_edited = $this->props['icon_font_size_last_edited'];
359
 
360
+ $list_space_between_hover = $this->get_hover_value( 'list_space_between' );
361
+ $list_space_between = $this->props['list_space_between'];
362
  $list_space_between_tablet = $this->props['list_space_between_tablet'];
363
  $list_space_between_phone = $this->props['list_space_between_phone'];
364
  $list_space_between_last_edited = $this->props['list_space_between_last_edited'];
365
 
366
+ $list_background_hover = $this->get_hover_value( 'list_background' );
367
+ $list_background = $this->props['list_background'];
368
  $list_background_tablet = $this->props['list_background_tablet'];
369
  $list_background_phone = $this->props['list_background_phone'];
370
  $list_background_last_edited = $this->props['list_background_last_edited'];
371
 
372
+ $list_padding_hover = $this->get_hover_value( 'list_padding' );
373
+ $list_padding = $this->props['list_padding'];
374
  $list_padding_values = et_pb_responsive_options()->get_property_values( $this->props, 'list_padding' );
375
+ $list_padding_size_tablet = isset( $list_padding_values['tablet'] ) ? $list_padding_values['tablet'] : '';
376
+ $list_padding_size_phone = isset( $list_padding_values['phone'] ) ? $list_padding_values['phone'] : '';
377
 
378
+ $text_indent = $this->props['text_indent'];
379
+ $text_indent_hover = $this->get_hover_value( 'text_indent' );
380
  $text_indent_tablet = $this->props['text_indent_tablet'];
381
  $text_indent_phone = $this->props['text_indent_phone'];
382
  $text_indent_last_edited = $this->props['text_indent_last_edited'];
383
 
384
+ $list_alignment = $this->props['list_alignment'];
385
  $list_alignment_tablet = $this->props['list_alignment_tablet'];
386
  $list_alignment_phone = $this->props['list_alignment_phone'];
387
  $list_alignment_last_edited = $this->props['list_alignment_last_edited'];
388
 
389
+ $list_vertical_alignment = $this->props['list_vertical_alignment'];
390
  $list_vertical_alignment_tablet = $this->props['list_vertical_alignment_tablet'];
391
  $list_vertical_alignment_phone = $this->props['list_vertical_alignment_phone'];
392
  $list_vertical_alignment_last_edited = $this->props['list_vertical_alignment_last_edited'];
406
 
407
  if ( '' !== $icon_padding ) {
408
  $icon_padding_responsive_active = et_pb_get_responsive_status( $icon_padding_last_edited );
409
+
410
  $icon_padding_values = array(
411
+ 'desktop' => $icon_padding,
412
+ 'tablet' => $icon_padding_responsive_active ? $icon_padding_tablet : '',
413
+ 'phone' => $icon_padding_responsive_active ? $icon_padding_phone : '',
414
  );
415
+
416
  et_pb_generate_responsive_css( $icon_padding_values, $icon_selector, 'padding', $render_slug );
417
+
418
  if ( et_builder_is_hover_enabled( 'icon_padding', $this->props ) ) {
419
+ ET_Builder_Element::set_style(
420
+ $render_slug,
421
+ array(
422
+ 'selector' => $this->add_hover_to_order_class( $icon_selector ),
423
+ 'declaration' => sprintf(
424
+ 'padding: %1$s;',
425
+ esc_html( $icon_padding_hover )
426
+ ),
427
+ )
428
+ );
429
  }
430
  }
431
 
438
  $icon_style_hover = sprintf( 'color: %1$s;', esc_attr( $icon_color_hover ) );
439
  }
440
 
441
+ ET_Builder_Element::set_style(
442
+ $render_slug,
443
+ array(
444
+ 'selector' => $icon_selector,
445
+ 'declaration' => $icon_style,
446
+ )
447
+ );
448
 
449
+ ET_Builder_Element::set_style(
450
+ $render_slug,
451
+ array(
452
+ 'selector' => $icon_selector,
453
+ 'declaration' => $icon_tablet_style,
454
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
455
+ )
456
+ );
457
 
458
+ ET_Builder_Element::set_style(
459
+ $render_slug,
460
+ array(
461
+ 'selector' => $icon_selector,
462
+ 'declaration' => $icon_phone_style,
463
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
464
+ )
465
+ );
466
 
467
  if ( '' !== $icon_style_hover ) {
468
+ ET_Builder_Element::set_style(
469
+ $render_slug,
470
+ array(
471
+ 'selector' => $this->add_hover_to_order_class( $icon_selector ),
472
+ 'declaration' => $icon_style_hover,
473
+ )
474
+ );
475
  }
476
 
477
  $icon_background_style = sprintf( 'background-color: %1$s;', esc_attr( $icon_background_color ) );
484
  }
485
 
486
  if ( '' !== $icon_background_color ) {
487
+ ET_Builder_Element::set_style(
488
+ $render_slug,
489
+ array(
490
+ 'selector' => $icon_selector,
491
+ 'declaration' => $icon_background_style,
492
+ )
493
+ );
494
  }
495
 
496
+ ET_Builder_Element::set_style(
497
+ $render_slug,
498
+ array(
499
+ 'selector' => $icon_selector,
500
+ 'declaration' => $icon_background_tablet_style,
501
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
502
+ )
503
+ );
504
 
505
+ ET_Builder_Element::set_style(
506
+ $render_slug,
507
+ array(
508
+ 'selector' => $icon_selector,
509
+ 'declaration' => $icon_background_phone_style,
510
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
511
+ )
512
+ );
513
 
514
  if ( '' !== $icon_background_style_hover ) {
515
+ ET_Builder_Element::set_style(
516
+ $render_slug,
517
+ array(
518
+ 'selector' => $this->add_hover_to_order_class( $icon_selector ),
519
+ 'declaration' => $icon_background_style_hover,
520
+ )
521
+ );
522
  }
523
 
524
  if ( '5px' !== $text_indent ) {
525
  $text_indent_responsive_active = et_pb_get_responsive_status( $text_indent_last_edited );
526
+
527
  $text_indent_values = array(
528
+ 'desktop' => $text_indent,
529
+ 'tablet' => $text_indent_responsive_active ? $text_indent_tablet : '',
530
+ 'phone' => $text_indent_responsive_active ? $text_indent_phone : '',
531
  );
532
+
533
  et_pb_generate_responsive_css( $text_indent_values, $text_selector, 'padding-left', $render_slug );
534
+
535
  if ( et_builder_is_hover_enabled( 'text_indent', $this->props ) ) {
536
+ ET_Builder_Element::set_style(
537
+ $render_slug,
538
+ array(
539
  'selector' => $this->add_hover_to_order_class( $text_selector ),
540
  'declaration' => sprintf(
541
+ 'padding-left: %1$s;',
542
+ esc_html( $text_indent_hover )
543
  ),
544
+ )
545
+ );
546
  }
547
  }
548
 
549
  $list_alignment_style = sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment ) );
550
  $list_alignment_tablet_style = '' !== $list_alignment_tablet ? sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment_tablet ) ) : '';
551
+ $list_alignment_tablet_style = '' !== $list_alignment_phone ? sprintf( 'justify-content: %1$s;', esc_attr( $list_alignment_phone ) ) : '';
552
 
553
  if ( 'flex-start' !== $list_alignment ) {
554
+ ET_Builder_Element::set_style(
555
+ $render_slug,
556
+ array(
557
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
558
+ 'declaration' => $list_alignment_style,
559
+ )
560
+ );
561
  }
562
 
563
+ ET_Builder_Element::set_style(
564
+ $render_slug,
565
+ array(
566
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
567
+ 'declaration' => $list_alignment_tablet_style,
568
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
569
+ )
570
+ );
571
 
572
+ ET_Builder_Element::set_style(
573
+ $render_slug,
574
+ array(
575
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
576
+ 'declaration' => $list_alignment_tablet_style,
577
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
578
+ )
579
+ );
580
 
581
  $list_vertical_alignment_style = sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment ) );
582
  $list_vertical_alignment_tablet_style = '' !== $list_vertical_alignment_tablet ? sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment_tablet ) ) : '';
583
+ $list_vertical_alignment_tablet_style = '' !== $list_vertical_alignment_phone ? sprintf( 'align-items: %1$s;', esc_attr( $list_vertical_alignment_phone ) ) : '';
584
 
585
  if ( 'center' !== $list_vertical_alignment ) {
586
+ ET_Builder_Element::set_style(
587
+ $render_slug,
588
+ array(
589
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
590
+ 'declaration' => $list_vertical_alignment_style,
591
+ )
592
+ );
593
  }
594
 
595
+ ET_Builder_Element::set_style(
596
+ $render_slug,
597
+ array(
598
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
599
+ 'declaration' => $list_vertical_alignment_tablet_style,
600
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
601
+ )
602
+ );
603
+
604
+ ET_Builder_Element::set_style(
605
+ $render_slug,
606
+ array(
607
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child, %%order_class%% .dsm_icon_list_items .dsm_icon_list_child a',
608
+ 'declaration' => $list_vertical_alignment_tablet_style,
609
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
610
+ )
611
+ );
612
+
613
  if ( '' !== $list_space_between ) {
614
  $list_space_between_responsive_active = et_pb_get_responsive_status( $list_space_between_last_edited );
615
+
616
  $list_space_between_values = array(
617
+ 'desktop' => $list_space_between,
618
+ 'tablet' => $list_space_between_responsive_active ? $list_space_between_tablet : '',
619
+ 'phone' => $list_space_between_responsive_active ? $list_space_between_phone : '',
620
  );
621
+
622
  et_pb_generate_responsive_css( $list_space_between_values, '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)', 'margin-bottom', $render_slug );
623
+
624
  if ( et_builder_is_hover_enabled( 'list_space_between', $this->props ) ) {
625
+ ET_Builder_Element::set_style(
626
+ $render_slug,
627
+ array(
628
+ 'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child:not(:last-child)' ),
629
+ 'declaration' => sprintf(
630
+ 'margin-bottom: %1$s;',
631
+ esc_html( $list_space_between_hover )
632
+ ),
633
+ )
634
+ );
635
  }
636
  }
637
 
638
  if ( '' !== $list_background ) {
639
+ ET_Builder_Element::set_style(
640
+ $render_slug,
641
+ array(
642
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
643
+ 'declaration' => sprintf(
644
+ 'background-color: %1$s;',
645
+ esc_html( $list_background )
646
+ ),
647
+ )
648
+ );
649
  }
650
 
651
  if ( '' !== $list_background_tablet ) {
652
+ ET_Builder_Element::set_style(
653
+ $render_slug,
654
+ array(
655
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
656
+ 'declaration' => sprintf(
657
+ 'background-color: %1$s;',
658
+ esc_html( $list_background_tablet )
659
+ ),
660
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
661
+ )
662
+ );
663
  }
664
 
665
  if ( '' !== $list_background_phone ) {
666
+ ET_Builder_Element::set_style(
667
+ $render_slug,
668
+ array(
669
+ 'selector' => '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child',
670
+ 'declaration' => sprintf(
671
+ 'background-color: %1$s;',
672
+ esc_html( $list_background_phone )
673
+ ),
674
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
675
+ )
676
+ );
677
  }
678
 
679
  if ( et_builder_is_hover_enabled( 'list_background', $this->props ) ) {
680
+ ET_Builder_Element::set_style(
681
+ $render_slug,
682
+ array(
683
+ 'selector' => $this->add_hover_to_order_class( '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child' ),
684
+ 'declaration' => sprintf(
685
+ 'background-color: %1$s;',
686
+ esc_html( $list_background_hover )
687
+ ),
688
+ )
689
+ );
690
  }
691
 
692
  $this->apply_custom_margin_padding(
693
+ $render_slug,
694
+ 'list_padding',
695
+ 'padding',
696
+ '%%order_class%% .dsm_icon_list_items .dsm_icon_list_child'
697
  );
698
 
699
  // Render module content
705
  return $output;
706
  }
707
  /*credits https://github.com/elegantthemes/create-divi-extension/issues/125#issuecomment-445442095*/
708
+ public function apply_custom_margin_padding( $function_name, $slug, $type, $class, $important = false ) {
709
+ $slug_value = $this->props[ $slug ];
710
+ $slug_value_tablet = $this->props[ $slug . '_tablet' ];
711
+ $slug_value_phone = $this->props[ $slug . '_phone' ];
712
+ $slug_value_last_edited = $this->props[ $slug . '_last_edited' ];
713
+ $slug_value_responsive_active = et_pb_get_responsive_status( $slug_value_last_edited );
714
+
715
+ if ( isset( $slug_value ) && ! empty( $slug_value ) ) {
716
+ ET_Builder_Element::set_style(
717
+ $function_name,
718
+ array(
719
+ 'selector' => $class,
720
+ 'declaration' => et_builder_get_element_style_css( $slug_value, $type, $important ),
721
+ )
722
+ );
723
+ }
724
+
725
+ if ( isset( $slug_value_tablet ) && ! empty( $slug_value_tablet ) && $slug_value_responsive_active ) {
726
+ ET_Builder_Element::set_style(
727
+ $function_name,
728
+ array(
729
+ 'selector' => $class,
730
+ 'declaration' => et_builder_get_element_style_css( $slug_value_tablet, $type, $important ),
731
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_980' ),
732
+ )
733
+ );
734
+ }
735
+
736
+ if ( isset( $slug_value_phone ) && ! empty( $slug_value_phone ) && $slug_value_responsive_active ) {
737
+ ET_Builder_Element::set_style(
738
+ $function_name,
739
+ array(
740
+ 'selector' => $class,
741
+ 'declaration' => et_builder_get_element_style_css( $slug_value_phone, $type, $important ),
742
+ 'media_query' => ET_Builder_Element::get_media_query( 'max_width_767' ),
743
+ )
744
+ );
745
  }
746
 
747
  if ( et_builder_is_hover_enabled( $slug, $this->props ) ) {
748
+ if ( isset( $this->props[ $slug . '__hover' ] ) ) {
749
+ $hover = $this->props[ $slug . '__hover' ];
750
+ ET_Builder_Element::set_style(
751
+ $function_name,
752
+ array(
753
+ 'selector' => $this->add_hover_to_order_class( $class ),
754
+ 'declaration' => et_builder_get_element_style_css( $hover, $type, $important ),
755
+ )
756
+ );
757
  }
758
  }
759
 
760
+ }
761
  }
762
 
763
  new DSM_Icon_List;
includes/modules/Menu/Menu.php CHANGED
@@ -47,7 +47,7 @@ class DSM_NavMenu extends ET_Builder_Module {
47
  public function get_advanced_fields_config() {
48
  return array(
49
  'fonts' => array(
50
- 'header' => array(
51
  'label' => esc_html__( 'Title', 'dsm-supreme-modules-for-divi' ),
52
  'css' => array(
53
  'main' => '%%order_class%% h1.dsm-menu-title, %%order_class%% h2.dsm-menu-title, %%order_class%% h3.dsm-menu-title, %%order_class%% h4.dsm-menu-title, %%order_class%% h5.dsm-menu-title, %%order_class%% h6.dsm-menu-title',
@@ -65,7 +65,7 @@ class DSM_NavMenu extends ET_Builder_Module {
65
  'default' => 'h4',
66
  ),
67
  ),
68
- 'menu' => array(
69
  'label' => esc_html__( 'Menu', 'dsm-supreme-modules-for-divi' ),
70
  'css' => array(
71
  'main' => '%%order_class%% ul.dsm-menu li a',
@@ -438,11 +438,11 @@ class DSM_NavMenu extends ET_Builder_Module {
438
  $menu_space_between_tablet = $this->props['menu_space_between_tablet'];
439
  $menu_space_between_phone = $this->props['menu_space_between_phone'];
440
  $menu_space_between_last_edited = $this->props['menu_space_between_last_edited'];
441
- $menu_left_space_hover = $this->get_hover_value( 'menu_left_space' );
442
- $menu_left_space = $this->props['menu_left_space'];
443
- $menu_left_space_tablet = $this->props['menu_left_space_tablet'];
444
- $menu_left_space_phone = $this->props['menu_left_space_phone'];
445
- $menu_left_space_last_edited = $this->props['menu_left_space_last_edited'];
446
  $submenu_left_space_hover = $this->get_hover_value( 'submenu_left_space' );
447
  $submenu_left_space = $this->props['submenu_left_space'];
448
  $submenu_left_space_tablet = $this->props['submenu_left_space_tablet'];
47
  public function get_advanced_fields_config() {
48
  return array(
49
  'fonts' => array(
50
+ 'header' => array(
51
  'label' => esc_html__( 'Title', 'dsm-supreme-modules-for-divi' ),
52
  'css' => array(
53
  'main' => '%%order_class%% h1.dsm-menu-title, %%order_class%% h2.dsm-menu-title, %%order_class%% h3.dsm-menu-title, %%order_class%% h4.dsm-menu-title, %%order_class%% h5.dsm-menu-title, %%order_class%% h6.dsm-menu-title',
65
  'default' => 'h4',
66
  ),
67
  ),
68
+ 'menu' => array(
69
  'label' => esc_html__( 'Menu', 'dsm-supreme-modules-for-divi' ),
70
  'css' => array(
71
  'main' => '%%order_class%% ul.dsm-menu li a',
438
  $menu_space_between_tablet = $this->props['menu_space_between_tablet'];
439
  $menu_space_between_phone = $this->props['menu_space_between_phone'];
440
  $menu_space_between_last_edited = $this->props['menu_space_between_last_edited'];
441
+ $menu_left_space_hover = $this->get_hover_value( 'menu_left_space' );
442
+ $menu_left_space = $this->props['menu_left_space'];
443
+ $menu_left_space_tablet = $this->props['menu_left_space_tablet'];
444
+ $menu_left_space_phone = $this->props['menu_left_space_phone'];
445
+ $menu_left_space_last_edited = $this->props['menu_left_space_last_edited'];
446
  $submenu_left_space_hover = $this->get_hover_value( 'submenu_left_space' );
447
  $submenu_left_space = $this->props['submenu_left_space'];
448
  $submenu_left_space_tablet = $this->props['submenu_left_space_tablet'];
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://suprememodules.com/
5
  Requires at least: 4.5
6
  Tested up to: 5.4.1
7
  Requires PHP: 5.6
8
- Stable tag: 2.2.2
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -111,6 +111,10 @@ This is a common question that we get asked here every now and then which is why
111
 
112
 
113
  == Changelog ==
 
 
 
 
114
  = 2.2.2 – 18.05.2020 =
115
  * Enhanced: Divi Easy Theme Builder Header CSS when user "Show Toolbar when viewing site" and "Push Body Down".
116
 
5
  Requires at least: 4.5
6
  Tested up to: 5.4.1
7
  Requires PHP: 5.6
8
+ Stable tag: 2.2.3
9
  License: GPLv2
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
111
 
112
 
113
  == Changelog ==
114
+ = 2.2.3 – 22.05.2020 =
115
+ * Enhanced: Format and follow WordPress Coding Standards for all PHP files in /modules/.
116
+ * Enhanced: isset() check for uninstall php.
117
+
118
  = 2.2.2 – 18.05.2020 =
119
  * Enhanced: Divi Easy Theme Builder Header CSS when user "Show Toolbar when viewing site" and "Push Body Down".
120
 
supreme-modules-for-divi.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Supreme Modules Lite - Divi Theme, Extra Theme and Divi Builder
4
  * Plugin URI: https://suprememodules.com
5
  * Description: Divi Supreme enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
- * Version: 2.2.2
7
  * Author: Supreme Modules
8
  * Author URI: https://suprememodules.com/about-us/
9
  * License: GPL2
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  }
35
 
36
  if ( ! defined( 'DSM_VERSION' ) ) {
37
- define( 'DSM_VERSION', '2.2.2' );
38
  }
39
  if ( ! defined( 'DSM_SHORTCODE' ) ) {
40
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
3
  * Plugin Name: Supreme Modules Lite - Divi Theme, Extra Theme and Divi Builder
4
  * Plugin URI: https://suprememodules.com
5
  * Description: Divi Supreme enhances the experience and features found on Divi and extend with custom creative modules to help you build amazing websites.
6
+ * Version: 2.2.3
7
  * Author: Supreme Modules
8
  * Author URI: https://suprememodules.com/about-us/
9
  * License: GPL2
34
  }
35
 
36
  if ( ! defined( 'DSM_VERSION' ) ) {
37
+ define( 'DSM_VERSION', '2.2.3' );
38
  }
39
  if ( ! defined( 'DSM_SHORTCODE' ) ) {
40
  define( 'DSM_SHORTCODE', 'divi_shortcode' );
uninstall.php CHANGED
@@ -29,7 +29,7 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
29
  exit;
30
  }
31
 
32
- if ( get_option( 'dsm_settings_misc' )['dsm_uninstall_on_delete'] === 'on' ) {
33
  delete_option( 'dsm_general' );
34
  delete_option( 'dsm_settings_social_media' );
35
  delete_option( 'dsm_settings_misc' );
29
  exit;
30
  }
31
 
32
+ if ( isset( get_option( 'dsm_settings_misc' )['dsm_uninstall_on_delete'] ) && get_option( 'dsm_settings_misc' )['dsm_uninstall_on_delete'] === 'on' ) {
33
  delete_option( 'dsm_general' );
34
  delete_option( 'dsm_settings_social_media' );
35
  delete_option( 'dsm_settings_misc' );