footer.php
1 year ago
header.php
1 year ago
newsletter.php
1 year ago
performing-ads.php
1 year ago
rss.php
1 year ago
performing-ads.php
60 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render performing ads section |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | */ |
| 7 | |
| 8 | $periods = [ |
| 9 | 'today' => __( 'today', 'advanced-ads' ), |
| 10 | 'yesterday' => __( 'yesterday', 'advanced-ads' ), |
| 11 | 'last7days' => __( 'last 7 days', 'advanced-ads' ), |
| 12 | 'thismonth' => __( 'this month', 'advanced-ads' ), |
| 13 | 'lastmonth' => __( 'last month', 'advanced-ads' ), |
| 14 | 'thisyear' => __( 'this year', 'advanced-ads' ), |
| 15 | 'lastyear' => __( 'last year', 'advanced-ads' ), |
| 16 | 'custom' => __( 'custom', 'advanced-ads' ), |
| 17 | ]; |
| 18 | ?> |
| 19 | <div class="advads-widget-wrapper"> |
| 20 | <div class="section-title flex flex-row items-center flex-wrap gap-y-2 gap-x-2" style="padding-top: 0.3rem; padding-bottom: 0.3rem;"> |
| 21 | <h3 class="!mt-0"> |
| 22 | <?php esc_html_e( 'Best-performing Ads for', 'advanced-ads' ); ?> |
| 23 | </h3> |
| 24 | <select name="advads-performing-ads-period" disabled> |
| 25 | <?php foreach ( $periods as $key => $period ) : ?> |
| 26 | <option value="<?php echo esc_attr( $key ); ?>" <?php echo 'last7days' === $key ? 'selected' : ''; ?>><?php echo esc_html( $period ); ?></option> |
| 27 | <?php endforeach; ?> |
| 28 | </select> |
| 29 | <div class="advads-custom-period"> |
| 30 | <div class="advads-custom-period-wrapper"> |
| 31 | <fieldset class="flex gap-x-2"> |
| 32 | <input type="text" name="advads-custom-from" autocomplete="off" size="10" maxlength="10" placeholder="<?php esc_html_e( 'from', 'advanced-ads' ); ?>"/> |
| 33 | <input type="text" name="advads-custom-to" autocomplete="off" size="10" maxlength="10" placeholder="<?php esc_html_e( 'to', 'advanced-ads' ); ?>"/> |
| 34 | </fieldset> |
| 35 | </div> |
| 36 | </div> |
| 37 | </div> |
| 38 | <div class="advads-performing-ads-track disabled"> |
| 39 | <ul> |
| 40 | <li class="active" data-tab="clicks">Clicks</li> |
| 41 | <li data-tab="impressions">Impressions</li> |
| 42 | <li data-tab="ctr">CTR</li> |
| 43 | </ul> |
| 44 | <a href="<?php echo esc_attr( admin_url( 'admin.php?page=advanced-ads-stats' ) ); ?>"><?php esc_html_e( 'See full statistics', 'advanced-ads' ); ?></a> |
| 45 | </div> |
| 46 | |
| 47 | <?php if ( ! defined( 'AAT_FILE' ) ) : ?> |
| 48 | <p> |
| 49 | <?php esc_html_e( 'No tracking add-on installed.', 'advanced-ads' ); ?> |
| 50 | </p> |
| 51 | <p> |
| 52 | <a class="go-pro" href="https://wpadvancedads.com/pricing/?utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank"> |
| 53 | <?php esc_html_e( 'Advanced Ads All Access includes the Tracking add-on', 'advanced-ads' ); ?><span aria-hidden="true" class="dashicons dashicons-external"></span> |
| 54 | </a> |
| 55 | </p> |
| 56 | <?php endif; ?> |
| 57 | |
| 58 | <?php do_action( 'advanced-ads-dashboard-performing-ads' ); ?> |
| 59 | </div> |
| 60 |