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.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 5.2.1 All 155 releases
← All changes | modules/logs/widgets/widget-log-plugins-widget.php +15 -5 5.2 → 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_Plugins_Widget
17 23 *
18 24 * Displays the Logs info.
@@ -77,17 +83,17 @@
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( 'Plugin Management Activity Overview', 'mainwp' ); ?>
83 89 <div class="sub header">
84 90 <?php esc_html_e( 'Comprehensive bar chart reflecting plugin actions culminating in a total activity count.', 'mainwp' ); ?>
85 91 </div>
86 - </h3>
92 + </h2>
87 93 </div>
88 94
89 - <div class="mainwp-widget-insights-card">
95 + <div class="mainwp-widget-insights-card mainwp-scrolly-overflow">
90 96 <?php
91 97 /**
92 98 * Action: mainwp_logs_widget_top
93 99 *
@@ -98,10 +104,14 @@
98 104 do_action( 'mainwp_logs_widget_top', 'plugins' );
99 105 ?>
100 106 <div id="mainwp-message-zone" style="display:none;" class="ui message"></div>
101 107 <?php
102 - wp_nonce_field( 'mainwp-admin-nonce' );
103 - $this->render_widget_content( $stats_data, $stats_prev_data );
108 + MainWP_UI::generate_wp_nonce( 'mainwp-admin-nonce' );
109 + if ( ! empty( $data ) ) {
110 + $this->render_widget_content( $stats_data, $stats_prev_data );
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 + }
104 114 ?>
105 115 <?php
106 116 /**
107 117 * Action: mainwp_logs_widget_bottom