PluginProbe
SweepPress: Website Cleanup and Optimization / 2.4
SweepPress: Website Cleanup and Optimization v2.4
trunk 1.1 1.2 1.3 1.4 1.4.1 1.5 1.6 1.7 1.8 2.0 2.1 2.1.1 2.2 2.3 2.3.1 2.4 2.4.1 2.4.2 2.5 2.6 3.0 3.1 3.1.1 3.2 All 39 releases
sweeppress / forms / sidebar-statistics.php

sidebar-statistics.php in SweepPress: Website Cleanup and Optimization 2.4, at forms/sidebar-statistics.php

54 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use Dev4Press\v43\Core\Quick\KSES;
4 use Dev4Press\v43\Core\Quick\Sanitize;
5 use Dev4Press\v43\Core\UI\Elements;
6 use function Dev4Press\v43\Functions\panel;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 $_panel = panel()->a()->panel_object();
13 $_subpanel = panel()->a()->subpanel;
14 $_subpanels = panel()->subpanels();
15
16 $list = sweeppress_settings()->list_statistics();
17 $period = isset( $_GET['period'] ) ? Sanitize::slug( $_GET['period'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
18
19 if ( ! isset( $list[ $period ] ) ) {
20 $period = '';
21 }
22
23 ?>
24 <div class="d4p-sidebar">
25 <div class="d4p-panel-scroller d4p-scroll-active">
26 <div class="d4p-panel-title">
27 <div class="_icon">
28 <?php echo KSES::strong( panel()->r()->icon( $_panel->icon ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
29 </div>
30 <h3><?php echo esc_html( $_panel->title ); ?></h3>
31 <div class="_info">
32 <?php echo esc_html( $_panel->info ); ?>
33 </div>
34 </div>
35 <div class="d4p-panel-buttons">
36 <form method="get">
37 <input type="hidden" name="page" value="sweeppress-statistics"/>
38 <label style="margin: 0 0 1em; display: block;">
39 <span><?php esc_html_e( 'Choose Period', 'sweeppress' ); ?>:</span>
40 <?php Elements::instance()->select( $list, array(
41 'selected' => $period,
42 'class' => 'widefat',
43 'name' => 'period',
44 ) ); ?>
45 </label>
46 <input type="submit" value="<?php esc_attr_e( 'Load Data', 'sweeppress' ); ?>" class="button-primary"/>
47 </form>
48 </div>
49 <div class="d4p-return-to-top">
50 <a href="#wpwrap"><?php esc_html_e( 'Return to top', 'sweeppress' ); ?></a>
51 </div>
52 </div>
53 </div>
54