PluginProbe ʕ •ᴥ•ʔ
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 4.0.0
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v4.0.0
4.0.2 4.0.1 4.0.0 3.10.02 3.10.01 3.9.10 3.9.9 3.9.8 3.9.7 3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.1 2.3.1.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.4.0 2.5.0 2.5.1 2.5.10 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.2 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.6.0 3.6.1 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.8.1 3.8.2 3.9.0 3.9.1 3.9.2 trunk 1.2.6 1.2.7 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.9.1 2.0.9.2 2.0.9.3
elementskit-lite / libs / framework / views / settings-sections / widgets.php
elementskit-lite / libs / framework / views / settings-sections Last commit date
dashboard.php 3 weeks ago modules.php 4 months ago usersettings.php 3 weeks ago widgets.php 4 months ago
widgets.php
87 lines
1 <?php
2 $widgets_all = \ElementsKit_Lite\Config\Widget_List::instance()->get_list();
3 $widgets_active = \ElementsKit_Lite\Config\Widget_List::instance()->get_list( 'active' );
4 $widgets_categorized = array();
5 foreach ( $widgets_all as $key => $row ) {
6 $widgets_categorized[ ( $row['widget-category'] ?? 'general' ) ][ $key ] = $row;
7 }
8
9 // Reorder categories start
10 $widget_order = [
11 'general',
12 'advanced',
13 'creative',
14 'special-features',
15 'woocommerce',
16 'header-footer',
17 'marketing',
18 'post',
19 'form',
20 'social-media-feeds',
21 'review-testimonials',
22 'meeting',
23 ];
24
25 $reordered_widgets = [];
26
27 // Step 1: Reorder according to $widget_order
28 foreach ($widget_order as $category_key) {
29 if (isset($widgets_categorized[$category_key])) {
30 $reordered_widgets[$category_key] = $widgets_categorized[$category_key];
31 }
32 }
33
34 $remaining = array_diff_key($widgets_categorized, $reordered_widgets);
35 $widgets_categorized = $reordered_widgets + $remaining;
36 // Reorder categories end
37
38 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Checking current page type. The page only can access admin. So nonce verification is not required.
39 $widget_css_class = isset( $_GET['ekit-onboard-steps'] ) && $_GET['ekit-onboard-steps'] == 'loaded' ? 'ekit-admin-widgets-container' : 'ekit-admin-widget-list';
40 ?>
41 <!-- this blank input is for empty form submission -->
42 <input checked="checked" type="checkbox" value="_null" style="display:none" name="widget_list[]" >
43
44 <div class="ekit-admin-fields-container <?php echo esc_attr( $widget_css_class ) ?>">
45 <span class="ekit-admin-fields-container-description"><?php esc_html_e( 'You can disable the elements you are not using on your site. That will disable all associated assets of those widgets to improve your site loading speed.', 'elementskit-lite' ); ?></span>
46
47 <div class="ekit-admin-fields-container-fieldset">
48 <?php foreach ( $widgets_categorized as $widget_category => $widgets ) : ?>
49 <h2 class="ekit-widget-group-title">
50 <?php
51 if($widget_category === 'social-media-feeds') {
52 echo esc_html__('Social Media Feeds', 'elementskit-lite');
53 } else {
54 $widgets_category= str_replace( '-', ' & ', $widget_category );
55 echo sprintf(
56 esc_html__('%1$s', 'elementskit-lite'),
57 ucwords($widgets_category)
58 );
59 }
60 ?>
61 </h2>
62 <div class="attr-row">
63 <?php foreach ( $widgets as $widget => $widget_config ) : ?>
64 <div class="attr-col-md-6 attr-col-lg-3" <?php echo ( $widget_config['package'] != 'pro-disabled' ? '' : 'data-attr-toggle="modal" data-target="#elementskit_go_pro_modal"' ); ?>>
65 <?php
66 $this->utils->input(
67 array(
68 'type' => 'switch',
69 'name' => 'widget_list[]',
70 'label' => esc_html( $widget_config['title'] ),
71 'value' => $widget,
72 'attr' => ( $widget_config['package'] != 'pro-disabled' ? array() : array( 'disabled' => 'disabled' ) ),
73 'class' => 'ekit-content-type-' . esc_attr( $widget_config['package'] ),
74 'options' => array(
75 'checked' => ( isset( $widgets_active[ $widget ] ) ? true : false ),
76 ),
77 )
78 );
79 ?>
80 </div>
81 <?php endforeach; ?>
82 </div>
83 <?php endforeach; ?>
84 </div>
85 </div>
86
87