PluginProbe ʕ •ᴥ•ʔ
Happy Addons for Elementor / 3.21.4
Happy Addons for Elementor v3.21.4
3.22.0 3.21.4 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.18.0 2.19.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.21.0 2.21.1 2.22.0 2.22.1 2.23.0 2.24.0 2.24.1 2.25.0 2.26.0 2.27.0 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 2.6.0 2.6.1 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0 2.8.1 2.9.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.10.2 3.10.3 3.10.4 3.10.5 3.10.6 3.10.7 3.10.8 3.10.9 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 3.12.1 3.12.2 3.12.3 3.12.4 3.12.5 3.12.6 3.13.0 3.14.0 3.14.1 3.15.0 3.15.1 3.15.2 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.18.0 3.18.1 3.19.0 3.2.1 3.2.2 3.20.0 3.20.1 3.20.2 3.20.3 3.20.4 3.20.6 3.20.7 3.20.8 3.21.0 3.21.1 3.21.2 3.21.3 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.6.3 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.0 3.9.1 3.9.1.1 0.0.1 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.1 1.2.0 1.2.1 1.3.0 1.3.1 1.4.0 1.4.1 1.5.0 2.0.0 2.1.0 2.10.0 2.11.0 2.11.1 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 trunk
happy-elementor-addons / templates / admin / dashboard-analytics.php
happy-elementor-addons / templates / admin Last commit date
dashboard-analytics.php 1 year ago dashboard-credentials.php 4 years ago dashboard-features.php 8 months ago dashboard-home.php 2 years ago dashboard-main.php 1 year ago dashboard-pro.php 1 year ago dashboard-widgets.php 8 months ago edit-template-condition.php 1 year ago edit-template.php 1 year ago new-template.php 1 year ago
dashboard-analytics.php
150 lines
1 <?php
2
3 /**
4 * Dashboard analytics tab template
5 */
6
7 defined('ABSPATH') || die();
8
9 $widgets = ha_has_pro() ? self::get_widgets() : \Happy_Addons\Elementor\Classes\Widgets_Manager::get_local_widgets_map();
10 $inactive_widgets = \Happy_Addons\Elementor\Classes\Widgets_Manager::get_inactive_widgets();
11 $used_widget = self::get_raw_usage();
12 $unuse_widget = self::get_un_usage();
13
14 $total_widgets_count = count( $widgets );
15 $total_used_widget_count = count( $used_widget );
16 $total_unuse_widget_count = count( $unuse_widget );
17
18 $disable_btn = count( $unuse_widget ) == count( array_intersect( $unuse_widget, $inactive_widgets ) );
19 ?>
20 <div class="ha-dashboard-panel ha-dashboard-panel-analytics">
21
22 <?php if ( ! \Elementor\Tracker::is_allow_track() ) : ?>
23 <div class="ha-dashboard-analytics-notice">
24 <div class="ha-dashboard-panel__header flex-content used-widgets">
25 <div class="ha-dashboard-panel__header-content">
26 <h2><?php esc_html_e( "Analytics Data Not Available", "happy-elementor-addons" ); ?></h2>
27 <p class="f16" style="margin: 0 0;"><?php printf( esc_html__( 'To see Analytics you need to follow these 2 steps:', 'happy-elementor-addons' ) ); ?></p>
28 </div>
29 </div>
30 <p class="f16 step">
31 <?php
32 printf( '<strong>%s</strong> %s <a href="%s" target="_blank">%s</a> %s',
33 __( 'Step - 1:', 'happy-elementor-addons' ),
34 __( 'Go to dashboard>Elementor>Settings>Experiment tab and tick "Usage Data Sharing" (last option) then save the change.', 'happy-elementor-addons' ),
35 admin_url( 'admin.php?page=elementor-settings#tab-experiments' ),
36 __( 'Click here', 'happy-elementor-addons' ),
37 __( 'to go to the page.', 'happy-elementor-addons' )
38 );
39 ?>
40 </p>
41 <p class="f16 step" style="margin: 0 0;">
42 <?php
43 printf( '<strong>%s</strong> %s <a href="%s" target="_blank">%s</a> %s',
44 __( 'Step - 2:', 'happy-elementor-addons' ),
45 __( 'Go to dashboard>Elementor>System Info>Elements Usage and press the "Recalculate" button.', 'happy-elementor-addons' ),
46 admin_url( 'admin.php?page=elementor-system-info' ),
47 __( 'Click here', 'happy-elementor-addons' ),
48 __( 'to go to the page.', 'happy-elementor-addons' )
49 );
50 ?>
51 </p>
52 </div>
53 <?php else: ?>
54 <!-- Used Widget Analytics -->
55 <div class="ha-dashboard-panel__header flex-content used-widgets">
56 <div class="ha-dashboard-panel__header-content">
57 <h2><?php esc_html_e( 'Used Widgets', 'happy-elementor-addons' ); ?></h2>
58 <?php if( $total_used_widget_count ): ?>
59 <p class="f16" style="margin: 0 0;"><?php printf( esc_html__( 'You are using only %s %s widgets. %s', 'happy-elementor-addons' ), '<strong>', $total_used_widget_count, '</strong>' ); ?></p>
60 <?php else: ?>
61 <p class="f16"><?php printf( esc_html__( 'No used widget found!', 'happy-elementor-addons' ) ); ?></p>
62 <?php endif; ?>
63 </div>
64
65 <div class="ha-dashboard-panel__header-summary">
66 <div class="data"><?php printf( esc_html__('Total Widget: %s', 'happy-elementor-addons' ), $total_widgets_count);?></div>
67 <div class="data"><?php printf( esc_html__('Used: %s', 'happy-elementor-addons' ), $total_used_widget_count);?></div>
68 <div class="data"><?php printf( esc_html__('Unused: %s', 'happy-elementor-addons' ), $total_unuse_widget_count);?></div>
69 </div>
70 </div>
71
72 <div class="ha-dashboard-analytics" style="margin-bottom: 80px;">
73 <?php
74 foreach ($used_widget as $key => $data) :
75 ?>
76 <div class="ha-dashboard-analytics__item">
77 <fieldset>
78 <?php
79 if( isset( $widgets[$key]['is_pro'] ) && $widgets[$key]['is_pro'] ){
80 printf( esc_html__('%sPRO%s', 'happy-elementor-addons' ), '<legend class="pro">', '</legend>');
81 }else{
82 printf( esc_html__('%sFREE%s', 'happy-elementor-addons' ), '<legend class="free">', '</legend>');
83 }
84 ?>
85 <div class="widget_inner">
86 <div class="widget-title"><?php echo $widgets[$key]['title'];?></div>
87 <span class="ha-dashboard-analytics__item-total-count"><?php esc_html_e('total use: ', 'happy-elementor-addons'); ?><?php echo $data;?></span>
88 </div>
89 </fieldset>
90 </div>
91 <?php
92 endforeach;
93 ?>
94 </div>
95
96
97
98 <!-- Unused Widget Analytics -->
99 <div class="ha-dashboard-panel__header flex-content unused-widgets">
100 <div class="ha-dashboard-panel__header-content">
101 <h2><?php esc_html_e( 'Unused Widgets', 'happy-elementor-addons' ); ?></h2>
102 <?php if( $total_unuse_widget_count ): ?>
103 <p class="f16"><?php printf( esc_html__( '%s %s widgets %s are unused right now. You can disable this to make the site faster.', 'happy-elementor-addons' ), '<strong>', $total_unuse_widget_count, '</strong>' ); ?></p>
104 <?php else: ?>
105 <p class="f16"><?php printf( esc_html__( 'No unused widget found!', 'happy-elementor-addons' ) ); ?></p>
106 <?php endif; ?>
107 </div>
108 <?php if( !empty($unuse_widget) ) :?>
109 <button id="ha-dashboard-analytics-disable" class="ha-dashboard-btn ha-dashboard-analytics__unused_disable" type="submit" <?php echo $disable_btn ? 'disabled' : ''; ?>>
110 <?php echo esc_html__( 'Disable all unused widget', 'happy-elementor-addons' ); ?>
111 </button>
112 <input type="hidden" name="disable-unused-widgets" value="false">
113 <?php endif;?>
114 </div>
115
116 <?php if( !empty($unuse_widget) ) :?>
117 <div class="ha-dashboard-analytics">
118 <?php
119 foreach ($unuse_widget as $key => $data) :
120 ?>
121 <div class="ha-dashboard-analytics__item">
122 <fieldset>
123 <?php
124 if( isset( $widgets[$data]['is_pro'] ) && $widgets[$data]['is_pro'] ){
125 printf( esc_html__('%sPRO%s', 'happy-elementor-addons' ), '<legend class="pro">', '</legend>');
126 }else{
127 printf( esc_html__('%sFREE%s', 'happy-elementor-addons' ), '<legend class="free">', '</legend>');
128 }
129 ?>
130 <div class="widget_inner">
131 <div class="widget-title">
132 <?php echo $widgets[$data]['title'];?>
133 <?php if( in_array( $data, $inactive_widgets ) ) : ?>
134 <span class="disable" title="Disable"></span>
135 <?php else:?>
136 <span class="enabled" title="Enabled"></span>
137 <?php endif;?>
138 </div>
139 <span class="ha-dashboard-analytics__item-total-count"><?php echo esc_html('total use: 0');?></span>
140 </div>
141 </fieldset>
142 </div>
143 <?php
144 endforeach;
145 ?>
146 </div>
147 <?php endif;?>
148 <?php endif;?>
149 </div>
150