Advanced Ads - Version 1.7.12

Version Description

  • better highlighting of AND and OR connectors in display and visitor conditions
  • removed general conditions as default from display conditions
  • highlighted video and manual links for conditions
  • show is_home and is_front_page as the same item in ad debug mode
  • show warning if plain ad code contains HTTP, but the website is using HTTPS
  • added notice if add-on licenses expired to plugin page
  • changed "mobile device" into "device" condition with better option descriptions (mobile + tablet |desktop)
  • changed "Post Content" placement label into "Content" since it is used for all post types
  • hide manage ads link in dashboard widget from users who can not edit ads
  • fixed dependency issue with Tracking add-on
  • fixed dependency issue with AJAX cache-busting
  • fixed missing scripts for ad block disguise
Download this release

Release Info

Developer webzunft
Plugin Icon 128x128 Advanced Ads
Version 1.7.12
Comparing to
See all releases

Code changes from version 1.7.11 to 1.7.12

admin/assets/css/admin.css CHANGED
@@ -103,11 +103,15 @@ h2.hndle .advads-hndlelinks a + a { margin-left: 1em; }
103
  select + .advads-conditions-single { display: inline-block; }
104
  .advads-conditions-table { border-collapse: collapse; }
105
  .advads-conditions-table td, .advads-conditions-table td * { vertical-align: top; }
106
- .advads-conditions-table > tbody > tr td { border-bottom: 1px solid #ddd; }
 
107
  .advads-conditions-table select { vertical-align: inherit; margin: 0; }
 
 
 
108
  .advads-conditions-connector label { text-transform: uppercase; background: #fff; border: 1px solid #aaa; color: #555; }
109
  .advads-conditions-type { text-transform: capitalize; }
110
- .advads-conditions-table tr:first-child .advads-conditions-connector * { display: none; }
111
 
112
  .post-type-advanced_ads #advads-ad-content-plain { width: 100%; }
113
  .post-type-advanced_ads .advads-conditions-single th { vertical-align: top; }
103
  select + .advads-conditions-single { display: inline-block; }
104
  .advads-conditions-table { border-collapse: collapse; }
105
  .advads-conditions-table td, .advads-conditions-table td * { vertical-align: top; }
106
+ .advads-conditions-table > tbody > tr { background: #eee; }
107
+ .advads-conditions-table > tbody > tr > td:last-child { padding-right: 10px; }
108
  .advads-conditions-table select { vertical-align: inherit; margin: 0; }
109
+ .advads-conditions-table tr:first-child.advads-conditions-connector { display: none; }
110
+ .advads-conditions-connector { text-align: center; }
111
+ .advads-conditions-table > tbody > .advads-conditions-connector-and { background: none; }
112
  .advads-conditions-connector label { text-transform: uppercase; background: #fff; border: 1px solid #aaa; color: #555; }
113
  .advads-conditions-type { text-transform: capitalize; }
114
+ .advads-conditions-table .advads-conditions-connector .advads-error-message { display: none; }
115
 
116
  .post-type-advanced_ads #advads-ad-content-plain { width: 100%; }
117
  .post-type-advanced_ads .advads-conditions-single th { vertical-align: top; }
admin/assets/js/admin.js CHANGED
@@ -191,10 +191,17 @@ jQuery( document ).ready(function ($) {
191
  $(document).on('click', '.advads-conditions-connector input', function(){
192
  if( $( this ).is(':checked' ) ){
193
  $( this ).button( "option", "label", advadstxt.condition_or );
 
194
  } else {
195
  $( this ).button( "option", "label", advadstxt.condition_and );
 
196
  }
197
  });
 
 
 
 
 
198
 
199
  // display ad groups form
200
  $( '#advads-ad-group-list a.edit, #advads-ad-group-list a.row-title' ).click(function(e){
@@ -484,12 +491,18 @@ jQuery( document ).ready(function ($) {
484
  $(this).removeClass('hidden');
485
  $(this).appendTo( $(this).parent('.inside').siblings('h2.hndle') );
486
  });
487
- // open tutorial link when klick on it
488
  $('.advads-video-link').click(function( el ){
489
  el.preventDefault();
490
  var video_container = $(this).parents('h2').siblings('.inside').find('.advads-video-link-container');
491
  video_container.html( video_container.data('videolink') );
492
  });
 
 
 
 
 
 
493
  // switch import type
494
  jQuery( '.advads_import_type' ).change( function() {
495
  if ( this.value === 'xml_content' ) {
191
  $(document).on('click', '.advads-conditions-connector input', function(){
192
  if( $( this ).is(':checked' ) ){
193
  $( this ).button( "option", "label", advadstxt.condition_or );
194
+ $( this ).parents( '.advads-conditions-connector' ).addClass('advads-conditions-connector-or').removeClass('advads-conditions-connector-and');
195
  } else {
196
  $( this ).button( "option", "label", advadstxt.condition_and );
197
+ $( this ).parents( '.advads-conditions-connector' ).addClass('advads-conditions-connector-and').removeClass('advads-conditions-connector-or');
198
  }
199
  });
200
+ // remove a line with a display or visitor condition
201
+ $(document).on('click', '.advads-conditions-remove', function(){
202
+ $(this).parents('.advads-conditions-table tr').prev('tr').remove();
203
+ $(this).parents('.advads-conditions-table tr').remove();
204
+ });
205
 
206
  // display ad groups form
207
  $( '#advads-ad-group-list a.edit, #advads-ad-group-list a.row-title' ).click(function(e){
491
  $(this).removeClass('hidden');
492
  $(this).appendTo( $(this).parent('.inside').siblings('h2.hndle') );
493
  });
494
+ // open tutorial link when clicked on it
495
  $('.advads-video-link').click(function( el ){
496
  el.preventDefault();
497
  var video_container = $(this).parents('h2').siblings('.inside').find('.advads-video-link-container');
498
  video_container.html( video_container.data('videolink') );
499
  });
500
+ // open inline tutorial link when clicked on it
501
+ $('.advads-video-link-inline').click(function( el ){
502
+ el.preventDefault();
503
+ var video_container = $(this).parents('div').siblings('.advads-video-link-container');
504
+ video_container.html( video_container.data('videolink') );
505
+ });
506
  // switch import type
507
  jQuery( '.advads_import_type' ).change( function() {
508
  if ( this.value === 'xml_content' ) {
admin/class-advanced-ads-admin.php CHANGED
@@ -66,6 +66,7 @@ class Advanced_Ads_Admin {
66
  new Advanced_Ads_Ad_Ajax_Callbacks;
67
  } else {
68
  add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
 
69
  }
70
  // add shortcode creator to TinyMCE
71
  Advanced_Ads_Shortcode_Creator::get_instance();
@@ -73,7 +74,7 @@ class Advanced_Ads_Admin {
73
  }
74
 
75
  public function wp_plugins_loaded() {
76
- /*
77
  * Call $plugin_slug from public plugin class.
78
  *
79
  */
@@ -100,6 +101,7 @@ class Advanced_Ads_Admin {
100
 
101
  // add links to plugin page
102
  add_filter( 'plugin_action_links_' . ADVADS_BASE, array( $this, 'add_plugin_links' ) );
 
103
  // display information when user is going to disable the plugin
104
  // add_filter( 'after_plugin_row_' . ADVADS_BASE, array( $this, 'display_deactivation_message' ) );
105
  Advanced_Ads_Admin_Meta_Boxes::get_instance();
@@ -653,7 +655,7 @@ class Advanced_Ads_Admin {
653
  * @param str $file the filename for the current plugin, which the filter loops through.
654
  * @return array $links
655
  */
656
- function add_plugin_links( $links ) {
657
  // add link to settings
658
  //$settings_link = '<a href="' . admin_url( 'admin.php?page=advanced_ads&page=advanced-ads-settings' ) . '">' . __( 'Settings', 'advanced-ads' ) . '</a>';
659
  //array_unshift( $links, $settings_link );
@@ -669,12 +671,55 @@ class Advanced_Ads_Admin {
669
  return $links;
670
  }
671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  /**
673
  * display message when someone is going to disable the plugin
674
  *
675
  * @since 1.6.14
676
  */
677
- function display_deactivation_message(){
678
 
679
  // get email address
680
  $current_user = wp_get_current_user();
66
  new Advanced_Ads_Ad_Ajax_Callbacks;
67
  } else {
68
  add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
69
+ add_action( 'load-plugins.php', array( $this, 'check_plugin_licenses' ) );
70
  }
71
  // add shortcode creator to TinyMCE
72
  Advanced_Ads_Shortcode_Creator::get_instance();
74
  }
75
 
76
  public function wp_plugins_loaded() {
77
+ /*
78
  * Call $plugin_slug from public plugin class.
79
  *
80
  */
101
 
102
  // add links to plugin page
103
  add_filter( 'plugin_action_links_' . ADVADS_BASE, array( $this, 'add_plugin_links' ) );
104
+
105
  // display information when user is going to disable the plugin
106
  // add_filter( 'after_plugin_row_' . ADVADS_BASE, array( $this, 'display_deactivation_message' ) );
107
  Advanced_Ads_Admin_Meta_Boxes::get_instance();
655
  * @param str $file the filename for the current plugin, which the filter loops through.
656
  * @return array $links
657
  */
658
+ public function add_plugin_links( $links ) {
659
  // add link to settings
660
  //$settings_link = '<a href="' . admin_url( 'admin.php?page=advanced_ads&page=advanced-ads-settings' ) . '">' . __( 'Settings', 'advanced-ads' ) . '</a>';
661
  //array_unshift( $links, $settings_link );
671
  return $links;
672
  }
673
 
674
+ /**
675
+ * initiate plugin checks
676
+ *
677
+ * @since 1.7.12
678
+ */
679
+ public function check_plugin_licenses(){
680
+
681
+ if( is_multisite() ){
682
+ return;
683
+ }
684
+
685
+ // gather all add-on plugin files
686
+ $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
687
+ foreach( $add_ons as $_add_on ){
688
+
689
+ // check license status
690
+ if( $this->get_license_status( $_add_on['options_slug'] ) !== 'valid' ) {
691
+ // register warning
692
+ $plugin_file = plugin_basename( $_add_on['path'] );
693
+ add_action( 'after_plugin_row_' . $plugin_file, array( $this, 'add_plugin_list_license_notice'), 10, 3 );
694
+ }
695
+ }
696
+ }
697
+
698
+ /**
699
+ * add a row below add-ons with an invalid license on the plugin list
700
+ *
701
+ * @since 1.7.12
702
+ * @param string $plugin_file Path to the plugin file, relative to the plugins directory.
703
+ * @param array $plugin_data An array of plugin data.
704
+ * @param string $status Status of the plugin. Defaults are 'All', 'Active',
705
+ * 'Inactive', 'Recently Activated', 'Upgrade', 'Must-Use',
706
+ * 'Drop-ins', 'Search'.
707
+ * @todo make this work on multisite as well
708
+ */
709
+ public function add_plugin_list_license_notice( $plugin_file, $plugin_data, $status ){
710
+
711
+ echo '<tr class="advads-plugin-update-tr plugin-update-tr active"><td class="plugin-update colspanchange" colspan="3"><div class="update-message notice inline notice-warning notice-alt"><p>'
712
+ . sprintf( __( 'There might be a new version of %1$s. Please <strong>provide a valid license key</strong> in order to receive updates and support <a href="%2$s">on this page</a>.', 'advanced-ads' ), $plugin_data['Title'], admin_url( 'admin.php?page=advanced-ads-settings#top#licenses' ) )
713
+ . '</p></div></td></tr>';
714
+
715
+ }
716
+
717
  /**
718
  * display message when someone is going to disable the plugin
719
  *
720
  * @since 1.6.14
721
  */
722
+ public function display_deactivation_message(){
723
 
724
  // get email address
725
  $current_user = wp_get_current_user();
admin/includes/class-meta-box.php CHANGED
@@ -326,12 +326,14 @@ class Advanced_Ads_Admin_Meta_Boxes {
326
 
327
  // get number of ads
328
  $recent_ads = Advanced_Ads::get_instance()->get_model()->get_ads();
329
- echo '<p>';
330
- printf(__( '%d ads – <a href="%s">manage</a> - <a href="%s">new</a>', 'advanced-ads' ),
331
- count( $recent_ads ),
332
- 'edit.php?post_type='. Advanced_Ads::POST_TYPE_SLUG,
333
- 'post-new.php?post_type='. Advanced_Ads::POST_TYPE_SLUG);
334
- echo '</p>';
 
 
335
 
336
  // get and display plugin version
337
  $advads_plugin_data = get_plugin_data( ADVADS_BASE_PATH . 'advanced-ads.php' );
326
 
327
  // get number of ads
328
  $recent_ads = Advanced_Ads::get_instance()->get_model()->get_ads();
329
+ if( current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
330
+ echo '<p>';
331
+ printf(__( '%d ads – <a href="%s">manage</a> - <a href="%s">new</a>', 'advanced-ads' ),
332
+ count( $recent_ads ),
333
+ 'edit.php?post_type='. Advanced_Ads::POST_TYPE_SLUG,
334
+ 'post-new.php?post_type='. Advanced_Ads::POST_TYPE_SLUG);
335
+ echo '</p>';
336
+ }
337
 
338
  // get and display plugin version
339
  $advads_plugin_data = get_plugin_data( ADVADS_BASE_PATH . 'advanced-ads.php' );
admin/views/ad-display-metabox.php CHANGED
@@ -3,17 +3,18 @@ $display_conditions = Advanced_Ads_Display_Conditions::get_instance()->condition
3
  $options = $ad->options('conditions');
4
  // error_log(print_r($display_conditions, true));
5
  // error_log(print_r($options, true));
6
- ?><p class="description"><?php _e('Set Display Conditions to allow or hide the ad on specific pages.', 'advanced-ads'); ?></p>
7
- <div id="advads-display-conditions">
8
- <p class="advads-jqueryui-error advads-error-message hidden"><?php printf(__( 'There might be a problem with layouts and scripts in your dashboard. Please check <a href="%s" target="_blank">this article to learn more</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/jquery-problem-in-dashboard/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-jquery-error' ); ?></p>
 
 
 
 
 
 
 
 
9
  <table class="advads-conditions-table"><tbody><?php
10
- // add general conditions by default
11
- if( !is_array( $options ) || !count( $options )){
12
- $options = array(
13
- 'general' => null
14
- );
15
- }
16
-
17
  $last_index = -1;
18
  $i = 0;
19
  if (is_array($options)) :
@@ -44,7 +45,8 @@ $options = $ad->options('conditions');
44
  $show_or_force_warning = true;
45
  }
46
 
47
- ?><tr><td class="advads-conditions-connector"><?php echo Advanced_Ads_Display_Conditions::render_connector_option( $i, $connector );
 
48
  if( $show_or_force_warning ){
49
  ?><p class="advads-error-message"><?php
50
  _e( 'Forced to OR.', 'advanced-ads');
@@ -52,9 +54,11 @@ $options = $ad->options('conditions');
52
  ?></p><?php
53
 
54
  }
55
- ?></td><td class="advads-conditions-type" data-condition-type="<?php echo $_options['type']; ?>"><?php echo $display_conditions[$_options['type']]['label']; ?></td><td><?php
 
 
56
  call_user_func(array($metabox[0], $metabox[1]), $_options, $i++);
57
- ?></td><td><button type="button" class="advads-display-conditions-remove button">x</button></td></tr><?php
58
  }
59
  $last_index = $_index;
60
  endforeach;
@@ -101,7 +105,7 @@ endif;
101
  // add
102
  if (r) {
103
  var connector = '<input style="display:none;" type="checkbox" name="<?php echo Advanced_Ads_Display_Conditions::FORM_NAME; ?>[' + display_condition_index + '][connector]" checked="checked" value="or" id="advads-conditions-'+ display_condition_index +'-connector"><label for="advads-conditions-'+ display_condition_index +'-connector"><?php _e( 'or', 'advanced-ads' ); ?></label>';
104
- var newline = '<tr><td class="advads-conditions-connector">'+connector+'</td><td class="advads-conditions-type" data-condition-type="'+ display_condition_type +'">' + display_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-display-conditions-remove button">x</button></td></tr>';
105
  $('#advads-display-conditions table tbody').append(newline);
106
  if ( advads_use_ui_buttonset() ) {
107
  $('#advads-display-conditions table tbody .advads-conditions-single.advads-buttonset').buttonset();
@@ -125,10 +129,6 @@ endif;
125
  }
126
  });
127
  });
128
- $(document).on('click', '.advads-display-conditions-remove', function () {
129
- var row = $(this).parents('#advads-display-conditions table tr');
130
- row.remove();
131
- });
132
  });
133
  </script>
134
  <?php
3
  $options = $ad->options('conditions');
4
  // error_log(print_r($display_conditions, true));
5
  // error_log(print_r($options, true));
6
+ ?><div id="advads-display-conditions"><?php
7
+ // display help when no conditions are given
8
+ if( !is_array( $options ) || !count( $options )) :
9
+ $options = array();
10
+ ?><p><button type="button" class="advads-video-link-inline button button-primary"><?php _e( 'Watch video', 'advanced-ads' ); ?></button><?php
11
+ ?>&nbsp;<a class="button button-secondary" href="<?php echo ADVADS_URL; ?>manual/display-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank">
12
+ <?php _e( 'Visit the manual', 'advanced-ads' ); ?>
13
+ </a></p><?php
14
+ endif;
15
+ ?><p class="advads-jqueryui-error advads-error-message hidden"><?php printf(__( 'There might be a problem with layouts and scripts in your dashboard. Please check <a href="%s" target="_blank">this article to learn more</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/jquery-problem-in-dashboard/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-jquery-error' ); ?></p>
16
+ <p><?php _e('A page with this ad on it must match all of the following conditions.', 'advanced-ads'); ?></p>
17
  <table class="advads-conditions-table"><tbody><?php
 
 
 
 
 
 
 
18
  $last_index = -1;
19
  $i = 0;
20
  if (is_array($options)) :
45
  $show_or_force_warning = true;
46
  }
47
 
48
+ if( $i > 0 ) : ?><tr class="advads-conditions-connector advads-conditions-connector-<?php echo $connector; ?>">
49
+ <td colspan="3"><?php echo Advanced_Ads_Display_Conditions::render_connector_option( $i, $connector );
50
  if( $show_or_force_warning ){
51
  ?><p class="advads-error-message"><?php
52
  _e( 'Forced to OR.', 'advanced-ads');
54
  ?></p><?php
55
 
56
  }
57
+ ?></td>
58
+ </tr><?php endif; ?>
59
+ <tr><td class="advads-conditions-type" data-condition-type="<?php echo $_options['type']; ?>"><?php echo $display_conditions[$_options['type']]['label']; ?></td><td><?php
60
  call_user_func(array($metabox[0], $metabox[1]), $_options, $i++);
61
+ ?></td><td><button type="button" class="advads-conditions-remove button">x</button></td></tr><?php
62
  }
63
  $last_index = $_index;
64
  endforeach;
105
  // add
106
  if (r) {
107
  var connector = '<input style="display:none;" type="checkbox" name="<?php echo Advanced_Ads_Display_Conditions::FORM_NAME; ?>[' + display_condition_index + '][connector]" checked="checked" value="or" id="advads-conditions-'+ display_condition_index +'-connector"><label for="advads-conditions-'+ display_condition_index +'-connector"><?php _e( 'or', 'advanced-ads' ); ?></label>';
108
+ var newline = '<tr class="advads-conditions-connector advads-conditions-connector-or"><td colspan="3">'+connector+'</td></tr><tr><td class="advads-conditions-type" data-condition-type="'+ display_condition_type +'">' + display_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-conditions-remove button">x</button></td></tr>';
109
  $('#advads-display-conditions table tbody').append(newline);
110
  if ( advads_use_ui_buttonset() ) {
111
  $('#advads-display-conditions table tbody .advads-conditions-single.advads-buttonset').buttonset();
129
  }
130
  });
131
  });
 
 
 
 
132
  });
133
  </script>
134
  <?php
admin/views/ad-info-after-textarea.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( defined ( 'WP_DEBUG' ) && WP_DEBUG &&
3
+ ( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
4
+ <p class="advads-error-message">
5
+ <?php _e( 'The code of this ad might not work properly with the <em>Content</em> placement.', 'advanced-ads' );
6
+ ?>&nbsp;<?php printf(__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-support') );
7
+ if ( true === WP_DEBUG ) : ?>
8
+ <span style="white-space:pre-wrap"><?php echo $error; ?></span>
9
+ <?php endif;
10
+ ?>
11
+ </p>
12
+ <?php endif;
13
+
14
+ if ( $message = Advanced_Ads_Ad_Debug::is_https_and_http( $ad ) ) : ?>
15
+ <p class="advads-error-message"><?php echo $message; ?></p>
16
+ <?php endif;
17
+
18
+ do_action( 'advanced-ads-ad-params-below-textarea', $ad );
19
+ ?>
admin/views/ad-parameters-metabox.php CHANGED
@@ -21,19 +21,7 @@ do_action( 'advanced-ads-ad-params-before', $ad, $types ); ?>
21
  <?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current( $types );
22
  $type->render_parameters( $ad );
23
 
 
24
  include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php'; ?>
25
-
26
- <?php
27
- if ( defined ( 'WP_DEBUG' ) && WP_DEBUG &&
28
- ( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
29
- <p class="advads-error-message">
30
- <?php _e( 'The code of this ad might not work properly with the <em>Content</em> placement.', 'advanced-ads' );
31
- ?>&nbsp;<?php printf(__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-support') );
32
- if ( true === WP_DEBUG ) : ?>
33
- <span style="white-space:pre-wrap"><?php echo $error; ?></span>
34
- <?php endif;
35
- ?>
36
- </p>
37
- <?php endif; ?>
38
  </div>
39
  <?php do_action( 'advanced-ads-ad-params-after', $ad, $types );
21
  <?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current( $types );
22
  $type->render_parameters( $ad );
23
 
24
+ include ADVADS_BASE_PATH . 'admin/views/ad-parameters-warnings.php';
25
  include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  </div>
27
  <?php do_action( 'advanced-ads-ad-params-after', $ad, $types );
admin/views/ad-parameters-warnings.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( defined ( 'WP_DEBUG' ) && WP_DEBUG &&
3
+ ( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
4
+ <p class="advads-error-message">
5
+ <?php _e( 'The code of this ad might not work properly with the <em>Content</em> placement.', 'advanced-ads' );
6
+ ?>&nbsp;<?php printf(__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-support') );
7
+ if ( true === WP_DEBUG ) : ?>
8
+ <span style="white-space:pre-wrap"><?php echo $error; ?></span>
9
+ <?php endif;
10
+ ?>
11
+ </p>
12
+ <?php endif;
13
+
14
+ if ( $message = Advanced_Ads_Ad_Debug::is_https_and_http( $ad ) ) : ?>
15
+ <p class="advads-error-message"><?php echo $message; ?></p>
16
+ <?php endif; ?>
admin/views/ad-visitor-metabox.php CHANGED
@@ -2,8 +2,15 @@
2
  $visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance()->conditions;
3
  $options = $ad->options( 'visitors' );
4
  ?><p class="description"><?php _e( 'Display conditions that are based on the user. Use with caution on cached websites.', 'advanced-ads' ); ?></p>
5
- <div id="advads-visitor-conditions">
6
- <table class="advads-conditions-table"><tbody><?php
 
 
 
 
 
 
 
7
  if ( isset( $options ) ) :
8
  $i = 0;
9
  foreach ( $options as $_options ) :
@@ -14,10 +21,15 @@ foreach ( $options as $_options ) :
14
  }
15
  $connector = ( ! isset($_options['connector'] ) || 'or' !== $_options['connector'] ) ? 'and' : 'or';
16
  if ( method_exists( $metabox[0], $metabox[1] ) ) {
17
- ?><tr><td class="advads-conditions-connector"><?php echo Advanced_Ads_Visitor_Conditions::render_connector_option( $i, $connector ); ?></td><?php
18
- ?><td class="advads-conditions-type"><?php echo $visitor_conditions[ $_options['type'] ]['label']; ?></td><td><?php
 
 
 
 
 
19
  call_user_func( array( $metabox[0], $metabox[1] ), $_options, $i++ );
20
- ?></td><td><button type="button" class="advads-visitor-conditions-remove button">x</button></td></tr><?php
21
  }
22
  endforeach;
23
  endif;
@@ -27,7 +39,8 @@ foreach ( $options as $_options ) :
27
  <?php if( ! isset( $options ) || count( $options ) == 0 ) :
28
  ?><p><?php _e( 'Visitor conditions limit the number of users who can see your ad. There is no need to set visitor conditions if you want all users to see the ad.', 'advanced-ads' ); ?></p><?php
29
  elseif( Advanced_Ads_Checks::cache() && ! defined('AAP_VERSION') ) :
30
- ?><p><?php printf(__( 'Check out cache-busting in <a href="%s" target="_blank">Advanced Ads Pro</a> if dynamic features get cached.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor' ); ?></p><?php
 
31
  endif;
32
  ?>
33
  <fieldset>
@@ -65,8 +78,8 @@ jQuery( document ).ready(function ($) {
65
  success: function (r, textStatus, XMLHttpRequest) {
66
  // add
67
  if (r) {
68
- var connector = '<input type="checkbox" name="<?php echo Advanced_Ads_Visitor_Conditions::FORM_NAME; ?>[' + visitor_condition_index + '][connector]" value="or" id="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><label for="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><?php _e( 'and', 'advanced-ads' ); ?></label>';
69
- var newline = '<tr><td class="advads-conditions-connector">'+connector+'</td><td>' + visitor_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-visitor-conditions-remove button">x</button></td></tr>';
70
  $( '#advads-visitor-conditions table tbody' ).append( newline );
71
  if ( jQuery.fn.advads_button ) {
72
  $('#advads-visitor-conditions table tbody .advads-conditions-connector input').advads_button();
@@ -83,10 +96,6 @@ jQuery( document ).ready(function ($) {
83
  }
84
  });
85
  });
86
- $(document).on('click', '.advads-visitor-conditions-remove', function(){
87
- var row = $(this).parents('#advads-visitor-conditions table tr');
88
- row.remove();
89
- });
90
  });
91
  </script>
92
  <?php $options = $ad->options( 'visitor' );
2
  $visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance()->conditions;
3
  $options = $ad->options( 'visitors' );
4
  ?><p class="description"><?php _e( 'Display conditions that are based on the user. Use with caution on cached websites.', 'advanced-ads' ); ?></p>
5
+ <div id="advads-visitor-conditions"><?php
6
+ // display help when no conditions are given
7
+ if( !is_array( $options ) || !count( $options )) :
8
+ $options = array();
9
+ ?><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">
10
+ <?php _e( 'Visit the manual', 'advanced-ads' ); ?>
11
+ </a></p><?php
12
+ endif;
13
+ ?><table class="advads-conditions-table"><tbody><?php
14
  if ( isset( $options ) ) :
15
  $i = 0;
16
  foreach ( $options as $_options ) :
21
  }
22
  $connector = ( ! isset($_options['connector'] ) || 'or' !== $_options['connector'] ) ? 'and' : 'or';
23
  if ( method_exists( $metabox[0], $metabox[1] ) ) {
24
+ if( $i > 0 ) :
25
+ ?><tr class="advads-conditions-connector advads-conditions-connector-<?php echo $connector; ?>">
26
+ <td colspan="3"><?php
27
+ echo Advanced_Ads_Visitor_Conditions::render_connector_option( $i, $connector );
28
+ ?></td></tr>
29
+ <?php endif; ?>
30
+ <tr><td class="advads-conditions-type"><?php echo $visitor_conditions[ $_options['type'] ]['label']; ?></td><td><?php
31
  call_user_func( array( $metabox[0], $metabox[1] ), $_options, $i++ );
32
+ ?></td><td><button type="button" class="advads-conditions-remove button">x</button></td></tr><?php
33
  }
34
  endforeach;
35
  endif;
39
  <?php if( ! isset( $options ) || count( $options ) == 0 ) :
40
  ?><p><?php _e( 'Visitor conditions limit the number of users who can see your ad. There is no need to set visitor conditions if you want all users to see the ad.', 'advanced-ads' ); ?></p><?php
41
  elseif( Advanced_Ads_Checks::cache() && ! defined('AAP_VERSION') ) :
42
+ ?><p><span class="advads-error-message"><?php _e( 'It seems that a caching plugin is activated.', 'advanced-ads' ); ?></span>&nbsp;<?php
43
+ printf( __( 'Check out cache-busting in <a href="%s" target="_blank">Advanced Ads Pro</a> if dynamic features get cached.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor' ); ?></p><?php
44
  endif;
45
  ?>
46
  <fieldset>
78
  success: function (r, textStatus, XMLHttpRequest) {
79
  // add
80
  if (r) {
81
+ var connector = '<input type="checkbox" name="<?php echo Advanced_Ads_Visitor_Conditions::FORM_NAME; ?>[' + visitor_condition_index + '][connector]" value="and" id="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><label for="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><?php _e( 'and', 'advanced-ads' ); ?></label>';
82
+ var newline = '<tr class="advads-conditions-connector advads-conditions-connector-and"><td colspan="3">'+connector+'</td></tr><tr><td>' + visitor_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-conditions-remove button">x</button></td></tr>';
83
  $( '#advads-visitor-conditions table tbody' ).append( newline );
84
  if ( jQuery.fn.advads_button ) {
85
  $('#advads-visitor-conditions table tbody .advads-conditions-connector input').advads_button();
96
  }
97
  });
98
  });
 
 
 
 
99
  });
100
  </script>
101
  <?php $options = $ad->options( 'visitor' );
advanced-ads.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.7.11
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
39
  // general and global slug, e.g. to store options in WP, textdomain
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.7.11' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.7.12
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
39
  // general and global slug, e.g. to store options in WP, textdomain
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
+ define( 'ADVADS_VERSION', '1.7.12' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
classes/ad-debug.php CHANGED
@@ -57,8 +57,8 @@ class Advanced_Ads_Ad_Debug {
57
  $content[] = $this->build_display_conditions_table( $ad );
58
  $content[] = $this->build_visitor_conditions_table( $ad );
59
 
60
- if ( $this->check_http( $ad ) ) {
61
- $content[] = sprintf( '<span style="color: red;">%s</span>', __( 'The current URL is HTTPS, but the ad code contains HTTP', 'advanced-ads' ) );
62
  }
63
 
64
  $content = apply_filters( 'advanced-ads-ad-output-debug-content', $content, $ad );
@@ -82,7 +82,7 @@ class Advanced_Ads_Ad_Debug {
82
  *
83
  * @since 1.7.0.3
84
  */
85
- private function build_query_diff_table(){
86
 
87
  global $wp_query, $wp_the_query;
88
 
@@ -110,16 +110,15 @@ class Advanced_Ads_Ad_Debug {
110
  * @param obj Advanced_Ads_Ad
111
  * @return string
112
  */
113
- public function build_call_chain( Advanced_Ads_Ad $ad ) {
114
  ob_start();
115
 
116
  $options = $ad->options();
117
 
118
  printf( '%s: %s (%s)', __( 'Ad', 'advanced-ads' ), esc_html( $ad->title ), $ad->id );
119
 
120
- if ( isset( $options['group'] ) && $options['group'] instanceof Advanced_Ads_Group ) {
121
- $group = $ad->options( 'group' );
122
- printf( '<br />%s: %s (%s)', _x( 'Ad Group', 'ad group singular name', 'advanced-ads' ), esc_html( $group->name ), $group->id );
123
  }
124
 
125
  if ( isset( $options['output']['placement_id'] ) ) {
@@ -180,6 +179,10 @@ class Advanced_Ads_Ad_Debug {
180
  if ( isset( $the_query['wp_the_query'] ) && is_array( $the_query['wp_the_query'] ) ) {
181
  $ad_vars = ( isset( $_condition['value'] ) && is_array( $_condition['value'] ) ) ? $_condition['value'] : array();
182
 
 
 
 
 
183
  foreach ( $the_query['wp_the_query'] as $_var => $_flag ) {
184
  printf( '<tr><td>%s</td><td>%s</td><td>%s</td></tr>',
185
  $_var,
@@ -258,9 +261,16 @@ class Advanced_Ads_Ad_Debug {
258
  * Check if the current URL is HTTPS, but the ad code contains HTTP.
259
  *
260
  * @param obj Advanced_Ads_Ad
261
- * @return bool
262
  */
263
- protected function check_http( Advanced_Ads_Ad $ad ) {
264
- is_ssl() && $ad->type === 'plain' && preg_match( '/http:\/\//i', $ad->prepare_frontend_output() );
 
 
 
 
 
 
 
265
  }
266
- }
57
  $content[] = $this->build_display_conditions_table( $ad );
58
  $content[] = $this->build_visitor_conditions_table( $ad );
59
 
60
+ if ( $message = self::is_https_and_http( $ad ) ) {
61
+ $content[] = sprintf( '<span style="color: red;">%s</span>', $message );
62
  }
63
 
64
  $content = apply_filters( 'advanced-ads-ad-output-debug-content', $content, $ad );
82
  *
83
  * @since 1.7.0.3
84
  */
85
+ protected function build_query_diff_table(){
86
 
87
  global $wp_query, $wp_the_query;
88
 
110
  * @param obj Advanced_Ads_Ad
111
  * @return string
112
  */
113
+ protected function build_call_chain( Advanced_Ads_Ad $ad ) {
114
  ob_start();
115
 
116
  $options = $ad->options();
117
 
118
  printf( '%s: %s (%s)', __( 'Ad', 'advanced-ads' ), esc_html( $ad->title ), $ad->id );
119
 
120
+ if ( isset( $options['group_info']['id'] ) && isset( $options['group_info']['name'] ) ) {
121
+ printf( '<br />%s: %s (%s)', _x( 'Ad Group', 'ad group singular name', 'advanced-ads' ), esc_html( $options['group_info']['name'] ), $options['group_info']['id'] );
 
122
  }
123
 
124
  if ( isset( $options['output']['placement_id'] ) ) {
179
  if ( isset( $the_query['wp_the_query'] ) && is_array( $the_query['wp_the_query'] ) ) {
180
  $ad_vars = ( isset( $_condition['value'] ) && is_array( $_condition['value'] ) ) ? $_condition['value'] : array();
181
 
182
+ if ( in_array( 'is_front_page', $ad_vars ) ) {
183
+ $ad_vars[] = 'is_home';
184
+ }
185
+
186
  foreach ( $the_query['wp_the_query'] as $_var => $_flag ) {
187
  printf( '<tr><td>%s</td><td>%s</td><td>%s</td></tr>',
188
  $_var,
261
  * Check if the current URL is HTTPS, but the ad code contains HTTP.
262
  *
263
  * @param obj Advanced_Ads_Ad
264
+ * @return bool false/string
265
  */
266
+ public static function is_https_and_http( Advanced_Ads_Ad $ad ) {
267
+ if ( is_ssl()
268
+ && $ad->type === 'plain'
269
+ && preg_match( '/http:\/\//i', $ad->content )
270
+ ) {
271
+ return __( 'Your website is using HTTPS, but the ad code contains HTTP and might not work.', 'advanced-ads' );
272
+ }
273
+
274
+ return false;
275
  }
276
+ }
classes/ad.php CHANGED
@@ -267,7 +267,6 @@ class Advanced_Ads_Ad {
267
  $user_can_manage_ads = current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') );
268
  if( isset( $this->output['debugmode'] )
269
  && ( $user_can_manage_ads || ( ! $user_can_manage_ads && ! defined('ADVANCED_ADS_AD_DEBUG_FOR_ADMIN_ONLY') ) ) ){
270
- require_once __DIR__ . '/ad-debug.php';
271
  $debug = new Advanced_Ads_Ad_Debug;
272
  return $debug->prepare_debug_output( $this );
273
  } else {
@@ -278,7 +277,7 @@ class Advanced_Ads_Ad {
278
  $advads = Advanced_Ads::get_instance();
279
  if ( $output_options['global_output'] ) {
280
  $new_ad = array('type' => 'ad', 'id' => $this->id, 'title' => $this->title, 'output' => $output);
281
- if ( class_exists( 'Advanced_ads_Tracking_Plugin', false ) ) {
282
  $new_ad['tracking_enabled'] = Advanced_ads_Tracking_Plugin::get_instance()->check_ad_tracking_enabled( $this );
283
  }
284
  $advads->current_ads[] = $new_ad;
267
  $user_can_manage_ads = current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') );
268
  if( isset( $this->output['debugmode'] )
269
  && ( $user_can_manage_ads || ( ! $user_can_manage_ads && ! defined('ADVANCED_ADS_AD_DEBUG_FOR_ADMIN_ONLY') ) ) ){
 
270
  $debug = new Advanced_Ads_Ad_Debug;
271
  return $debug->prepare_debug_output( $this );
272
  } else {
277
  $advads = Advanced_Ads::get_instance();
278
  if ( $output_options['global_output'] ) {
279
  $new_ad = array('type' => 'ad', 'id' => $this->id, 'title' => $this->title, 'output' => $output);
280
+ if ( method_exists( 'Advanced_ads_Tracking_Plugin' , 'check_ad_tracking_enabled' ) ) {
281
  $new_ad['tracking_enabled'] = Advanced_ads_Tracking_Plugin::get_instance()->check_ad_tracking_enabled( $this );
282
  }
283
  $advads->current_ads[] = $new_ad;
classes/ad_ajax_callbacks.php CHANGED
@@ -57,6 +57,7 @@ class Advanced_Ads_Ad_Ajax_Callbacks {
57
  if ( ! empty($types[$type]) && method_exists( $types[$type], 'render_parameters' ) ) {
58
  $types[$type]->render_parameters( $ad );
59
 
 
60
  include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
61
  }
62
 
57
  if ( ! empty($types[$type]) && method_exists( $types[$type], 'render_parameters' ) ) {
58
  $types[$type]->render_parameters( $ad );
59
 
60
+ include ADVADS_BASE_PATH . 'admin/views/ad-parameters-warnings.php';
61
  include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
62
  }
63
 
classes/ad_group.php CHANGED
@@ -128,8 +128,6 @@ class Advanced_Ads_Group {
128
  $this->description = $group->description;
129
  $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
130
  $this->ad_args = $ad_args;
131
- // allow access to the group from ads
132
- $this->ad_args['group'] = $this;
133
 
134
  $this->load_additional_attributes();
135
  }
@@ -179,7 +177,12 @@ class Advanced_Ads_Group {
179
  $ad_select = Advanced_Ads_Select::get_instance();
180
 
181
  // the Advanced_Ads_Ad obj can access this info
182
- $this->ad_args['group_info'] = array( 'refresh_enabled' => ! empty( $this->options['refresh']['enabled'] ), 'type' => $this->type );
 
 
 
 
 
183
 
184
  if( is_array( $ordered_ad_ids ) ){
185
  foreach ( $ordered_ad_ids as $_ad_id ) {
128
  $this->description = $group->description;
129
  $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
130
  $this->ad_args = $ad_args;
 
 
131
 
132
  $this->load_additional_attributes();
133
  }
177
  $ad_select = Advanced_Ads_Select::get_instance();
178
 
179
  // the Advanced_Ads_Ad obj can access this info
180
+ $this->ad_args['group_info'] = array(
181
+ 'id' => $this->id,
182
+ 'name' => $this->name,
183
+ 'type' => $this->type,
184
+ 'refresh_enabled' => ! empty( $this->options['refresh']['enabled'] ),
185
+ );
186
 
187
  if( is_array( $ordered_ad_ids ) ){
188
  foreach ( $ordered_ad_ids as $_ad_id ) {
classes/ad_placements.php CHANGED
@@ -53,8 +53,8 @@ class Advanced_Ads_Placements {
53
  'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-after.png'
54
  ),
55
  'post_content' => array(
56
- 'title' => __( 'Post Content', 'advanced-ads' ),
57
- 'description' => __( 'Injected into the post content. You can choose the paragraph after which the ad content is displayed.', 'advanced-ads' ),
58
  'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-within.png'
59
  ),
60
  'sidebar_widget' => array(
53
  'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-after.png'
54
  ),
55
  'post_content' => array(
56
+ 'title' => __( 'Content', 'advanced-ads' ),
57
+ 'description' => __( 'Injected into the content. You can choose the paragraph after which the ad content is displayed.', 'advanced-ads' ),
58
  'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-within.png'
59
  ),
60
  'sidebar_widget' => array(
classes/ad_type_content.php CHANGED
@@ -70,6 +70,7 @@ class Advanced_Ads_Ad_Type_Content extends Advanced_Ads_Ad_Type_Abstract{
70
  );
71
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
72
  } ?><br class="clear"/><?php
 
73
  }
74
 
75
  /**
70
  );
71
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
72
  } ?><br class="clear"/><?php
73
+ include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php';
74
  }
75
 
76
  /**
classes/ad_type_plain.php CHANGED
@@ -51,6 +51,7 @@ class Advanced_Ads_Ad_Type_Plain extends Advanced_Ads_Ad_Type_Abstract{
51
 
52
  ?><p class="description"><?php _e( 'Insert plain text or code into this field.', 'advanced-ads' ); ?></p>
53
  <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
 
54
  <input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
55
  <?php $this->render_php_allow($ad);
56
  }
51
 
52
  ?><p class="description"><?php _e( 'Insert plain text or code into this field.', 'advanced-ads' ); ?></p>
53
  <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
54
+ <?php include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php'; ?>
55
  <input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
56
  <?php $this->render_php_allow($ad);
57
  }
classes/checks.php CHANGED
@@ -27,11 +27,14 @@ class Advanced_Ads_Checks {
27
  * @return bool true if active
28
  */
29
  public static function cache(){
30
-
31
- if( ( defined( 'WP_CACHE' ) && WP_CACHE ) // general cache constant
32
  || defined('W3TC') // W3 Total Cache
33
  || function_exists( 'wp_super_cache_text_domain' ) // WP SUper Cache
34
  || class_exists('zencache\\plugin') // ZenCache
 
 
 
 
35
  ){
36
  return true;
37
  }
27
  * @return bool true if active
28
  */
29
  public static function cache(){
30
+ if ( ( defined( 'WP_CACHE' ) && WP_CACHE ) // general cache constant
 
31
  || defined('W3TC') // W3 Total Cache
32
  || function_exists( 'wp_super_cache_text_domain' ) // WP SUper Cache
33
  || class_exists('zencache\\plugin') // ZenCache
34
+ || defined( 'WP_ROCKET_SLUG' ) //WP Rocket
35
+ || defined( 'WPFC_WP_CONTENT_DIR' ) //WP Fastest Cache
36
+ || class_exists( 'HyperCache' ) // Hyper Cache
37
+ || defined( 'CE_CACHE_DIR' ) // Cache Enabler
38
  ){
39
  return true;
40
  }
classes/display-conditions.php CHANGED
@@ -201,8 +201,8 @@ class Advanced_Ads_Display_Conditions {
201
  // options
202
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
203
  <select name="<?php echo $name; ?>[operator]">
204
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
205
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads' ); ?></option>
206
  </select><?php
207
 
208
  // set defaults
@@ -254,8 +254,8 @@ class Advanced_Ads_Display_Conditions {
254
  $name = self::FORM_NAME . '[' . $index . ']';
255
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
256
  <select name="<?php echo $name; ?>[operator]">
257
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
258
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
259
  </select><?php
260
  // set defaults
261
  $authors = get_users(array('who' => 'authors', 'orderby' => 'nicename', 'number' => 50));
@@ -307,8 +307,8 @@ class Advanced_Ads_Display_Conditions {
307
  $name = self::FORM_NAME . '[' . $index . ']';
308
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
309
  <select name="<?php echo $name; ?>[operator]">
310
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
311
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
312
  </select><?php
313
  ?><div class="advads-conditions-single advads-buttonset"><?php
314
  self::display_term_list($taxonomy, $values, $name . '[value][]', $max_terms, $index);
@@ -382,8 +382,8 @@ class Advanced_Ads_Display_Conditions {
382
  $name = self::FORM_NAME . '[' . $index . ']';
383
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
384
  <select name="<?php echo $name; ?>[operator]">
385
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
386
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
387
  </select><?php ?><div class="advads-conditions-single advads-buttonset advads-conditions-postid-buttons"><?php
388
  // query active post ids
389
  if ($values != array()) {
201
  // options
202
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
203
  <select name="<?php echo $name; ?>[operator]">
204
+ <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
205
+ <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads' ); ?></option>
206
  </select><?php
207
 
208
  // set defaults
254
  $name = self::FORM_NAME . '[' . $index . ']';
255
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
256
  <select name="<?php echo $name; ?>[operator]">
257
+ <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
258
+ <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads'); ?></option>
259
  </select><?php
260
  // set defaults
261
  $authors = get_users(array('who' => 'authors', 'orderby' => 'nicename', 'number' => 50));
307
  $name = self::FORM_NAME . '[' . $index . ']';
308
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
309
  <select name="<?php echo $name; ?>[operator]">
310
+ <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
311
+ <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads'); ?></option>
312
  </select><?php
313
  ?><div class="advads-conditions-single advads-buttonset"><?php
314
  self::display_term_list($taxonomy, $values, $name . '[value][]', $max_terms, $index);
382
  $name = self::FORM_NAME . '[' . $index . ']';
383
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
384
  <select name="<?php echo $name; ?>[operator]">
385
+ <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
386
+ <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads'); ?></option>
387
  </select><?php ?><div class="advads-conditions-single advads-buttonset advads-conditions-postid-buttons"><?php
388
  // query active post ids
389
  if ($values != array()) {
classes/visitor-conditions.php CHANGED
@@ -29,7 +29,7 @@ class Advanced_Ads_Visitor_Conditions {
29
  // register conditions
30
  $this->conditions = apply_filters( 'advanced-ads-visitor-conditions', array(
31
  'mobile' => array( // type of the condition
32
- 'label' => __( 'mobile device', 'advanced-ads' ),
33
  'description' => __( 'Display ads only on mobile devices or hide them.', 'advanced-ads' ),
34
  'metabox' => array( 'Advanced_Ads_Visitor_Conditions', 'mobile_is_or_not' ), // callback to generate the metabox
35
  'check' => array( 'Advanced_Ads_Visitor_Conditions', 'check_mobile' ), // callback for frontend check
@@ -66,11 +66,36 @@ class Advanced_Ads_Visitor_Conditions {
66
  * @param int $index index of the condition
67
  */
68
  static function mobile_is_or_not( $options, $index = 0 ){
69
-
70
- self::metabox_is_or_not($options, $index);
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  if( ! defined( 'AAR_SLUG' ) ){
73
- echo '<p>' . sprintf(__( 'Pro: Display ads by the available space on the device using the <a href="%s" target="_blank">Responsive add-on</a>', ADVADS_SLUG ), ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor-responsive') . '</p>';
74
  }
75
  }
76
 
@@ -284,13 +309,6 @@ class Advanced_Ads_Visitor_Conditions {
284
  $operator = $options['operator'];
285
  $value = $options['value'];
286
 
287
- // check length of url
288
- if( $operator !== 'regex' && $operator !== 'regex_not' ){
289
- if ( strlen( $value ) > strlen( $string ) ) {
290
- return false;
291
- }
292
- }
293
-
294
  // check the condition by mode and bool
295
  $condition = true;
296
  switch ( $operator ){
@@ -298,12 +316,10 @@ class Advanced_Ads_Visitor_Conditions {
298
  case 'contain' :
299
  $condition = stripos( $string, $value ) !== false;
300
  break;
301
-
302
  // referrer does not contain string on any position
303
  case 'contain_not' :
304
  $condition = stripos( $string, $value ) === false;
305
  break;
306
-
307
  // referrer starts with the string
308
  case 'start' :
309
  $condition = stripos( $string, $value ) === 0;
@@ -314,21 +330,12 @@ class Advanced_Ads_Visitor_Conditions {
314
  break;
315
  // referrer ends with the string
316
  case 'end' :
317
- // check if string is longer than referrer
318
- $strlen = strlen( $string );
319
- $vallen = strlen( $value );
320
-
321
- $condition = substr_compare( $string, $value, $strlen - $vallen, $vallen, true ) === 0;
322
  break;
323
  // referrer does not end with the string
324
  case 'end_not' :
325
- // check if string is longer than referrer
326
- $strlen = strlen( $string );
327
- $vallen = strlen( $value );
328
-
329
- $condition = substr_compare( $string, $value, $strlen - $vallen, $vallen, true ) !== 0;
330
  break;
331
-
332
  // referrer is equal to the string
333
  case 'match' :
334
  // strings do match, but should not or not match but should
29
  // register conditions
30
  $this->conditions = apply_filters( 'advanced-ads-visitor-conditions', array(
31
  'mobile' => array( // type of the condition
32
+ 'label' => __( 'device', 'advanced-ads' ),
33
  'description' => __( 'Display ads only on mobile devices or hide them.', 'advanced-ads' ),
34
  'metabox' => array( 'Advanced_Ads_Visitor_Conditions', 'mobile_is_or_not' ), // callback to generate the metabox
35
  'check' => array( 'Advanced_Ads_Visitor_Conditions', 'check_mobile' ), // callback for frontend check
66
  * @param int $index index of the condition
67
  */
68
  static function mobile_is_or_not( $options, $index = 0 ){
 
 
69
 
70
+ if ( ! isset ( $options['type'] ) || '' === $options['type'] ) { return; }
71
+
72
+ $type_options = self::get_instance()->conditions;
73
+
74
+ if ( ! isset( $type_options[ $options['type'] ] ) ) {
75
+ return;
76
+ }
77
+
78
+ // form name basis
79
+ $name = self::FORM_NAME . '[' . $index . ']';
80
+
81
+ // options
82
+ $operator = isset( $options['operator'] ) ? $options['operator'] : 'is';
83
+
84
+ ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
85
+ <select name="<?php echo $name; ?>[operator]">
86
+ <option value="is" <?php selected( 'is', $operator ); ?>><?php _e( 'Mobile (including tablets)', 'advanced-ads' ); ?></option>
87
+ <option value="is_not" <?php selected( 'is_not', $operator ); ?>><?php _e( 'Desktop', 'advanced-ads' ); ?></option>
88
+ </select>
89
+ <p class="description"><?php echo $type_options[ $options['type'] ]['description'];
90
+ if( isset( $type_options[ $options['type'] ]['helplink'] ) ) : ?>
91
+ <a href="<?php echo $type_options[ $options['type'] ]['helplink']; ?>" target="_blank"><?php
92
+ _e( 'Manual and Troubleshooting', 'advanced-ads' );
93
+ ?></a><?php endif; ?></p><?php
94
+
95
+ if ( ! isset ( $options['type'] ) || '' === $options['type'] ) { return; }
96
+
97
  if( ! defined( 'AAR_SLUG' ) ){
98
+ echo '<p>' . sprintf(__( 'Display ads by the available space on the device or target tablets with the <a href="%s" target="_blank">Responsive add-on</a>', ADVADS_SLUG ), ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor-responsive') . '</p>';
99
  }
100
  }
101
 
309
  $operator = $options['operator'];
310
  $value = $options['value'];
311
 
 
 
 
 
 
 
 
312
  // check the condition by mode and bool
313
  $condition = true;
314
  switch ( $operator ){
316
  case 'contain' :
317
  $condition = stripos( $string, $value ) !== false;
318
  break;
 
319
  // referrer does not contain string on any position
320
  case 'contain_not' :
321
  $condition = stripos( $string, $value ) === false;
322
  break;
 
323
  // referrer starts with the string
324
  case 'start' :
325
  $condition = stripos( $string, $value ) === 0;
330
  break;
331
  // referrer ends with the string
332
  case 'end' :
333
+ $condition = $value === substr( $string, -strlen( $value ) );
 
 
 
 
334
  break;
335
  // referrer does not end with the string
336
  case 'end_not' :
337
+ $condition = $value !== substr( $string, -strlen( $value ) );
 
 
 
 
338
  break;
 
339
  // referrer is equal to the string
340
  case 'match' :
341
  // strings do match, but should not or not match but should
languages/advanced-ads-es_ES.po CHANGED
@@ -736,7 +736,7 @@ msgstr "Contenido de la Entrada"
736
 
737
  #: classes/ad_placements.php:57
738
  msgid ""
739
- "Injected into the post content. You can choose the paragraph after which the "
740
  "ad content is displayed."
741
  msgstr ""
742
  "Inyectado en el contenido de la entrada. Puedes elegir el párrafo en el que "
736
 
737
  #: classes/ad_placements.php:57
738
  msgid ""
739
+ "Injected into the content. You can choose the paragraph after which the "
740
  "ad content is displayed."
741
  msgstr ""
742
  "Inyectado en el contenido de la entrada. Puedes elegir el párrafo en el que "
languages/advanced-ads-fr_FR.po CHANGED
@@ -571,7 +571,7 @@ msgstr "Contenu d’article"
571
 
572
  #: classes/ad_placements.php:57
573
  msgid ""
574
- "Injected into the post content. You can choose the paragraph after which the "
575
  "ad content is displayed."
576
  msgstr ""
577
  "Injecté dans le contenu de l’article. Vous pouvez choisir le paragraphe "
571
 
572
  #: classes/ad_placements.php:57
573
  msgid ""
574
+ "Injected into the content. You can choose the paragraph after which the "
575
  "ad content is displayed."
576
  msgstr ""
577
  "Injecté dans le contenu de l’article. Vous pouvez choisir le paragraphe "
languages/advanced-ads-it_IT.po CHANGED
@@ -2494,7 +2494,7 @@ msgstr "Injected dopo il contenuto del post."
2494
 
2495
  #: ../classes/ad_placements.php:57
2496
  msgid ""
2497
- "Injected into the post content. You can choose the paragraph after which the "
2498
  "ad content is displayed."
2499
  msgstr ""
2500
  "Injected nel contenuto di un articolo. Puoi scegliere il paragrafo dopo il "
2494
 
2495
  #: ../classes/ad_placements.php:57
2496
  msgid ""
2497
+ "Injected into the content. You can choose the paragraph after which the "
2498
  "ad content is displayed."
2499
  msgstr ""
2500
  "Injected nel contenuto di un articolo. Puoi scegliere il paragrafo dopo il "
languages/advanced-ads-nl_NL.po CHANGED
@@ -2355,7 +2355,7 @@ msgstr "In de content"
2355
 
2356
  #: ../classes/ad_placements.php:57
2357
  msgid ""
2358
- "Injected into the post content. You can choose the paragraph after which the "
2359
  "ad content is displayed."
2360
  msgstr ""
2361
  "Geïnjecteerd in de post content. U kunt een paragraaf kiezen achter welke de "
2355
 
2356
  #: ../classes/ad_placements.php:57
2357
  msgid ""
2358
+ "Injected into the content. You can choose the paragraph after which the "
2359
  "ad content is displayed."
2360
  msgstr ""
2361
  "Geïnjecteerd in de post content. U kunt een paragraaf kiezen achter welke de "
languages/advanced-ads-pt_BR.po CHANGED
@@ -599,7 +599,7 @@ msgstr "Conteúdo do Post"
599
 
600
  #: classes/ad_placements.php:57
601
  msgid ""
602
- "Injected into the post content. You can choose the paragraph after which the "
603
  "ad content is displayed."
604
  msgstr ""
605
  "Inserido no conteúdo do post. Você pode escolher o parágrafo em que o "
599
 
600
  #: classes/ad_placements.php:57
601
  msgid ""
602
+ "Injected into the content. You can choose the paragraph after which the "
603
  "ad content is displayed."
604
  msgstr ""
605
  "Inserido no conteúdo do post. Você pode escolher o parágrafo em que o "
languages/advanced-ads.po CHANGED
@@ -1925,7 +1925,7 @@ msgstr ""
1925
 
1926
  #: ../classes/ad_placements.php:57
1927
  msgid ""
1928
- "Injected into the post content. You can choose the paragraph after which the "
1929
  "ad content is displayed."
1930
  msgstr ""
1931
 
1925
 
1926
  #: ../classes/ad_placements.php:57
1927
  msgid ""
1928
+ "Injected into the content. You can choose the paragraph after which the "
1929
  "ad content is displayed."
1930
  msgstr ""
1931
 
modules/ad-blocker/classes/plugin.php CHANGED
@@ -84,7 +84,7 @@ class Advanced_Ads_Ad_Blocker
84
  if( isset( $options['folder_name'] ) && $options['folder_name'] != '' )
85
  {
86
  // Loop through all script files and change the URL from which they are loaded
87
- foreach( $wp_scripts->registered as $script )
88
  {
89
  if( strpos( $script->src, 'advanced-ads' ) !== false )
90
  {
@@ -93,7 +93,7 @@ class Advanced_Ads_Ad_Blocker
93
  }
94
 
95
  // Loop through all style files and change the URL from which they are loaded
96
- foreach( $wp_styles->registered as $style )
97
  {
98
  if( strpos( $style->src, 'advanced-ads' ) !== false )
99
  {
84
  if( isset( $options['folder_name'] ) && $options['folder_name'] != '' )
85
  {
86
  // Loop through all script files and change the URL from which they are loaded
87
+ if( is_array( $wp_scripts->registered ) )foreach( $wp_scripts->registered as $script )
88
  {
89
  if( strpos( $script->src, 'advanced-ads' ) !== false )
90
  {
93
  }
94
 
95
  // Loop through all style files and change the URL from which they are loaded
96
+ if( is_array( $wp_styles->registered ) ) foreach( $wp_styles->registered as $style )
97
  {
98
  if( strpos( $style->src, 'advanced-ads' ) !== false )
99
  {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webzunft
3
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
4
  Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
5
  Requires at least: WP 4.2, PHP 5.3
6
- Tested up to: 4.6.1
7
- Stable tag: 1.7.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -79,7 +79,7 @@ global conditions
79
 
80
  display ads by conditions based on the visitor. [List of all visitor conditions](https://wpadvancedads.com/manual/visitor-conditions/)
81
 
82
- * display or hide a banner for mobile visitors
83
  * display or hide a banner for logged in visitors
84
  * hide advertising from logged in users based on their role
85
  * advanced visitor conditions: previous visited url (referrer), user capability, browser language, browser and device, url parameters included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
@@ -105,7 +105,7 @@ You can also use it to insert additional ad network tags into header or footer o
105
 
106
  = best support for mobile devices =
107
 
108
- * display ads for mobile or desktop only
109
  * display responsive image ads (WordPress 4.4 and later)
110
  * ads for specific browser sizes only using [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/)
111
 
@@ -206,6 +206,21 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
206
 
207
  == Changelog ==
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  = 1.7.11 =
210
 
211
  * added filter to change General display conditions set
3
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
4
  Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
5
  Requires at least: WP 4.2, PHP 5.3
6
+ Tested up to: 4.7
7
+ Stable tag: 1.7.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
79
 
80
  display ads by conditions based on the visitor. [List of all visitor conditions](https://wpadvancedads.com/manual/visitor-conditions/)
81
 
82
+ * display or hide a banner by device: mobile and tablet or desktop
83
  * display or hide a banner for logged in visitors
84
  * hide advertising from logged in users based on their role
85
  * advanced visitor conditions: previous visited url (referrer), user capability, browser language, browser and device, url parameters included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
105
 
106
  = best support for mobile devices =
107
 
108
+ * display ads for mobile and tablets or desktop only
109
  * display responsive image ads (WordPress 4.4 and later)
110
  * ads for specific browser sizes only using [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/)
111
 
206
 
207
  == Changelog ==
208
 
209
+ = 1.7.12 =
210
+
211
+ * better highlighting of AND and OR connectors in display and visitor conditions
212
+ * removed general conditions as default from display conditions
213
+ * highlighted video and manual links for conditions
214
+ * show is_home and is_front_page as the same item in ad debug mode
215
+ * show warning if plain ad code contains HTTP, but the website is using HTTPS
216
+ * added notice if add-on licenses expired to plugin page
217
+ * changed "mobile device" into "device" condition with better option descriptions (mobile + tablet | desktop)
218
+ * changed "Post Content" placement label into "Content" since it is used for all post types
219
+ * hide manage ads link in dashboard widget from users who can not edit ads
220
+ * fixed dependency issue with Tracking add-on
221
+ * fixed dependency issue with AJAX cache-busting
222
+ * fixed missing scripts for ad block disguise
223
+
224
  = 1.7.11 =
225
 
226
  * added filter to change General display conditions set
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInite6273508b675f05c5fcae8d513372338::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit6e590c8f788597289790b8a2042eb075::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -10,6 +10,7 @@ return array(
10
  'Advanced_Ads' => $baseDir . '/public/class-advanced-ads.php',
11
  'Advanced_Ads_Ad' => $baseDir . '/classes/ad.php',
12
  'Advanced_Ads_Ad_Ajax_Callbacks' => $baseDir . '/classes/ad_ajax_callbacks.php',
 
13
  'Advanced_Ads_Ad_Type_Abstract' => $baseDir . '/classes/ad_type_abstract.php',
14
  'Advanced_Ads_Ad_Type_Content' => $baseDir . '/classes/ad_type_content.php',
15
  'Advanced_Ads_Ad_Type_Group' => $baseDir . '/classes/ad_type_group.php',
10
  'Advanced_Ads' => $baseDir . '/public/class-advanced-ads.php',
11
  'Advanced_Ads_Ad' => $baseDir . '/classes/ad.php',
12
  'Advanced_Ads_Ad_Ajax_Callbacks' => $baseDir . '/classes/ad_ajax_callbacks.php',
13
+ 'Advanced_Ads_Ad_Debug' => $baseDir . '/classes/ad-debug.php',
14
  'Advanced_Ads_Ad_Type_Abstract' => $baseDir . '/classes/ad_type_abstract.php',
15
  'Advanced_Ads_Ad_Type_Content' => $baseDir . '/classes/ad_type_content.php',
16
  'Advanced_Ads_Ad_Type_Group' => $baseDir . '/classes/ad_type_group.php',
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInite6273508b675f05c5fcae8d513372338 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInite6273508b675f05c5fcae8d513372338 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInite6273508b675f05c5fcae8d513372338', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInite6273508b675f05c5fcae8d513372338', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit6e590c8f788597289790b8a2042eb075 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6e590c8f788597289790b8a2042eb075', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6e590c8f788597289790b8a2042eb075', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/autoload_static.php CHANGED
@@ -35,6 +35,7 @@ class ComposerStaticInitd24de3c06687d3cf4aad0b15c83747be
35
  'Advanced_Ads' => __DIR__ . '/../..' . '/public/class-advanced-ads.php',
36
  'Advanced_Ads_Ad' => __DIR__ . '/../..' . '/classes/ad.php',
37
  'Advanced_Ads_Ad_Ajax_Callbacks' => __DIR__ . '/../..' . '/classes/ad_ajax_callbacks.php',
 
38
  'Advanced_Ads_Ad_Type_Abstract' => __DIR__ . '/../..' . '/classes/ad_type_abstract.php',
39
  'Advanced_Ads_Ad_Type_Content' => __DIR__ . '/../..' . '/classes/ad_type_content.php',
40
  'Advanced_Ads_Ad_Type_Group' => __DIR__ . '/../..' . '/classes/ad_type_group.php',
35
  'Advanced_Ads' => __DIR__ . '/../..' . '/public/class-advanced-ads.php',
36
  'Advanced_Ads_Ad' => __DIR__ . '/../..' . '/classes/ad.php',
37
  'Advanced_Ads_Ad_Ajax_Callbacks' => __DIR__ . '/../..' . '/classes/ad_ajax_callbacks.php',
38
+ 'Advanced_Ads_Ad_Debug' => __DIR__ . '/../..' . '/classes/ad-debug.php',
39
  'Advanced_Ads_Ad_Type_Abstract' => __DIR__ . '/../..' . '/classes/ad_type_abstract.php',
40
  'Advanced_Ads_Ad_Type_Content' => __DIR__ . '/../..' . '/classes/ad_type_content.php',
41
  'Advanced_Ads_Ad_Type_Group' => __DIR__ . '/../..' . '/classes/ad_type_group.php',