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-posts-widget.php +19 -8 5.2.1 → 6.2.1 View file →
@@ -10,9 +10,16 @@
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 +
21 +
15 22 /**
16 23 * Class Log_Posts_Widget
17 24 *
18 25 * Displays the Logs info.
@@ -77,17 +84,17 @@
77 84 }
78 85
79 86 ?>
80 87 <div class="mainwp-widget-header">
81 - <h3 class="ui header handle-drag">
88 + <h2 class="ui header handle-drag">
82 89 <?php esc_html_e( 'Posts Management Event Tracker', 'mainwp' ); ?>
83 90 <div class="sub header">
84 91 <?php esc_html_e( 'Overview of post-related activities with total events tallied.', 'mainwp' ); ?>
85 92 </div>
86 - </h3>
93 + </h2>
87 94 </div>
88 95
89 - <div class="mainwp-widget-insights-card">
96 + <div class="mainwp-widget-insights-card mainwp-scrolly-overflow">
90 97 <?php
91 98 /**
92 99 * Action: mainwp_logs_widget_top
93 100 *
@@ -98,10 +105,14 @@
98 105 do_action( 'mainwp_logs_widget_top', 'posts' );
99 106 ?>
100 107 <div id="mainwp-message-zone" style="display:none;" class="ui message"></div>
101 108 <?php
102 - wp_nonce_field( 'mainwp-admin-nonce' );
103 - $this->render_widget_content( $stats_data, $stats_prev_data );
109 + MainWP_UI::generate_wp_nonce( 'mainwp-admin-nonce' );
110 + if ( ! empty( $data ) ) {
111 + $this->render_widget_content( $stats_data, $stats_prev_data );
112 + } else {
113 + 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>' );
114 + }
104 115 ?>
105 116 <?php
106 117 /**
107 118 * Action: mainwp_logs_widget_bottom
@@ -156,10 +167,10 @@
156 167 'total_events' => esc_html__( 'Events', 'mainwp' ),
157 168 );
158 169
159 170 ?>
160 - <div class="ui one column grid">
161 - <div class="left aligned middle aligned column">
171 + <div class="ui grid">
172 + <div class="sixteen wide column">
162 173 <div class="ui equal width grid">
163 174 <?php
164 175 foreach ( $columns as $act => $title ) {
165 176 Log_Stats::render_stats_info( $posts_data, $act, $title, $posts_prev_data );
@@ -166,9 +177,9 @@
166 177 }
167 178 ?>
168 179 </div>
169 180 </div>
170 - <div class="left aligned middle aligned column">
181 + <div class="sixteen wide column">
171 182 <div id="mainwp-module-log-chart-posts-management-wrapper" ></div>
172 183 <script type="text/javascript">
173 184 jQuery( document ).ready( function() {
174 185 let options = {