PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.2.0
ShareThis Dashboard for Google Analytics v3.2.0
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / view / templates / date-custom-range-filter.php
googleanalytics / view / templates Last commit date
sidebar 3 years ago appearance.php 4 years ago date-custom-range-filter.php 4 years ago demo-popup.php 4 years ago demographic-chart.php 4 years ago demographic.php 4 years ago exclusions.php 4 years ago ga4-dashboard.php 3 years ago ga4-demographic-chart.php 3 years ago gdpr-config.php 4 years ago gdpr.php 4 years ago purposes.php 4 years ago
date-custom-range-filter.php
33 lines
1 <?php
2 /**
3 * Custom Date Range Filter template.
4 *
5 * @package GoogleAnalytics
6 */
7
8 $args = isset( $args ) ? $args : array();
9
10 $props = wp_parse_args(
11 $args,
12 array(
13 'date_from' => gmdate( 'Y-m-d', strtotime( '-1 week' ) ),
14 'date_to' => gmdate( 'Y-m-d' ),
15 )
16 );
17
18 $date_from = false === empty( $props['date_from'] ) ? $props['date_from'] : gmdate( 'Y-m-d', strtotime( '-1 week' ) );
19 $date_to = false === empty( $props['date_to'] ) ? $props['date_to'] : gmdate( 'Y-m-d' );
20 ?>
21 <form action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>" method="GET">
22 <input type="hidden" name="page" value="googleanalytics"/>
23 <label>
24 <?php esc_html_e( 'From:', 'googleanalytics' ); ?>
25 <input name="date_from" type="date" value="<?php echo esc_attr( $date_from ); ?>">
26 </label>
27 <label>
28 <?php esc_html_e( 'To:', 'googleanalytics' ); ?>
29 <input name="date_to" type="date" value="<?php echo esc_attr( $date_to ); ?>">
30 </label>
31 <button><?php esc_html_e( 'Filter', 'googleanalytics' ); ?></button>
32 </form>
33