PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
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-pages-widget.php +18 -8 5.2.1 → 6.2.2 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_Pages_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( 'Page Management Event Tracker', 'mainwp' ); ?>
83 89 <div class="sub header">
84 90 <?php esc_html_e( 'Overview of page-related activities with total events tallied.', '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', 'pages' );
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
@@ -156,10 +166,10 @@
156 166 'total_events' => esc_html__( 'Total', 'mainwp' ),
157 167 );
158 168
159 169 ?>
160 - <div class="ui one column grid">
161 - <div class="left aligned middle aligned column">
170 + <div class="ui grid">
171 + <div class="sixteen wide column">
162 172 <div class="ui equal width grid">
163 173 <?php
164 174 foreach ( $columns as $act => $title ) {
165 175 Log_Stats::render_stats_info( $pages_data, $act, $title, $pages_prev_data );
@@ -166,9 +176,9 @@
166 176 }
167 177 ?>
168 178 </div>
169 179 </div>
170 - <div class="left aligned middle aligned column">
180 + <div class="sixteen wide column">
171 181 <div id="mainwp-module-log-chart-pages-management-wrapper" ></div>
172 182 <script type="text/javascript">
173 183 jQuery( document ).ready( function() {
174 184 let options = {