ad-gadsense-dashboard.php
1 year ago
ad-info-after-textarea.php
1 year ago
ad-layout.php
1 year ago
ad-parameters-size.php
1 year ago
ad-parameters.php
1 year ago
ad-targeting.php
1 year ago
ad-types.php
1 year ago
ad-usage-notes.php
1 year ago
ad-usage-shortcodes.php
1 year ago
ad-usage.php
1 year ago
post-ad-settings.php
1 year ago
ad-targeting.php
55 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render targeting meta box for Display and Visitor Conditions on ad edit page |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.48.2 |
| 8 | * |
| 9 | * @var Ad $ad Ad instance. |
| 10 | */ |
| 11 | |
| 12 | $display_conditions = $ad->get_display_conditions(); |
| 13 | $visitor_conditions = $ad->get_visitor_conditions(); |
| 14 | $display_conditions_available = empty( $display_conditions ); |
| 15 | $visitor_conditions_available = empty( $visitor_conditions ); |
| 16 | |
| 17 | ?> |
| 18 | <h3> |
| 19 | <?php echo esc_html__( 'Display Conditions', 'advanced-ads' ); ?> |
| 20 | <span class="advads-help"> |
| 21 | <span class="advads-tooltip"> |
| 22 | <?php esc_html_e( 'Limit the ad to pages that match the following conditions. Don‘t do anything here if the ad should appear everywhere you embed it.', 'advanced-ads' ); ?> |
| 23 | </span> |
| 24 | </span> |
| 25 | </h3> |
| 26 | <?php if ( $display_conditions_available ) : ?> |
| 27 | <div class="advads-show-in-wizard"> |
| 28 | <p><?php esc_html_e( 'Click on the button below if the ad should NOT show up on all pages when included automatically.', 'advanced-ads' ); ?></p> |
| 29 | <button type="button" class="button button-secondary" id="advads-wizard-display-conditions-show"><?php esc_html_e( 'Hide the ad on some pages', 'advanced-ads' ); ?></button> |
| 30 | </div> |
| 31 | <?php endif; ?> |
| 32 | <div id="advads-display-conditions" <?php echo $display_conditions_available ? 'class="advads-hide-in-wizard"' : ''; ?>> |
| 33 | <?php Advanced_Ads_Display_Conditions::render_condition_list( $display_conditions, 'advads-ad-display-conditions' ); ?> |
| 34 | </div> |
| 35 | <?php do_action( 'advanced-ads-display-conditions-after', $ad ); ?> |
| 36 | <hr/> |
| 37 | <h3> |
| 38 | <?php echo esc_html__( 'Visitor Conditions', 'advanced-ads' ); ?> |
| 39 | <span class="advads-help"> |
| 40 | <span class="advads-tooltip"> |
| 41 | <?php esc_html_e( 'Target the ad to specific user groups that match the following conditions. Don‘t do anything here if all users should see the ad.', 'advanced-ads' ); ?> |
| 42 | </span> |
| 43 | </span> |
| 44 | </h3> |
| 45 | <?php if ( $visitor_conditions_available ) : ?> |
| 46 | <div class="advads-show-in-wizard"> |
| 47 | <p><?php esc_html_e( 'Click on the button below if the ad should NOT be visible to all visitors', 'advanced-ads' ); ?></p> |
| 48 | <button type="button" class="button button-secondary" id="advads-wizard-visitor-conditions-show"><?php esc_html_e( 'Hide the ad from some users', 'advanced-ads' ); ?></button> |
| 49 | </div> |
| 50 | <?php endif; ?> |
| 51 | <div id="advads-visitor-conditions" <?php echo $visitor_conditions_available ? 'class="advads-hide-in-wizard"' : ''; ?>> |
| 52 | <?php Advanced_Ads_Visitor_Conditions::render_condition_list( $visitor_conditions, 'advads-ad-visitor-conditions' ); ?> |
| 53 | </div> |
| 54 | <?php do_action( 'advanced-ads-visitor-conditions-after', $ad ); ?> |
| 55 |