PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
6.2.3 6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 All 156 releases
← All changes | modules/logs/widgets/widget-log-clients-widget.php +41 -31 5.1 → 6.2.1 View file →
@@ -10,9 +10,15 @@
10 10
11 11 namespace MainWP\Dashboard\Module\Log;
12 12
13 13 use MainWP\Dashboard\MainWP_Utility;
14 +use MainWP\Dashboard\MainWP_UI;
14 15
16 +// Exit if accessed directly.
17 +if ( ! defined( 'ABSPATH' ) ) {
18 + exit;
19 +}
20 +
15 21 /**
16 22 * Class Log_Clients_Widget
17 23 *
18 24 * Displays the Logs info.
@@ -77,43 +83,47 @@
77 83 }
78 84
79 85 ?>
80 86 <div class="mainwp-widget-header">
81 - <h3 class="ui header handle-drag">
87 + <h2 class="ui header handle-drag">
82 88 <?php esc_html_e( 'Client Management Activity Summary', 'mainwp' ); ?>
83 89 <div class="sub header">
84 90 <?php esc_html_e( 'Quantitative snapshot of client management actions and the total count of all events.', 'mainwp' ); ?>
85 91 </div>
86 - </h3>
92 + </h2>
87 93 </div>
88 94
89 - <div class="mainwp-widget-insights-card">
90 - <?php
91 - /**
92 - * Action: mainwp_logs_widget_top
93 - *
94 - * Fires at the top of the widget.
95 - *
96 - * @since 4.6
97 - */
98 - do_action( 'mainwp_logs_widget_top', 'clients' );
99 - ?>
100 - <div id="mainwp-message-zone" style="display:none;" class="ui message"></div>
101 - <?php
102 - wp_nonce_field( 'mainwp-admin-nonce' );
95 + <div class="mainwp-widget-insights-card mainwp-scrolly-overflow">
96 + <?php
97 + /**
98 + * Action: mainwp_logs_widget_top
99 + *
100 + * Fires at the top of the widget.
101 + *
102 + * @since 4.6
103 + */
104 + do_action( 'mainwp_logs_widget_top', 'clients' );
105 + ?>
106 + <div id="mainwp-message-zone" style="display:none;" class="ui message"></div>
107 + <?php
108 + MainWP_UI::generate_wp_nonce( 'mainwp-admin-nonce' );
109 + if ( ! empty( $data ) ) {
103 110 $this->render_widget_content( $stats_data, $stats_prev_data );
104 - ?>
105 - <?php
106 - /**
107 - * Action: mainwp_logs_widget_bottom
108 - *
109 - * Fires at the bottom of the widget.
110 - *
111 - * @since 4.6
112 - */
113 - do_action( 'mainwp_logs_widget_bottom', 'clients' );
114 - ?>
115 - </div>
111 + } else {
112 + MainWP_UI::render_empty_element_placeholder( __( 'No activity recorded', 'mainwp' ), __( 'Data will appear here once actions are tracked.', 'mainwp' ), '<em data-emoji=":bar_chart:" class="medium"></em>' );
113 + }
114 + ?>
115 + <?php
116 + /**
117 + * Action: mainwp_logs_widget_bottom
118 + *
119 + * Fires at the bottom of the widget.
120 + *
121 + * @since 4.6
122 + */
123 + do_action( 'mainwp_logs_widget_bottom', 'clients' );
124 + ?>
125 + </div>
116 126 <div class="mainwp-widget-footer ui four columns stackable grid">
117 127 <div class="column">
118 128 </div>
119 129 <div class="column">
@@ -138,10 +148,10 @@
138 148 'lost' => esc_html__( 'Lost', 'mainwp' ),
139 149 'total_events' => esc_html__( 'Total', 'mainwp' ),
140 150 );
141 151 ?>
142 - <div class="ui one column grid">
143 - <div class="left aligned middle aligned column">
152 + <div class="ui grid">
153 + <div class="sixteen wide column">
144 154 <div class="ui equal width grid">
145 155 <?php
146 156 foreach ( $columns as $act => $title ) {
147 157 Log_Stats::render_stats_info( $data, $act, $title, $prev_data );
@@ -148,9 +158,9 @@
148 158 }
149 159 ?>
150 160 </div>
151 161 </div>
152 - <div class="left aligned middle aligned column">
162 + <div class="sixteen wide column">
153 163 <div id="mainwp-module-log-chart-clients-management-wrapper" ></div>
154 164 <script type="text/javascript">
155 165 jQuery( document ).ready( function() {
156 166 let options = {