Advanced Ads - Version 1.17.11

Version Description

  • added Datanyze and Ecosia to bots list
  • linked to Google Ad Manager Integration
  • fixed Layout Key field for AdSense ads not saving new values
  • fixed error that broke the wizard when the URL field of image ads contained a wrong value
  • fixed links to manuals
  • fixed unneeded notification shown when ads are disabled on 404 pages
Download this release

Release Info

Developer advancedads
Plugin Icon 128x128 Advanced Ads
Version 1.17.11
Comparing to
See all releases

Code changes from version 1.17.10 to 1.17.11

admin/assets/css/admin.css CHANGED
@@ -186,7 +186,7 @@ select + .advads-conditions-single { padding-left: 10px }
186
  .advads-option > span + div label + label { margin-left: 1em; }
187
  .advads-option > span + div ul { margin: 0; }
188
  .advads-option > span + div select { vertical-align: top; }
189
- .advads-option > div > .description { max-width: 50%; }
190
  .advads-option + .advads-option { margin-top: 20px; }
191
  .advads-option input, .advads-option select { background: transparent; }
192
 
186
  .advads-option > span + div label + label { margin-left: 1em; }
187
  .advads-option > span + div ul { margin: 0; }
188
  .advads-option > span + div select { vertical-align: top; }
189
+ .advads-option > div > .description { max-width: 80%; }
190
  .advads-option + .advads-option { margin-top: 20px; }
191
  .advads-option input, .advads-option select { background: transparent; }
192
 
admin/assets/img/placements/background.png ADDED
Binary file
admin/assets/img/placements/bbpress-reply.png ADDED
Binary file
admin/assets/img/placements/buddypress-icon.png ADDED
Binary file
admin/assets/img/placements/content-above-headline.png ADDED
Binary file
admin/assets/img/placements/content-middle.png ADDED
Binary file
admin/assets/img/placements/post-list.png ADDED
Binary file
admin/assets/js/wizard.js CHANGED
@@ -38,6 +38,9 @@ var advads_wizard = {
38
  jQuery( this.current_box ).removeClass('advads-hide');
39
  },
40
  start: function(){ // do stuff when wizard is started
 
 
 
41
  // show page in 1-column stype
42
  this.status = true;
43
  if( jQuery( '#post-body').hasClass('columns-1') ){
@@ -97,7 +100,34 @@ var advads_wizard = {
97
  jQuery('#advads-wizard-controls-save').removeClass('hidden');
98
  }
99
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  next: function(){ // show next box
 
 
 
101
  if( ! this.status ){ return }
102
  // get index of current item in box-array
103
  var i = this.box_order.indexOf( this.current_box );
@@ -113,6 +143,9 @@ var advads_wizard = {
113
  this.update_nav();
114
  },
115
  prev: function(){ // show previous box
 
 
 
116
  // get index of current item in box-array
117
  var i = this.box_order.indexOf( this.current_box );
118
  // check if there is a previous index
@@ -142,4 +175,4 @@ var advads_wizard = {
142
  jQuery( box ).find('.advads-show-in-wizard').hide();
143
  jQuery( box ).find('.advads-hide-in-wizard').show();
144
  },
145
- };
38
  jQuery( this.current_box ).removeClass('advads-hide');
39
  },
40
  start: function(){ // do stuff when wizard is started
41
+ if ( ! this.is_form_valid() ) {
42
+ return;
43
+ }
44
  // show page in 1-column stype
45
  this.status = true;
46
  if( jQuery( '#post-body').hasClass('columns-1') ){
100
  jQuery('#advads-wizard-controls-save').removeClass('hidden');
101
  }
102
  },
103
+
104
+ /**
105
+ * Check the form just before some of its fields become hidden.
106
+ *
107
+ * @param {HTMLFormElement} form Form.
108
+ * @return bool
109
+ */
110
+ is_form_valid: function() {
111
+ var form = jQuery( 'form#post' )[0];
112
+
113
+ if ( form.checkValidity && form.reportValidity ) {
114
+ if ( ! form.checkValidity() ) {
115
+ // Highlight invalid fields.
116
+ form.reportValidity()
117
+ return false;
118
+ }
119
+ return true;
120
+ } else {
121
+ // Disable validation so that hidden invalid fields do not prevent the form from being sent.
122
+ form.setAttribute( 'novalidate', true );
123
+ return true;
124
+ }
125
+
126
+ },
127
  next: function(){ // show next box
128
+ if ( ! this.is_form_valid() ) {
129
+ return;
130
+ }
131
  if( ! this.status ){ return }
132
  // get index of current item in box-array
133
  var i = this.box_order.indexOf( this.current_box );
143
  this.update_nav();
144
  },
145
  prev: function(){ // show previous box
146
+ if ( ! this.is_form_valid() ) {
147
+ return;
148
+ }
149
  // get index of current item in box-array
150
  var i = this.box_order.indexOf( this.current_box );
151
  // check if there is a previous index
175
  jQuery( box ).find('.advads-show-in-wizard').hide();
176
  jQuery( box ).find('.advads-hide-in-wizard').show();
177
  },
178
+ };
admin/class-advanced-ads-admin.php CHANGED
@@ -733,4 +733,17 @@ class Advanced_Ads_Admin {
733
  include ADVADS_BASE_PATH . 'admin/views/notices/starter-setup-success.php';
734
  }
735
 
 
 
 
 
 
 
 
 
 
 
 
 
 
736
  }
733
  include ADVADS_BASE_PATH . 'admin/views/notices/starter-setup-success.php';
734
  }
735
 
736
+ /**
737
+ * Show a Pro upsell pitch
738
+ *
739
+ * @param string $utm_campaign utm_campaign value to attach to the URL.
740
+ */
741
+ public static function pro_feature_link( $utm_campaign = '' ) {
742
+
743
+ $utm_parameter_base = '#utm_source=advanced-ads&utm_medium=link&utm_campaign=';
744
+ $utm_parameter = ( $utm_campaign ) ? $utm_parameter_base . $utm_campaign : $utm_parameter_base . 'pro_feature_link';
745
+
746
+ include ADVADS_BASE_PATH . 'admin/views/pitches/pro-feature-link.php';
747
+ }
748
+
749
  }
admin/includes/class-menu.php CHANGED
@@ -52,6 +52,7 @@ class Advanced_Ads_Admin_Menu {
52
  */
53
  public function add_plugin_admin_menu() {
54
 
 
55
  $has_ads = Advanced_Ads::get_number_of_ads();
56
 
57
  // get number of Ad Health notices.
52
  */
53
  public function add_plugin_admin_menu() {
54
 
55
+ // get number of ads including those in trash.
56
  $has_ads = Advanced_Ads::get_number_of_ads();
57
 
58
  // get number of Ad Health notices.
admin/includes/class-options.php CHANGED
@@ -37,7 +37,7 @@ class Advanced_Ads_Admin_Options {
37
  *
38
  * @param string $id internal id of the option wrapper.
39
  * @param string $title label of the option.
40
- * @param string $content content of the option.
41
  * @param string $description description of the option.
42
  */
43
  public static function render_option( $id, $title, $content, $description = '' ) {
@@ -52,14 +52,25 @@ class Advanced_Ads_Admin_Options {
52
  <span><?php echo esc_html( $title ); ?></span>
53
  <div>
54
  <?php
55
- // phpcs:ignore
56
- echo $content; // could include various HTML elements.
 
 
 
 
 
 
57
  ?>
58
  <?php
59
  if ( $description ) :
60
  // phpcs:ignore
61
  echo '<p class="description">' . $description . '</p>'; // could include various HTML elements.
62
- endif;
 
 
 
 
 
63
  ?>
64
  </div>
65
  </div>
37
  *
38
  * @param string $id internal id of the option wrapper.
39
  * @param string $title label of the option.
40
+ * @param string $content content of the option or full path to template file or custom flag to show a pre-defined information.
41
  * @param string $description description of the option.
42
  */
43
  public static function render_option( $id, $title, $content, $description = '' ) {
52
  <span><?php echo esc_html( $title ); ?></span>
53
  <div>
54
  <?php
55
+ if ( 'is_pro_pitch' === $content ) {
56
+ // skip this step and place an upgrade link below the description if there is one.
57
+ } elseif ( file_exists( $content ) ) {
58
+ include $content;
59
+ } else {
60
+ // phpcs:ignore
61
+ echo $content; // could include various HTML elements.
62
+ }
63
  ?>
64
  <?php
65
  if ( $description ) :
66
  // phpcs:ignore
67
  echo '<p class="description">' . $description . '</p>'; // could include various HTML elements.
68
+ endif;
69
+
70
+ // place an upgrade link below the description if there is one.
71
+ if ( 'is_pro_pitch' === $content ) {
72
+ Advanced_Ads_Admin::pro_feature_link( 'pitch-pro-' . $id );
73
+ }
74
  ?>
75
  </div>
76
  </div>
admin/includes/class-overview-widgets.php CHANGED
@@ -535,6 +535,13 @@ endif;
535
  $pro_content = ob_get_clean();
536
 
537
  $add_ons = array(
 
 
 
 
 
 
 
538
  'tracking' => array(
539
  'title' => 'Tracking',
540
  'desc' => __( 'Analyze clicks and impressions of your ads locally or in Google Analytics, share reports, and limit ads to a specific number of impressions or clicks.', 'advanced-ads' ),
@@ -547,17 +554,10 @@ endif;
547
  'link' => ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
548
  'order' => 4,
549
  ),
550
- 'pro' => array(
551
- 'title' => 'Advanced Ads Pro',
552
- 'desc' => $pro_content,
553
- 'link' => ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
554
- 'order' => 4,
555
- 'class' => 'recommended',
556
- ),
557
- 'selling' => array(
558
- 'title' => 'Selling Ads',
559
- 'desc' => __( 'Earn more money and let advertisers pay for ad space directly on the frontend of your site.', 'advanced-ads' ),
560
- 'link' => ADVADS_URL . 'add-ons/selling-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
561
  'order' => 5,
562
  ),
563
  'geo' => array(
@@ -578,11 +578,17 @@ endif;
578
  'link' => ADVADS_URL . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
579
  'order' => 5,
580
  ),
 
 
 
 
 
 
581
  'slider' => array(
582
  'title' => 'Ad Slider',
583
  'desc' => __( 'Create a beautiful and simple slider from your ads to show more information on less space.', 'advanced-ads' ),
584
  'link' => ADVADS_URL . 'add-ons/slider/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
585
- 'order' => 5,
586
  ),
587
  'adsense-in-feed' => array(
588
  'title' => 'AdSense In-feed',
@@ -610,7 +616,7 @@ endif;
610
  $add_ons['pro']['link_title'] = __( 'Activate now', 'advanced-ads' );
611
  $installed_pro_plugins++;
612
  } elseif ( class_exists( 'Advanced_Ads_Pro' ) ) {
613
- $add_ons['pro']['link'] = ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
614
  $add_ons['pro']['desc'] = '';
615
  $add_ons['pro']['installed'] = true;
616
  $add_ons['pro']['order'] = 20;
@@ -629,7 +635,7 @@ endif;
629
  $installed_pro_plugins++;
630
  } elseif ( class_exists( 'Advanced_Ads_Tracking_Plugin', false ) &&
631
  method_exists( Advanced_Ads_Tracking_Plugin::get_instance(), 'get_tracking_method' ) ) {
632
- $add_ons['tracking']['link'] = ADVADS_URL . 'add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
633
  if ( 'ga' !== Advanced_Ads_Tracking_Plugin::get_instance()->get_tracking_method() ) {
634
 
635
  // don’t show Tracking link if Analytics method is enabled.
@@ -653,7 +659,7 @@ endif;
653
  $add_ons['responsive']['link_title'] = __( 'Activate now', 'advanced-ads' );
654
  $installed_pro_plugins++;
655
  } elseif ( class_exists( 'Advanced_Ads_Responsive_Plugin' ) ) {
656
- $add_ons['responsive']['link'] = ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
657
  $add_ons['responsive']['desc'] = '<a href="' . admin_url( 'admin.php?page=responsive-ads-list' ) . '">' . __( 'List of responsive ads by browser width', 'advanced-ads-responsive' ) . '</a>';
658
  $add_ons['responsive']['installed'] = true;
659
  $add_ons['responsive']['order'] = 20;
@@ -665,13 +671,31 @@ endif;
665
  }
666
  }
667
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
668
  // STICKY.
669
  if ( isset( $installed_plugins['advanced-ads-sticky-ads/sticky-ads.php'] ) && ! class_exists( 'Advanced_Ads_Sticky_Plugin' ) ) { // is installed, but not active.
670
  $add_ons['sticky']['link'] = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=advanced-ads-sticky-ads/sticky-ads.php&amp', 'activate-plugin_advanced-ads-sticky-ads/sticky-ads.php' );
671
  $add_ons['sticky']['link_title'] = __( 'Activate now', 'advanced-ads' );
672
  $installed_pro_plugins++;
673
  } elseif ( class_exists( 'Advanced_Ads_Sticky_Plugin' ) ) {
674
- $add_ons['sticky']['link'] = ADVADS_URL . 'add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
675
  $add_ons['sticky']['desc'] = '';
676
  $add_ons['sticky']['installed'] = true;
677
  $add_ons['sticky']['order'] = 20;
@@ -689,7 +713,7 @@ endif;
689
  $add_ons['layer']['link_title'] = __( 'Activate now', 'advanced-ads' );
690
  $installed_pro_plugins++;
691
  } elseif ( class_exists( 'Advanced_Ads_Layer_Plugin' ) ) {
692
- $add_ons['layer']['link'] = ADVADS_URL . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
693
  $add_ons['layer']['desc'] = '';
694
  $add_ons['layer']['installed'] = true;
695
  $add_ons['layer']['order'] = 20;
@@ -707,7 +731,7 @@ endif;
707
  $add_ons['selling']['link_title'] = __( 'Activate now', 'advanced-ads' );
708
  $installed_pro_plugins++;
709
  } elseif ( class_exists( 'Advanced_Ads_Selling_Plugin' ) ) {
710
- $add_ons['selling']['link'] = ADVADS_URL . 'add-ons/selling-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
711
  $add_ons['selling']['desc'] = '';
712
  $add_ons['selling']['installed'] = true;
713
  $add_ons['selling']['order'] = 20;
@@ -725,7 +749,7 @@ endif;
725
  $add_ons['geo']['link_title'] = __( 'Activate now', 'advanced-ads' );
726
  $installed_pro_plugins++;
727
  } elseif ( class_exists( 'Advanced_Ads_Geo_Plugin' ) ) {
728
- $add_ons['geo']['link'] = ADVADS_URL . 'add-ons/geo-targeting/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
729
  $add_ons['geo']['desc'] = '';
730
  $add_ons['geo']['installed'] = true;
731
  $add_ons['geo']['order'] = 20;
535
  $pro_content = ob_get_clean();
536
 
537
  $add_ons = array(
538
+ 'pro' => array(
539
+ 'title' => 'Advanced Ads Pro',
540
+ 'desc' => $pro_content,
541
+ 'link' => ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
542
+ 'order' => 4,
543
+ 'class' => 'recommended',
544
+ ),
545
  'tracking' => array(
546
  'title' => 'Tracking',
547
  'desc' => __( 'Analyze clicks and impressions of your ads locally or in Google Analytics, share reports, and limit ads to a specific number of impressions or clicks.', 'advanced-ads' ),
554
  'link' => ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
555
  'order' => 4,
556
  ),
557
+ 'gam' => array(
558
+ 'title' => 'Google Ad Manager Integration',
559
+ 'desc' => __( 'A quick and error-free way of implementing ad units from your Google Ad Manager account.', 'advanced-ads' ),
560
+ 'link' => ADVADS_URL . 'add-ons/google-ad-manager/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
 
 
 
 
 
 
 
561
  'order' => 5,
562
  ),
563
  'geo' => array(
578
  'link' => ADVADS_URL . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
579
  'order' => 5,
580
  ),
581
+ 'selling' => array(
582
+ 'title' => 'Selling Ads',
583
+ 'desc' => __( 'Earn more money and let advertisers pay for ad space directly on the frontend of your site.', 'advanced-ads' ),
584
+ 'link' => ADVADS_URL . 'add-ons/selling-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
585
+ 'order' => 6,
586
+ ),
587
  'slider' => array(
588
  'title' => 'Ad Slider',
589
  'desc' => __( 'Create a beautiful and simple slider from your ads to show more information on less space.', 'advanced-ads' ),
590
  'link' => ADVADS_URL . 'add-ons/slider/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons',
591
+ 'order' => 6,
592
  ),
593
  'adsense-in-feed' => array(
594
  'title' => 'AdSense In-feed',
616
  $add_ons['pro']['link_title'] = __( 'Activate now', 'advanced-ads' );
617
  $installed_pro_plugins++;
618
  } elseif ( class_exists( 'Advanced_Ads_Pro' ) ) {
619
+ $add_ons['pro']['link'] = ADVADS_URL . 'manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
620
  $add_ons['pro']['desc'] = '';
621
  $add_ons['pro']['installed'] = true;
622
  $add_ons['pro']['order'] = 20;
635
  $installed_pro_plugins++;
636
  } elseif ( class_exists( 'Advanced_Ads_Tracking_Plugin', false ) &&
637
  method_exists( Advanced_Ads_Tracking_Plugin::get_instance(), 'get_tracking_method' ) ) {
638
+ $add_ons['tracking']['link'] = ADVADS_URL . 'manual/tracking-documentation/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
639
  if ( 'ga' !== Advanced_Ads_Tracking_Plugin::get_instance()->get_tracking_method() ) {
640
 
641
  // don’t show Tracking link if Analytics method is enabled.
659
  $add_ons['responsive']['link_title'] = __( 'Activate now', 'advanced-ads' );
660
  $installed_pro_plugins++;
661
  } elseif ( class_exists( 'Advanced_Ads_Responsive_Plugin' ) ) {
662
+ $add_ons['responsive']['link'] = ADVADS_URL . 'manual/responsive-ads-documentation/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
663
  $add_ons['responsive']['desc'] = '<a href="' . admin_url( 'admin.php?page=responsive-ads-list' ) . '">' . __( 'List of responsive ads by browser width', 'advanced-ads-responsive' ) . '</a>';
664
  $add_ons['responsive']['installed'] = true;
665
  $add_ons['responsive']['order'] = 20;
671
  }
672
  }
673
 
674
+ // GOOGLE AD MANAGER.
675
+ if ( isset( $installed_plugins['advanced-ads-gam/advanced-ads-gam.php'] ) && ! class_exists( 'Advanced_Ads_Network_Gam' ) ) { // is installed, but not active.
676
+ $add_ons['gam']['link'] = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=advanced-ads-gam/advanced-ads-gam.php&amp', 'activate-plugin_advanced-ads-gam/advanced-ads-gam.php' );
677
+ $add_ons['gam']['link_title'] = __( 'Activate now', 'advanced-ads' );
678
+ $installed_pro_plugins++;
679
+ } elseif ( class_exists( 'Advanced_Ads_Network_Gam' ) ) {
680
+ $add_ons['gam']['link'] = ADVADS_URL . 'manual/google-ad-manager-integration-manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
681
+ $add_ons['gam']['desc'] = '';
682
+ $add_ons['gam']['installed'] = true;
683
+ $add_ons['gam']['order'] = 20;
684
+ $installed_pro_plugins++;
685
+
686
+ // remove the add-on.
687
+ if ( $hide_activated ) {
688
+ unset( $add_ons['gam'] );
689
+ }
690
+ }
691
+
692
  // STICKY.
693
  if ( isset( $installed_plugins['advanced-ads-sticky-ads/sticky-ads.php'] ) && ! class_exists( 'Advanced_Ads_Sticky_Plugin' ) ) { // is installed, but not active.
694
  $add_ons['sticky']['link'] = wp_nonce_url( 'plugins.php?action=activate&amp;plugin=advanced-ads-sticky-ads/sticky-ads.php&amp', 'activate-plugin_advanced-ads-sticky-ads/sticky-ads.php' );
695
  $add_ons['sticky']['link_title'] = __( 'Activate now', 'advanced-ads' );
696
  $installed_pro_plugins++;
697
  } elseif ( class_exists( 'Advanced_Ads_Sticky_Plugin' ) ) {
698
+ $add_ons['sticky']['link'] = ADVADS_URL . 'manual/sticky-ads-documentation/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
699
  $add_ons['sticky']['desc'] = '';
700
  $add_ons['sticky']['installed'] = true;
701
  $add_ons['sticky']['order'] = 20;
713
  $add_ons['layer']['link_title'] = __( 'Activate now', 'advanced-ads' );
714
  $installed_pro_plugins++;
715
  } elseif ( class_exists( 'Advanced_Ads_Layer_Plugin' ) ) {
716
+ $add_ons['layer']['link'] = ADVADS_URL . 'manual/popup-and-layer-ads-documentation/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
717
  $add_ons['layer']['desc'] = '';
718
  $add_ons['layer']['installed'] = true;
719
  $add_ons['layer']['order'] = 20;
731
  $add_ons['selling']['link_title'] = __( 'Activate now', 'advanced-ads' );
732
  $installed_pro_plugins++;
733
  } elseif ( class_exists( 'Advanced_Ads_Selling_Plugin' ) ) {
734
+ $add_ons['selling']['link'] = ADVADS_URL . 'manual/getting-started-selling-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
735
  $add_ons['selling']['desc'] = '';
736
  $add_ons['selling']['installed'] = true;
737
  $add_ons['selling']['order'] = 20;
749
  $add_ons['geo']['link_title'] = __( 'Activate now', 'advanced-ads' );
750
  $installed_pro_plugins++;
751
  } elseif ( class_exists( 'Advanced_Ads_Geo_Plugin' ) ) {
752
+ $add_ons['geo']['link'] = ADVADS_URL . 'manual/geo-targeting-condition/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons-manual';
753
  $add_ons['geo']['desc'] = '';
754
  $add_ons['geo']['installed'] = true;
755
  $add_ons['geo']['order'] = 20;
admin/views/ad-output-metabox.php CHANGED
@@ -58,10 +58,27 @@
58
  <label for="advads-output-debugmode" class="label advads-hide-in-wizard"><?php esc_html_e( 'Enable debug mode', 'advanced-ads' ); ?></label>
59
  <div class="advads-hide-in-wizard">
60
  <input id="advads-output-debugmode" type="checkbox" name="advanced_ad[output][debugmode]" value="1" <?php checked( $debug_mode_enabled, true ); ?>/>
61
-
62
  <a href="<?php echo esc_url( ADVADS_URL ); ?>manual/ad-debug-mode/#utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
63
  </div>
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  <?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
66
 
67
  </div>
58
  <label for="advads-output-debugmode" class="label advads-hide-in-wizard"><?php esc_html_e( 'Enable debug mode', 'advanced-ads' ); ?></label>
59
  <div class="advads-hide-in-wizard">
60
  <input id="advads-output-debugmode" type="checkbox" name="advanced_ad[output][debugmode]" value="1" <?php checked( $debug_mode_enabled, true ); ?>/>
 
61
  <a href="<?php echo esc_url( ADVADS_URL ); ?>manual/ad-debug-mode/#utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank"><?php esc_html_e( 'Manual', 'advanced-ads' ); ?></a>
62
  </div>
63
 
64
+ <?php if ( ! defined( 'AAP_VERSION' ) ) : ?>
65
+ <hr class="advads-hide-in-wizard"/>
66
+ <label class="label advads-hide-in-wizard"><?php esc_html_e( 'Display only once', 'advanced-ads' ); ?></label>
67
+ <div class="advads-hide-in-wizard">
68
+ <?php
69
+ esc_html_e( 'Display the ad only once per page', 'advanced-ads' );
70
+ Advanced_Ads_Admin::pro_feature_link( 'pitch-pro-display-only-once' );
71
+ ?>
72
+ </div><hr class="advads-hide-in-wizard"/>
73
+ <label class="label advads-hide-in-wizard"><?php esc_html_e( 'Custom Code', 'advanced-ads' ); ?></label>
74
+ <div class="advads-hide-in-wizard">
75
+ <?php
76
+ esc_html_e( 'Place your own code below the ad', 'advanced-ads' );
77
+ Advanced_Ads_Admin::pro_feature_link( 'pitch-pro-custom-code' );
78
+ ?>
79
+ </div>
80
+ <?php endif; ?>
81
+
82
  <?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
83
 
84
  </div>
admin/views/conditions/condition-author.php CHANGED
@@ -48,7 +48,7 @@ if ( count( $authors ) >= $max_authors ) :
48
  )
49
  ),
50
  absint( $max_authors ),
51
- esc_url( ADVADS_URL . 'codex/filter-hooks//#utm_source=advanced-ads&utm_medium=link&utm_campaign=author-term-limit' )
52
  );
53
  ?>
54
  </p>
48
  )
49
  ),
50
  absint( $max_authors ),
51
+ esc_url( ADVADS_URL . 'codex/filter-hooks/#utm_source=advanced-ads&utm_medium=link&utm_campaign=author-term-limit' )
52
  );
53
  ?>
54
  </p>
admin/views/pitches/all-access.php CHANGED
@@ -3,10 +3,11 @@
3
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Advanced Ads Pro'; ?></li>
4
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Tracking'; ?></li>
5
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Responsive, AMP and Mobile ads'; ?></li>
6
- <li><span class="dashicons dashicons-yes"></span><?php echo 'Selling Ads'; ?></li>
7
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Geo Targeting'; ?></li>
8
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Sticky Ads'; ?></li>
9
  <li><span class="dashicons dashicons-yes"></span><?php echo 'PopUp Ads'; ?></li>
 
10
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Ad Slider'; ?></li>
11
  </ul>
12
  <p><?php esc_attr_e( 'Risk free with 30-day Money-Back guarantee', 'advanced-ads' ); ?></p>
3
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Advanced Ads Pro'; ?></li>
4
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Tracking'; ?></li>
5
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Responsive, AMP and Mobile ads'; ?></li>
6
+ <li><span class="dashicons dashicons-yes"></span><?php echo 'Google Ad Manager Integration'; ?></li>
7
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Geo Targeting'; ?></li>
8
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Sticky Ads'; ?></li>
9
  <li><span class="dashicons dashicons-yes"></span><?php echo 'PopUp Ads'; ?></li>
10
+ <li><span class="dashicons dashicons-yes"></span><?php echo 'Selling Ads'; ?></li>
11
  <li><span class="dashicons dashicons-yes"></span><?php echo 'Ad Slider'; ?></li>
12
  </ul>
13
  <p><?php esc_attr_e( 'Risk free with 30-day Money-Back guarantee', 'advanced-ads' ); ?></p>
admin/views/pitches/pro-feature-link.php ADDED
@@ -0,0 +1 @@
 
1
+ <p><a href="<?php echo esc_url( ADVADS_URL . 'add-ons/advanced-ads-pro/' . $utm_parameter ); ?>" target="_blank"><?php esc_html_e( 'Pro Feature', 'advanced-ads' ); ?></a></p>
admin/views/pitches/pro-placements.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // todo: move the array somewhere else.
3
+ $pro_placements = array(
4
+ // ad injection on random position.
5
+ 'post_content_random' => array(
6
+ 'title' => __( 'Random Paragraph', 'advanced-ads' ),
7
+ 'description' => __( 'After a random paragraph in the main content.', 'advanced-ads' ),
8
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-random.png',
9
+ ),
10
+ // ad injection above the post headline.
11
+ 'post_above_headline' => array(
12
+ 'title' => __( 'Above Headline', 'advanced-ads' ),
13
+ 'description' => __( 'Above the main headline on the page (&lt;h1&gt;).', 'advanced-ads' ),
14
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-above-headline.png',
15
+ ),
16
+ // ad injection in the middle of a post.
17
+ 'post_content_middle' => array(
18
+ 'title' => __( 'Content Middle', 'advanced-ads' ),
19
+ 'description' => __( 'In the middle of the main content based on the number of paragraphs.', 'advanced-ads' ),
20
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-middle.png',
21
+ ),
22
+ // ad injection at a hand selected element in the frontend.
23
+ 'custom_position' => array(
24
+ 'title' => __( 'Custom Position', 'advanced-ads' ),
25
+ 'description' => __( 'Attach the ad to any element in the frontend.', 'advanced-ads' ),
26
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/custom-position.png',
27
+ ),
28
+ // ad injection between posts on archive and category pages.
29
+ 'archive_pages' => array(
30
+ 'title' => __( 'Post Lists', 'advanced-ads' ),
31
+ 'description' => __( 'Display the ad between posts on post lists, e.g. home, archives, search etc.', 'advanced-ads' ),
32
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/post-list.png',
33
+ ),
34
+ 'background' => array(
35
+ 'title' => __( 'Background Ad', 'advanced-ads' ),
36
+ 'description' => __( 'Background of the website behind the main wrapper.', 'advanced-ads' ),
37
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/background.png',
38
+ ),
39
+ );
40
+ // BuddyPress.
41
+ if ( class_exists( 'BuddyPress', false ) ) {
42
+ $pro_placements['buddypress'] = array(
43
+ 'title' => __( 'BuddyPress Content', 'advanced-ads' ),
44
+ 'description' => __( 'Display ads on BuddyPress related pages.', 'advanced-ads' ),
45
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/buddypress-icon.png',
46
+ );
47
+ }
48
+ // bbPress.
49
+ if ( class_exists( 'bbPress', false ) ) {
50
+ $pro_placements['bbpress'] = array(
51
+ 'title' => __( 'bbPress Content', 'advanced-ads' ),
52
+ 'description' => __( 'Display ads in content created with bbPress.', 'advanced-ads' ),
53
+ 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/bbpress-reply.png',
54
+ );
55
+ }
56
+
57
+ ?><h4><?php Advanced_Ads_Admin::pro_feature_link( 'pitch-pro-placements' ); ?></h4>
58
+ <?php
59
+ if ( is_array( $pro_placements ) ) :
60
+ foreach ( $pro_placements as $_key => $_place ) :
61
+ if ( isset( $_place['image'] ) ) :
62
+ $image = '<img src="' . $_place['image'] . '" alt="' . $_place['title'] . '"/>';
63
+ else :
64
+ $image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
65
+ endif;
66
+ ?>
67
+ <div class="advads-placement-type"><label class="ui-button advads-pro-link"><span class="ui-button-text">
68
+ <?php
69
+ // phpcs:ignore
70
+ echo $image;
71
+ ?>
72
+ </label></span>
73
+ <p class="advads-placement-description">
74
+ <strong><?php echo esc_html( $_place['title'] ); ?></strong><br/><?php echo esc_html( $_place['description'] ); ?></p>
75
+ </div>
76
+ <?php
77
+ endforeach;
78
+ endif;
admin/views/placement-form.php CHANGED
@@ -53,9 +53,19 @@
53
  <?php
54
  endforeach;
55
  };
 
56
  ?>
57
- </div>
58
- <div class="clear"></div>
 
 
 
 
 
 
 
 
 
59
  <p class="advads-error-message advads-placement-type-error"><?php esc_html_e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
60
  <br/>
61
  <h3>2. <?php esc_html_e( 'Choose a Name', 'advanced-ads' ); ?></h3>
53
  <?php
54
  endforeach;
55
  };
56
+
57
  ?>
58
+ </div><div class="clear"></div>
59
+ <?php
60
+
61
+ // show Pro placements if Pro is not actiavated.
62
+ if ( ! defined( 'AAP_VERSION' ) ) :
63
+ include ADVADS_BASE_PATH . 'admin/views/pitches/pro-placements.php';
64
+ ?>
65
+ <div class="clear"></div>
66
+ <?php
67
+ endif;
68
+ ?>
69
  <p class="advads-error-message advads-placement-type-error"><?php esc_html_e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
70
  <br/>
71
  <h3>2. <?php esc_html_e( 'Choose a Name', 'advanced-ads' ); ?></h3>
admin/views/placements.php CHANGED
@@ -195,6 +195,43 @@ endif;
195
  $option_content
196
  );
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  endif;
199
 
200
  do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
195
  $option_content
196
  );
197
 
198
+ // show Pro features if Pro is not actiavated.
199
+ if ( ! defined( 'AAP_VERSION' ) ) {
200
+ // Display Conditions for placements.
201
+ Advanced_Ads_Admin_Options::render_option(
202
+ 'placement-display-conditions',
203
+ __( 'Display Conditions', 'advanced-ads' ),
204
+ 'is_pro_pitch',
205
+ __( 'Use display conditions for placements.', 'advanced-ads' ) .
206
+ ' ' . __( 'The free version provides conditions on the ad edit page.', 'advanced-ads' )
207
+ );
208
+
209
+ // Visitor Condition for placements.
210
+ Advanced_Ads_Admin_Options::render_option(
211
+ 'placement-visitor-conditions',
212
+ __( 'Visitor Conditions', 'advanced-ads' ),
213
+ 'is_pro_pitch',
214
+ __( 'Use visitor conditions for placements.', 'advanced-ads' ) .
215
+ ' ' . __( 'The free version provides conditions on the ad edit page.', 'advanced-ads' )
216
+ );
217
+
218
+ // Minimum Content Length.
219
+ Advanced_Ads_Admin_Options::render_option(
220
+ 'placement-content-minimum-length',
221
+ __( 'Minimum Content Length', 'advanced-ads' ),
222
+ 'is_pro_pitch',
223
+ __( 'Minimum length of content before automatically injected ads are allowed in them.', 'advanced-ads' )
224
+ );
225
+
226
+ // Words Between Ads.
227
+ Advanced_Ads_Admin_Options::render_option(
228
+ 'placement-skip-paragraph',
229
+ __( 'Words Between Ads', 'advanced-ads' ),
230
+ 'is_pro_pitch',
231
+ __( 'A minimum amount of words between automatically injected ads.', 'advanced-ads' )
232
+ );
233
+ }
234
+
235
  endif;
236
 
237
  do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
admin/views/settings/general/disable-post-types.php CHANGED
@@ -1,6 +1,4 @@
1
- <p><a href="<?php echo esc_url( ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=pitch-pro-disable-post-type' ); ?>" target="_blank"><?php esc_html_e( 'Pro feature', 'advanced-ads' ); ?></a></p>
2
- <?php
3
- foreach ( $post_types as $_type_id => $_type ) :
4
  if ( $type_label_counts[ $_type->label ] < 2 ) {
5
  $_label = $_type->label;
6
  } else {
@@ -10,3 +8,13 @@ foreach ( $post_types as $_type_id => $_type ) :
10
  <label style="margin-right: 1em;"><input type="checkbox" disabled="disabled"><?php echo esc_html( $_label ); ?></label>
11
  <?php
12
  endforeach;
 
 
 
 
 
 
 
 
 
 
1
+ <?php foreach ( $post_types as $_type_id => $_type ) :
 
 
2
  if ( $type_label_counts[ $_type->label ] < 2 ) {
3
  $_label = $_type->label;
4
  } else {
8
  <label style="margin-right: 1em;"><input type="checkbox" disabled="disabled"><?php echo esc_html( $_label ); ?></label>
9
  <?php
10
  endforeach;
11
+
12
+ ?>
13
+ <p>
14
+ <?php
15
+ esc_html_e( 'The free version provides the post type display condition on the ad edit page.', 'advanced-ads' );
16
+ ?>
17
+ </p>
18
+ <?php
19
+
20
+ Advanced_Ads_Admin::pro_feature_link( 'pitch-pro-disable-post-type' );
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.17.10
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.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.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.17.10' );
43
 
44
  // Autoloading, modules and functions.
45
 
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.17.11
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.com
18
  * Text Domain: advanced-ads
39
  // general and global slug, e.g. to store options in WP.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
+ define( 'ADVADS_VERSION', '1.17.11' );
43
 
44
  // Autoloading, modules and functions.
45
 
classes/EDD_SL_Plugin_Updater.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
- * @version 1.6.18
11
  */
12
  class ADVADS_SL_Plugin_Updater {
13
 
@@ -20,7 +20,7 @@ class ADVADS_SL_Plugin_Updater {
20
  private $cache_key = '';
21
 
22
  private $health_check_timeout = 5;
23
-
24
  /**
25
  * Class constructor.
26
  *
@@ -87,7 +87,7 @@ class ADVADS_SL_Plugin_Updater {
87
  *
88
  * @uses api_request()
89
  *
90
- * @param array $_transient_data Update array build by WordPress.
91
  * @return array Modified update array with custom plugin data.
92
  */
93
  public function check_update( $_transient_data ) {
@@ -117,6 +117,7 @@ class ADVADS_SL_Plugin_Updater {
117
 
118
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
119
 
 
120
  if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
121
 
122
  $_transient_data->response[ $this->name ] = $version_info;
@@ -124,21 +125,35 @@ class ADVADS_SL_Plugin_Updater {
124
  // Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
125
  $_transient_data->response[ $this->name ]->plugin = $this->name;
126
 
 
 
 
 
 
 
 
 
 
 
 
127
  }
128
 
129
  $_transient_data->last_checked = time();
130
  $_transient_data->checked[ $this->name ] = $this->version;
131
 
 
 
 
132
  }
133
 
134
  return $_transient_data;
135
  }
136
 
137
  /**
138
- * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
139
  *
140
- * @param string $file
141
- * @param array $plugin
142
  */
143
  public function show_update_notification( $file, $plugin ) {
144
 
@@ -158,7 +173,7 @@ class ADVADS_SL_Plugin_Updater {
158
  return;
159
  }
160
 
161
- // Remove our filter on the site transient
162
  remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
163
 
164
  $update_cache = get_site_transient( 'update_plugins' );
@@ -172,7 +187,7 @@ class ADVADS_SL_Plugin_Updater {
172
  if ( false === $version_info ) {
173
  $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
174
 
175
- // Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
176
  if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
177
  $version_info->banners = $this->convert_object_to_array( $version_info->banners );
178
  }
@@ -184,7 +199,11 @@ class ADVADS_SL_Plugin_Updater {
184
  if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
185
  $version_info->icons = $this->convert_object_to_array( $version_info->icons );
186
  }
187
-
 
 
 
 
188
  $this->set_version_info_cache( $version_info );
189
  }
190
 
@@ -192,14 +211,29 @@ class ADVADS_SL_Plugin_Updater {
192
  return;
193
  }
194
 
 
195
  if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
196
 
197
  $update_cache->response[ $this->name ] = $version_info;
198
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
 
201
- $update_cache->last_checked = time();
202
  $update_cache->checked[ $this->name ] = $this->version;
 
 
 
203
 
204
  set_site_transient( 'update_plugins', $update_cache );
205
 
@@ -209,12 +243,12 @@ class ADVADS_SL_Plugin_Updater {
209
 
210
  }
211
 
212
- // Restore our filter
213
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
214
 
215
  if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
216
 
217
- // build a plugin list row, with update notification
218
  $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
219
  # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
220
  echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
@@ -254,9 +288,9 @@ class ADVADS_SL_Plugin_Updater {
254
  *
255
  * @uses api_request()
256
  *
257
- * @param mixed $_data
258
- * @param string $_action
259
- * @param object $_args
260
  * @return object $_data
261
  */
262
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
@@ -313,7 +347,7 @@ class ADVADS_SL_Plugin_Updater {
313
  if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
314
  $_data->banners = $this->convert_object_to_array( $_data->banners );
315
  }
316
-
317
  // Convert icons into an associative array, since we're getting an object, but Core expects an array.
318
  if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
319
  $_data->icons = $this->convert_object_to_array( $_data->icons );
@@ -330,7 +364,7 @@ class ADVADS_SL_Plugin_Updater {
330
 
331
  return $_data;
332
  }
333
-
334
  /**
335
  * Convert some objects to arrays when injecting data into the update API
336
  *
@@ -350,7 +384,7 @@ class ADVADS_SL_Plugin_Updater {
350
  }
351
 
352
  return $new_data;
353
- }
354
 
355
  /**
356
  * Disable SSL verification in order to prevent download update failures
@@ -407,7 +441,7 @@ class ADVADS_SL_Plugin_Updater {
407
  if ( false === $edd_plugin_url_available[ $store_hash ] ) {
408
  return;
409
  }
410
-
411
  $data = array_merge( $this->api_data, $_data );
412
 
413
  if ( $data['slug'] != $this->slug ) {
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
+ * @version 1.7
11
  */
12
  class ADVADS_SL_Plugin_Updater {
13
 
20
  private $cache_key = '';
21
 
22
  private $health_check_timeout = 5;
23
+
24
  /**
25
  * Class constructor.
26
  *
87
  *
88
  * @uses api_request()
89
  *
90
+ * @param array $_transient_data Update array build by WordPress.
91
  * @return array Modified update array with custom plugin data.
92
  */
93
  public function check_update( $_transient_data ) {
117
 
118
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
119
 
120
+ $no_update = false;
121
  if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
122
 
123
  $_transient_data->response[ $this->name ] = $version_info;
125
  // Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
126
  $_transient_data->response[ $this->name ]->plugin = $this->name;
127
 
128
+ } else {
129
+ $no_update = new stdClass();
130
+ $no_update->id = '';
131
+ $no_update->slug = $this->slug;
132
+ $no_update->plugin = $this->name;
133
+ $no_update->new_version = $version_info->new_version;
134
+ $no_update->url = isset( $version_info->homepage ) ? $version_info->homepage : '';
135
+ $no_update->package = isset( $version_info->package ) ? $version_info->package : '';
136
+ $no_update->icons = isset( $version_info->icons ) ? $version_info->icons : '';
137
+ $no_update->banners = isset( $version_info->banners ) ? $version_info->banners : '';
138
+ $no_update->banners_rtl = array();
139
  }
140
 
141
  $_transient_data->last_checked = time();
142
  $_transient_data->checked[ $this->name ] = $this->version;
143
 
144
+ if ( $no_update ) {
145
+ $_transient_data->no_update[ $this->name ] = $no_update;
146
+ }
147
  }
148
 
149
  return $_transient_data;
150
  }
151
 
152
  /**
153
+ * Show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
154
  *
155
+ * @param string $file needs to be explained by EDD.
156
+ * @param array $plugin needs to be explained by EDD.
157
  */
158
  public function show_update_notification( $file, $plugin ) {
159
 
173
  return;
174
  }
175
 
176
+ // Remove our filter on the site transient.
177
  remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
178
 
179
  $update_cache = get_site_transient( 'update_plugins' );
187
  if ( false === $version_info ) {
188
  $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
189
 
190
+ // Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now.
191
  if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
192
  $version_info->banners = $this->convert_object_to_array( $version_info->banners );
193
  }
199
  if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
200
  $version_info->icons = $this->convert_object_to_array( $version_info->icons );
201
  }
202
+
203
+ if ( isset( $version_info->contributors ) && ! is_array( $version_info->contributors ) ) {
204
+ $version_info->contributors = $this->convert_object_to_array( $version_info->contributors );
205
+ }
206
+
207
  $this->set_version_info_cache( $version_info );
208
  }
209
 
211
  return;
212
  }
213
 
214
+ $no_update = false;
215
  if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
216
 
217
  $update_cache->response[ $this->name ] = $version_info;
218
 
219
+ } else {
220
+ $no_update = new stdClass();
221
+ $no_update->id = '';
222
+ $no_update->slug = $this->slug;
223
+ $no_update->plugin = $this->name;
224
+ $no_update->new_version = $version_info->new_version;
225
+ $no_update->url = isset( $version_info->homepage ) ? $version_info->homepage : '';
226
+ $no_update->package = isset( $version_info->package ) ? $version_info->package : '';
227
+ $no_update->icons = isset( $version_info->icons ) ? $version_info->icons : '';
228
+ $no_update->banners = isset( $version_info->banners ) ? $version_info->banners : '';
229
+ $no_update->banners_rtl = array();
230
  }
231
 
232
+ $update_cache->last_checked = time();
233
  $update_cache->checked[ $this->name ] = $this->version;
234
+ if ( $no_update ) {
235
+ $update_cache->no_update[ $this->name ] = $no_update;
236
+ }
237
 
238
  set_site_transient( 'update_plugins', $update_cache );
239
 
243
 
244
  }
245
 
246
+ // Restore our filter.
247
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
248
 
249
  if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
250
 
251
+ // Build a plugin list row, with update notification.
252
  $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
253
  # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
254
  echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
288
  *
289
  * @uses api_request()
290
  *
291
+ * @param mixed $_data needs to be explained by EDD.
292
+ * @param string $_action needs to be explained by EDD.
293
+ * @param object $_args needs to be explained by EDD.
294
  * @return object $_data
295
  */
296
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
347
  if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
348
  $_data->banners = $this->convert_object_to_array( $_data->banners );
349
  }
350
+
351
  // Convert icons into an associative array, since we're getting an object, but Core expects an array.
352
  if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
353
  $_data->icons = $this->convert_object_to_array( $_data->icons );
364
 
365
  return $_data;
366
  }
367
+
368
  /**
369
  * Convert some objects to arrays when injecting data into the update API
370
  *
384
  }
385
 
386
  return $new_data;
387
+ }
388
 
389
  /**
390
  * Disable SSL verification in order to prevent download update failures
441
  if ( false === $edd_plugin_url_available[ $store_hash ] ) {
442
  return;
443
  }
444
+
445
  $data = array_merge( $this->api_data, $_data );
446
 
447
  if ( $data['slug'] != $this->slug ) {
classes/ad-ajax.php CHANGED
@@ -42,22 +42,22 @@ class Advanced_Ads_Ajax {
42
  * Simple wp ajax interface for ad selection.
43
  */
44
  public function advads_ajax_ad_select() {
45
- // set proper header.
46
  header( 'Content-Type: application/json; charset: utf-8' );
47
 
48
- // allow modules / add ons to test (this is rather late but should happen before anything important is called).
49
  do_action( 'advanced-ads-ajax-ad-select-init' );
50
 
51
  $ad_ids = isset( $_REQUEST['ad_ids'] ) ? $_REQUEST['ad_ids'] : null;
52
  if ( is_string( $ad_ids ) ) {
53
  $ad_ids = json_decode( $ad_ids, true );
54
  }
55
- if ( is_array( $ad_ids ) ) { // ads loaded previously and passed by query.
56
  Advanced_Ads::get_instance()->current_ads += $ad_ids;
57
  }
58
 
59
  $defered_ads = isset( $_REQUEST['deferedAds'] ) ? $_REQUEST['deferedAds'] : null;
60
- if ( $defered_ads ) { // load all ajax ads with a single request.
61
  $response = array();
62
 
63
  $requests_by_blog = array();
@@ -98,7 +98,7 @@ class Advanced_Ads_Ajax {
98
  * @return array
99
  */
100
  private function select_one( $request ) {
101
- // init handlers.
102
  $selector = Advanced_Ads_Select::get_instance();
103
  $methods = $selector->get_methods();
104
  $method = isset( $request['ad_method'] ) ? (string) $request['ad_method'] : null;
@@ -117,9 +117,9 @@ class Advanced_Ads_Ajax {
117
  $advads = Advanced_Ads::get_instance();
118
  $l = count( $advads->current_ads );
119
 
120
- // build content.
121
  $content = $selector->get_ad_by_method( $id, $method, $arguments );
122
- $ad_ids = array_slice( $advads->current_ads, $l ); // ads loaded by this request.
123
 
124
  $r = array(
125
  'status' => 'success',
@@ -140,7 +140,7 @@ class Advanced_Ads_Ajax {
140
  )
141
  );
142
  } else {
143
- // report error.
144
  return array(
145
  'status' => 'error',
146
  'message' => 'No valid ID or METHOD found.',
@@ -162,7 +162,7 @@ class Advanced_Ads_Ajax {
162
  $key = ( ! empty( $_REQUEST['key'] ) ) ? esc_attr( $_REQUEST['key'] ) : false;
163
  $attr = ( ! empty( $_REQUEST['attr'] ) && is_array( $_REQUEST['attr'] ) ) ? $_REQUEST['attr'] : array();
164
 
165
- // update or new entry?
166
  if ( isset( $attr['mode'] ) && 'update' === $attr['mode'] ) {
167
  Advanced_Ads_Ad_Health_Notices::get_instance()->update( $key, $attr );
168
  } else {
@@ -186,10 +186,10 @@ class Advanced_Ads_Ajax {
186
  $key = ( ! empty( $_REQUEST['key'] ) ) ? esc_attr( $_REQUEST['key'] ) : false;
187
  $attr = ( ! empty( $_REQUEST['attr'] ) && is_array( $_REQUEST['attr'] ) ) ? $_REQUEST['attr'] : array();
188
 
189
- // update or new entry?
190
  if ( isset( $attr['mode'] ) && 'update' === $attr['mode'] ) {
191
  die();
192
- // Advanced_Ads_Frontend_Notices::get_instance()->update( $key, $attr );
193
  } else {
194
  Advanced_Ads_Frontend_Notices::get_instance()->update( $key, $attr );
195
  }
42
  * Simple wp ajax interface for ad selection.
43
  */
44
  public function advads_ajax_ad_select() {
45
+ // Set proper header.
46
  header( 'Content-Type: application/json; charset: utf-8' );
47
 
48
+ // Allow modules / add ons to test (this is rather late but should happen before anything important is called).
49
  do_action( 'advanced-ads-ajax-ad-select-init' );
50
 
51
  $ad_ids = isset( $_REQUEST['ad_ids'] ) ? $_REQUEST['ad_ids'] : null;
52
  if ( is_string( $ad_ids ) ) {
53
  $ad_ids = json_decode( $ad_ids, true );
54
  }
55
+ if ( is_array( $ad_ids ) ) { // Ads loaded previously and passed by query.
56
  Advanced_Ads::get_instance()->current_ads += $ad_ids;
57
  }
58
 
59
  $defered_ads = isset( $_REQUEST['deferedAds'] ) ? $_REQUEST['deferedAds'] : null;
60
+ if ( $defered_ads ) { // Load all ajax ads with a single request.
61
  $response = array();
62
 
63
  $requests_by_blog = array();
98
  * @return array
99
  */
100
  private function select_one( $request ) {
101
+ // Init handlers.
102
  $selector = Advanced_Ads_Select::get_instance();
103
  $methods = $selector->get_methods();
104
  $method = isset( $request['ad_method'] ) ? (string) $request['ad_method'] : null;
117
  $advads = Advanced_Ads::get_instance();
118
  $l = count( $advads->current_ads );
119
 
120
+ // Build content.
121
  $content = $selector->get_ad_by_method( $id, $method, $arguments );
122
+ $ad_ids = array_slice( $advads->current_ads, $l ); // Ads loaded by this request.
123
 
124
  $r = array(
125
  'status' => 'success',
140
  )
141
  );
142
  } else {
143
+ // Report error.
144
  return array(
145
  'status' => 'error',
146
  'message' => 'No valid ID or METHOD found.',
162
  $key = ( ! empty( $_REQUEST['key'] ) ) ? esc_attr( $_REQUEST['key'] ) : false;
163
  $attr = ( ! empty( $_REQUEST['attr'] ) && is_array( $_REQUEST['attr'] ) ) ? $_REQUEST['attr'] : array();
164
 
165
+ // Update or new entry?
166
  if ( isset( $attr['mode'] ) && 'update' === $attr['mode'] ) {
167
  Advanced_Ads_Ad_Health_Notices::get_instance()->update( $key, $attr );
168
  } else {
186
  $key = ( ! empty( $_REQUEST['key'] ) ) ? esc_attr( $_REQUEST['key'] ) : false;
187
  $attr = ( ! empty( $_REQUEST['attr'] ) && is_array( $_REQUEST['attr'] ) ) ? $_REQUEST['attr'] : array();
188
 
189
+ // Update or new entry?
190
  if ( isset( $attr['mode'] ) && 'update' === $attr['mode'] ) {
191
  die();
192
+ // Advanced_Ads_Frontend_Notices::get_instance()->update( $key, $attr );.
193
  } else {
194
  Advanced_Ads_Frontend_Notices::get_instance()->update( $key, $attr );
195
  }
classes/checks.php CHANGED
@@ -237,7 +237,7 @@ class Advanced_Ads_Checks {
237
  if ( isset( $options['disabled-ads'] ) && is_array( $options['disabled-ads'] ) ) {
238
  foreach ( $options['disabled-ads'] as $_key => $_value ) {
239
  // don’t warn if "RSS Feed", "404", or "REST API" option are enabled, because they are normally not critical.
240
- if ( ! empty( $_value ) && ! in_array( $_key, array( 'feed', '404', 'rest-api' ), true ) ) {
241
  return true;
242
  }
243
  }
237
  if ( isset( $options['disabled-ads'] ) && is_array( $options['disabled-ads'] ) ) {
238
  foreach ( $options['disabled-ads'] as $_key => $_value ) {
239
  // don’t warn if "RSS Feed", "404", or "REST API" option are enabled, because they are normally not critical.
240
+ if ( ! empty( $_value ) && ! in_array( (string) $_key, array( 'feed', '404', 'rest-api' ), true ) ) {
241
  return true;
242
  }
243
  }
classes/plugin.php CHANGED
@@ -692,6 +692,7 @@ class Advanced_Ads_Plugin {
692
  */
693
  public static function any_activated_add_on() {
694
  return ( defined( 'AAP_VERSION' ) // Advanced Ads Pro.
 
695
  || defined( 'AASA_VERSION' ) // Selling Ads.
696
  || defined( 'AAT_VERSION' ) // Tracking.
697
  || defined( 'AASADS_VERSION' ) // Sticky Ads.
692
  */
693
  public static function any_activated_add_on() {
694
  return ( defined( 'AAP_VERSION' ) // Advanced Ads Pro.
695
+ || defined( 'AAGAM_VERSION' ) // Google Ad Manager.
696
  || defined( 'AASA_VERSION' ) // Selling Ads.
697
  || defined( 'AAT_VERSION' ) // Tracking.
698
  || defined( 'AASADS_VERSION' ) // Sticky Ads.
languages/advanced-ads.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Advanced Ads plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Advanced Ads 1.17.10\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads-git\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: webgilde <support@wpadvancedads.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-04-07T13:15:03+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: advanced-ads\n"
@@ -91,8 +91,8 @@ msgid "time of %s"
91
  msgstr ""
92
 
93
  #: admin/class-advanced-ads-admin.php:414
94
- #: admin/includes/class-menu.php:155
95
- #: admin/includes/class-menu.php:158
96
  #: admin/views/settings.php:29
97
  msgid "Support"
98
  msgstr ""
@@ -318,7 +318,7 @@ msgstr ""
318
  #: modules/import-export/classes/import.php:146
319
  #: modules/import-export/classes/import.php:186
320
  #: modules/import-export/classes/import.php:564
321
- #: public/class-advanced-ads.php:724
322
  msgid "Edit"
323
  msgstr ""
324
 
@@ -511,52 +511,52 @@ msgstr ""
511
  msgid "any expiry date"
512
  msgstr ""
513
 
514
- #: admin/includes/class-menu.php:65
515
- #: admin/includes/class-menu.php:88
516
- #: admin/includes/class-menu.php:99
517
  #: admin/includes/class-menu.php:100
 
518
  msgid "Overview"
519
  msgstr ""
520
 
521
- #: admin/includes/class-menu.php:79
522
  #: admin/includes/class-menu.php:80
 
523
  #: admin/includes/class-shortcode-creator.php:101
524
  #: admin/views/ad-group-list-form-row.php:91
525
  #: admin/views/ad-group-list-header.php:16
526
- #: admin/views/placement-form.php:78
527
  #: admin/views/placements-item.php:24
528
  #: classes/widget.php:129
529
  #: modules/gutenberg/includes/class-gutenberg.php:79
530
  #: modules/import-export/views/page.php:23
531
- #: public/class-advanced-ads.php:720
532
  msgid "Ads"
533
  msgstr ""
534
 
535
- #: admin/includes/class-menu.php:111
536
- #: public/class-advanced-ads.php:723
537
  msgid "Add New Ad"
538
  msgstr ""
539
 
540
- #: admin/includes/class-menu.php:112
541
  #: admin/views/ad-group-list-ads.php:36
542
- #: public/class-advanced-ads.php:722
543
- #: public/class-advanced-ads.php:726
544
  msgid "New Ad"
545
  msgstr ""
546
 
547
- #: admin/includes/class-menu.php:120
548
  msgid "Ad Groups & Rotations"
549
  msgstr ""
550
 
551
- #: admin/includes/class-menu.php:121
552
  msgid "Groups & Rotation"
553
  msgstr ""
554
 
555
- #: admin/includes/class-menu.php:130
556
  msgid "Ad Placements"
557
  msgstr ""
558
 
559
- #: admin/includes/class-menu.php:131
560
  #: admin/includes/class-shortcode-creator.php:115
561
  #: admin/views/placements.php:53
562
  #: classes/widget.php:115
@@ -565,26 +565,26 @@ msgstr ""
565
  msgid "Placements"
566
  msgstr ""
567
 
568
- #: admin/includes/class-menu.php:139
569
  msgid "Advanced Ads Settings"
570
  msgstr ""
571
 
572
- #: admin/includes/class-menu.php:140
573
  msgid "Settings"
574
  msgstr ""
575
 
576
- #: admin/includes/class-menu.php:175
577
- #: admin/includes/class-menu.php:179
578
  #: admin/includes/class-settings.php:272
579
  msgid "Licenses"
580
  msgstr ""
581
 
582
- #: admin/includes/class-menu.php:281
583
- #: admin/includes/class-menu.php:306
584
  msgid "Sorry, you are not allowed to access this feature."
585
  msgstr ""
586
 
587
- #: admin/includes/class-menu.php:293
588
  msgid "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was deleted?"
589
  msgstr ""
590
 
@@ -607,11 +607,13 @@ msgid "Layout / Output"
607
  msgstr ""
608
 
609
  #: admin/includes/class-meta-box.php:104
 
610
  #: classes/ad-debug.php:152
611
  msgid "Display Conditions"
612
  msgstr ""
613
 
614
  #: admin/includes/class-meta-box.php:112
 
615
  #: classes/ad-debug.php:239
616
  msgid "Visitor Conditions"
617
  msgstr ""
@@ -628,7 +630,7 @@ msgstr ""
628
  #: admin/includes/class-meta-box.php:218
629
  #: admin/includes/class-meta-box.php:223
630
  #: admin/includes/class-overview-widgets.php:182
631
- #: admin/views/ad-output-metabox.php:62
632
  #: admin/views/settings/general/custom-label.php:9
633
  #: modules/ads-txt/admin/views/setting-create.php:11
634
  #: modules/privacy/admin/views/setting-enable.php:2
@@ -804,16 +806,16 @@ msgstr ""
804
  msgid "ad grids and many more advanced features"
805
  msgstr ""
806
 
807
- #: admin/includes/class-overview-widgets.php:540
808
  msgid "Analyze clicks and impressions of your ads locally or in Google Analytics, share reports, and limit ads to a specific number of impressions or clicks."
809
  msgstr ""
810
 
811
- #: admin/includes/class-overview-widgets.php:546
812
  msgid "Display ads based on the device or the size of your visitor’s browser, and control ads on AMP pages."
813
  msgstr ""
814
 
815
  #: admin/includes/class-overview-widgets.php:559
816
- msgid "Earn more money and let advertisers pay for ad space directly on the frontend of your site."
817
  msgstr ""
818
 
819
  #: admin/includes/class-overview-widgets.php:565
@@ -829,57 +831,62 @@ msgid "Users will never miss an ad or other information in a PopUp. Choose when
829
  msgstr ""
830
 
831
  #: admin/includes/class-overview-widgets.php:583
832
- msgid "Create a beautiful and simple slider from your ads to show more information on less space."
833
  msgstr ""
834
 
835
  #: admin/includes/class-overview-widgets.php:589
 
 
 
 
836
  msgid "Place AdSense In-feed ads between posts on homepage, category, and archive pages."
837
  msgstr ""
838
 
839
- #: admin/includes/class-overview-widgets.php:592
840
- #: admin/includes/class-overview-widgets.php:764
841
- #: admin/includes/class-overview-widgets.php:780
842
  msgid "Install now"
843
  msgstr ""
844
 
845
- #: admin/includes/class-overview-widgets.php:610
846
- #: admin/includes/class-overview-widgets.php:628
847
- #: admin/includes/class-overview-widgets.php:653
848
- #: admin/includes/class-overview-widgets.php:671
849
- #: admin/includes/class-overview-widgets.php:689
850
- #: admin/includes/class-overview-widgets.php:707
851
- #: admin/includes/class-overview-widgets.php:725
852
- #: admin/includes/class-overview-widgets.php:743
 
853
  msgid "Activate now"
854
  msgstr ""
855
 
856
- #: admin/includes/class-overview-widgets.php:636
857
  msgid "Visit your ad stats"
858
  msgstr ""
859
 
860
- #: admin/includes/class-overview-widgets.php:760
861
  msgid "Use Genesis specific ad positions."
862
  msgstr ""
863
 
864
- #: admin/includes/class-overview-widgets.php:776
865
  msgid "Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
866
  msgstr ""
867
 
868
- #: admin/includes/class-overview-widgets.php:792
869
  msgid "Our best deal with all add-ons included."
870
  msgstr ""
871
 
872
- #: admin/includes/class-overview-widgets.php:794
873
  msgid "Get full access"
874
  msgstr ""
875
 
876
- #: admin/includes/class-overview-widgets.php:810
877
  #: admin/views/conditions/ad-display-metabox.php:37
878
  #: admin/views/conditions/ad-visitor-metabox.php:37
879
  msgid "Visit the manual"
880
  msgstr ""
881
 
882
- #: admin/includes/class-overview-widgets.php:813
883
  msgid "Get this add-on"
884
  msgstr ""
885
 
@@ -978,7 +985,7 @@ msgid "--empty--"
978
  msgstr ""
979
 
980
  #: admin/includes/class-shortcode-creator.php:108
981
- #: admin/views/placement-form.php:71
982
  #: admin/views/placements-item.php:12
983
  #: classes/widget.php:122
984
  #: modules/gutenberg/includes/class-gutenberg.php:80
@@ -1134,7 +1141,7 @@ msgstr ""
1134
  #: classes/ad-debug.php:118
1135
  #: classes/ad-debug.php:167
1136
  #: classes/ad-debug.php:169
1137
- #: public/class-advanced-ads.php:721
1138
  msgid "Ad"
1139
  msgstr ""
1140
 
@@ -1413,6 +1420,22 @@ msgstr ""
1413
  msgid "Enable debug mode"
1414
  msgstr ""
1415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1416
  #: admin/views/ad-parameters-size.php:9
1417
  msgid "size"
1418
  msgstr ""
@@ -1726,14 +1749,84 @@ msgstr ""
1726
  msgid "All Access – with all available add-ons"
1727
  msgstr ""
1728
 
1729
- #: admin/views/pitches/all-access.php:12
1730
  msgid "Risk free with 30-day Money-Back guarantee"
1731
  msgstr ""
1732
 
1733
- #: admin/views/pitches/all-access.php:13
1734
  msgid "Get All Access"
1735
  msgstr ""
1736
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1737
  #: admin/views/pitches/pro-tab.php:2
1738
  msgid "Advanced Ads Pro – test and optimize your ad performance"
1739
  msgstr ""
@@ -1784,40 +1877,40 @@ msgstr ""
1784
  msgid "Placement types define where the ad is going to be displayed. Learn more about the different types from the <a href=\"%s\">manual</a>"
1785
  msgstr ""
1786
 
1787
- #: admin/views/placement-form.php:59
1788
  msgid "Please select a placement type."
1789
  msgstr ""
1790
 
1791
- #: admin/views/placement-form.php:61
1792
  msgid "Choose a Name"
1793
  msgstr ""
1794
 
1795
- #: admin/views/placement-form.php:62
1796
  msgid "The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. <em>Below Post Headline</em>."
1797
  msgstr ""
1798
 
1799
- #: admin/views/placement-form.php:64
1800
  msgid "Placement Name"
1801
  msgstr ""
1802
 
1803
- #: admin/views/placement-form.php:65
1804
  msgid "Please enter a name for your placement."
1805
  msgstr ""
1806
 
1807
- #: admin/views/placement-form.php:66
1808
  msgid "Choose the Ad or Group"
1809
  msgstr ""
1810
 
1811
- #: admin/views/placement-form.php:67
1812
  msgid "The ad or group that should be displayed."
1813
  msgstr ""
1814
 
1815
- #: admin/views/placement-form.php:69
1816
  #: admin/views/placements-item.php:10
1817
  msgid "--not selected--"
1818
  msgstr ""
1819
 
1820
- #: admin/views/placement-form.php:86
1821
  msgid "Save New Placement"
1822
  msgstr ""
1823
 
@@ -1888,11 +1981,6 @@ msgstr ""
1888
  msgid "Header (Manual)"
1889
  msgstr ""
1890
 
1891
- #: admin/views/placement-injection-top.php:90
1892
- #: admin/views/placement-injection-top.php:94
1893
- msgid "Custom Position"
1894
- msgstr ""
1895
-
1896
  #: admin/views/placement-injection-top.php:90
1897
  msgid "Show Pro Places"
1898
  msgstr ""
@@ -1970,12 +2058,12 @@ msgid "Placements updated"
1970
  msgstr ""
1971
 
1972
  #: admin/views/placements.php:22
1973
- #: admin/views/placements.php:254
1974
  msgid "Create a new placement"
1975
  msgstr ""
1976
 
1977
  #: admin/views/placements.php:23
1978
- #: admin/views/placements.php:256
1979
  msgid "New Placement"
1980
  msgstr ""
1981
 
@@ -2022,21 +2110,50 @@ msgstr ""
2022
  msgid "ad label"
2023
  msgstr ""
2024
 
2025
- #: admin/views/placements.php:204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2026
  msgid "show all options"
2027
  msgstr ""
2028
 
2029
  #. translators: %s is a URL.
2030
- #: admin/views/placements.php:225
2031
  msgid "Tutorial: <a href=\"%s\" target=\"_blank\">How to place visible ads in the header of your website</a>."
2032
  msgstr ""
2033
 
2034
- #: admin/views/placements.php:245
2035
  msgctxt "checkbox to remove placement"
2036
  msgid "delete"
2037
  msgstr ""
2038
 
2039
- #: admin/views/placements.php:252
2040
  msgid "Save Placements"
2041
  msgstr ""
2042
 
@@ -2185,8 +2302,8 @@ msgstr ""
2185
  msgid "Disable %1$sAd Health%2$s in frontend and backend, warnings and internal notices like tips, tutorials, email newsletters and update notices."
2186
  msgstr ""
2187
 
2188
- #: admin/views/settings/general/disable-post-types.php:1
2189
- msgid "Pro feature"
2190
  msgstr ""
2191
 
2192
  #: admin/views/settings/general/disable-shortcode-button.php:2
@@ -2315,7 +2432,7 @@ msgid "main query"
2315
  msgstr ""
2316
 
2317
  #: classes/ad-debug.php:121
2318
- #: public/class-advanced-ads.php:685
2319
  msgctxt "ad group singular name"
2320
  msgid "Ad Group"
2321
  msgstr ""
@@ -2689,19 +2806,19 @@ msgstr ""
2689
  msgid "days"
2690
  msgstr ""
2691
 
2692
- #: classes/EDD_SL_Plugin_Updater.php:228
2693
  msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
2694
  msgstr ""
2695
 
2696
- #: classes/EDD_SL_Plugin_Updater.php:236
2697
  msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s."
2698
  msgstr ""
2699
 
2700
- #: classes/EDD_SL_Plugin_Updater.php:479
2701
  msgid "You do not have permission to install plugin updates"
2702
  msgstr ""
2703
 
2704
- #: classes/EDD_SL_Plugin_Updater.php:479
2705
  msgid "Error"
2706
  msgstr ""
2707
 
@@ -3769,7 +3886,7 @@ msgid "When you click the button below Advanced Ads will create an XML file for
3769
  msgstr ""
3770
 
3771
  #: modules/import-export/views/page.php:24
3772
- #: public/class-advanced-ads.php:694
3773
  msgid "Groups"
3774
  msgstr ""
3775
 
@@ -3854,76 +3971,76 @@ msgstr ""
3854
  msgid "Advanced Ads Error: %s"
3855
  msgstr ""
3856
 
3857
- #: public/class-advanced-ads.php:684
3858
  msgctxt "ad group general name"
3859
  msgid "Ad Groups & Rotations"
3860
  msgstr ""
3861
 
3862
- #: public/class-advanced-ads.php:686
3863
  msgid "Search Ad Groups"
3864
  msgstr ""
3865
 
3866
- #: public/class-advanced-ads.php:687
3867
  msgid "All Ad Groups"
3868
  msgstr ""
3869
 
3870
- #: public/class-advanced-ads.php:688
3871
  msgid "Parent Ad Groups"
3872
  msgstr ""
3873
 
3874
- #: public/class-advanced-ads.php:689
3875
  msgid "Parent Ad Groups:"
3876
  msgstr ""
3877
 
3878
- #: public/class-advanced-ads.php:690
3879
  msgid "Edit Ad Group"
3880
  msgstr ""
3881
 
3882
- #: public/class-advanced-ads.php:691
3883
  msgid "Update Ad Group"
3884
  msgstr ""
3885
 
3886
- #: public/class-advanced-ads.php:692
3887
  msgid "Add New Ad Group"
3888
  msgstr ""
3889
 
3890
- #: public/class-advanced-ads.php:693
3891
  msgid "New Ad Groups Name"
3892
  msgstr ""
3893
 
3894
- #: public/class-advanced-ads.php:695
3895
  msgid "No Ad Group found"
3896
  msgstr ""
3897
 
3898
- #: public/class-advanced-ads.php:725
3899
  msgid "Edit Ad"
3900
  msgstr ""
3901
 
3902
- #: public/class-advanced-ads.php:727
3903
  msgid "View"
3904
  msgstr ""
3905
 
3906
- #: public/class-advanced-ads.php:728
3907
  msgid "View the Ad"
3908
  msgstr ""
3909
 
3910
- #: public/class-advanced-ads.php:729
3911
  msgid "Search Ads"
3912
  msgstr ""
3913
 
3914
- #: public/class-advanced-ads.php:730
3915
  msgid "No Ads found"
3916
  msgstr ""
3917
 
3918
- #: public/class-advanced-ads.php:731
3919
  msgid "No Ads found in Trash"
3920
  msgstr ""
3921
 
3922
- #: public/class-advanced-ads.php:732
3923
  msgid "Parent Ad"
3924
  msgstr ""
3925
 
3926
- #: public/class-advanced-ads.php:871
3927
  msgctxt "label above ads"
3928
  msgid "Advertisements"
3929
  msgstr ""
2
  # This file is distributed under the same license as the Advanced Ads plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Advanced Ads 1.17.11\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads-git\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: webgilde <support@wpadvancedads.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-04-27T10:45:44+02:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: advanced-ads\n"
91
  msgstr ""
92
 
93
  #: admin/class-advanced-ads-admin.php:414
94
+ #: admin/includes/class-menu.php:156
95
+ #: admin/includes/class-menu.php:159
96
  #: admin/views/settings.php:29
97
  msgid "Support"
98
  msgstr ""
318
  #: modules/import-export/classes/import.php:146
319
  #: modules/import-export/classes/import.php:186
320
  #: modules/import-export/classes/import.php:564
321
+ #: public/class-advanced-ads.php:735
322
  msgid "Edit"
323
  msgstr ""
324
 
511
  msgid "any expiry date"
512
  msgstr ""
513
 
514
+ #: admin/includes/class-menu.php:66
515
+ #: admin/includes/class-menu.php:89
 
516
  #: admin/includes/class-menu.php:100
517
+ #: admin/includes/class-menu.php:101
518
  msgid "Overview"
519
  msgstr ""
520
 
 
521
  #: admin/includes/class-menu.php:80
522
+ #: admin/includes/class-menu.php:81
523
  #: admin/includes/class-shortcode-creator.php:101
524
  #: admin/views/ad-group-list-form-row.php:91
525
  #: admin/views/ad-group-list-header.php:16
526
+ #: admin/views/placement-form.php:88
527
  #: admin/views/placements-item.php:24
528
  #: classes/widget.php:129
529
  #: modules/gutenberg/includes/class-gutenberg.php:79
530
  #: modules/import-export/views/page.php:23
531
+ #: public/class-advanced-ads.php:731
532
  msgid "Ads"
533
  msgstr ""
534
 
535
+ #: admin/includes/class-menu.php:112
536
+ #: public/class-advanced-ads.php:734
537
  msgid "Add New Ad"
538
  msgstr ""
539
 
540
+ #: admin/includes/class-menu.php:113
541
  #: admin/views/ad-group-list-ads.php:36
542
+ #: public/class-advanced-ads.php:733
543
+ #: public/class-advanced-ads.php:737
544
  msgid "New Ad"
545
  msgstr ""
546
 
547
+ #: admin/includes/class-menu.php:121
548
  msgid "Ad Groups & Rotations"
549
  msgstr ""
550
 
551
+ #: admin/includes/class-menu.php:122
552
  msgid "Groups & Rotation"
553
  msgstr ""
554
 
555
+ #: admin/includes/class-menu.php:131
556
  msgid "Ad Placements"
557
  msgstr ""
558
 
559
+ #: admin/includes/class-menu.php:132
560
  #: admin/includes/class-shortcode-creator.php:115
561
  #: admin/views/placements.php:53
562
  #: classes/widget.php:115
565
  msgid "Placements"
566
  msgstr ""
567
 
568
+ #: admin/includes/class-menu.php:140
569
  msgid "Advanced Ads Settings"
570
  msgstr ""
571
 
572
+ #: admin/includes/class-menu.php:141
573
  msgid "Settings"
574
  msgstr ""
575
 
576
+ #: admin/includes/class-menu.php:176
577
+ #: admin/includes/class-menu.php:180
578
  #: admin/includes/class-settings.php:272
579
  msgid "Licenses"
580
  msgstr ""
581
 
582
+ #: admin/includes/class-menu.php:282
583
+ #: admin/includes/class-menu.php:307
584
  msgid "Sorry, you are not allowed to access this feature."
585
  msgstr ""
586
 
587
+ #: admin/includes/class-menu.php:294
588
  msgid "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was deleted?"
589
  msgstr ""
590
 
607
  msgstr ""
608
 
609
  #: admin/includes/class-meta-box.php:104
610
+ #: admin/views/placements.php:203
611
  #: classes/ad-debug.php:152
612
  msgid "Display Conditions"
613
  msgstr ""
614
 
615
  #: admin/includes/class-meta-box.php:112
616
+ #: admin/views/placements.php:212
617
  #: classes/ad-debug.php:239
618
  msgid "Visitor Conditions"
619
  msgstr ""
630
  #: admin/includes/class-meta-box.php:218
631
  #: admin/includes/class-meta-box.php:223
632
  #: admin/includes/class-overview-widgets.php:182
633
+ #: admin/views/ad-output-metabox.php:61
634
  #: admin/views/settings/general/custom-label.php:9
635
  #: modules/ads-txt/admin/views/setting-create.php:11
636
  #: modules/privacy/admin/views/setting-enable.php:2
806
  msgid "ad grids and many more advanced features"
807
  msgstr ""
808
 
809
+ #: admin/includes/class-overview-widgets.php:547
810
  msgid "Analyze clicks and impressions of your ads locally or in Google Analytics, share reports, and limit ads to a specific number of impressions or clicks."
811
  msgstr ""
812
 
813
+ #: admin/includes/class-overview-widgets.php:553
814
  msgid "Display ads based on the device or the size of your visitor’s browser, and control ads on AMP pages."
815
  msgstr ""
816
 
817
  #: admin/includes/class-overview-widgets.php:559
818
+ msgid "A quick and error-free way of implementing ad units from your Google Ad Manager account."
819
  msgstr ""
820
 
821
  #: admin/includes/class-overview-widgets.php:565
831
  msgstr ""
832
 
833
  #: admin/includes/class-overview-widgets.php:583
834
+ msgid "Earn more money and let advertisers pay for ad space directly on the frontend of your site."
835
  msgstr ""
836
 
837
  #: admin/includes/class-overview-widgets.php:589
838
+ msgid "Create a beautiful and simple slider from your ads to show more information on less space."
839
+ msgstr ""
840
+
841
+ #: admin/includes/class-overview-widgets.php:595
842
  msgid "Place AdSense In-feed ads between posts on homepage, category, and archive pages."
843
  msgstr ""
844
 
845
+ #: admin/includes/class-overview-widgets.php:598
846
+ #: admin/includes/class-overview-widgets.php:788
847
+ #: admin/includes/class-overview-widgets.php:804
848
  msgid "Install now"
849
  msgstr ""
850
 
851
+ #: admin/includes/class-overview-widgets.php:616
852
+ #: admin/includes/class-overview-widgets.php:634
853
+ #: admin/includes/class-overview-widgets.php:659
854
+ #: admin/includes/class-overview-widgets.php:677
855
+ #: admin/includes/class-overview-widgets.php:695
856
+ #: admin/includes/class-overview-widgets.php:713
857
+ #: admin/includes/class-overview-widgets.php:731
858
+ #: admin/includes/class-overview-widgets.php:749
859
+ #: admin/includes/class-overview-widgets.php:767
860
  msgid "Activate now"
861
  msgstr ""
862
 
863
+ #: admin/includes/class-overview-widgets.php:642
864
  msgid "Visit your ad stats"
865
  msgstr ""
866
 
867
+ #: admin/includes/class-overview-widgets.php:784
868
  msgid "Use Genesis specific ad positions."
869
  msgstr ""
870
 
871
+ #: admin/includes/class-overview-widgets.php:800
872
  msgid "Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
873
  msgstr ""
874
 
875
+ #: admin/includes/class-overview-widgets.php:816
876
  msgid "Our best deal with all add-ons included."
877
  msgstr ""
878
 
879
+ #: admin/includes/class-overview-widgets.php:818
880
  msgid "Get full access"
881
  msgstr ""
882
 
883
+ #: admin/includes/class-overview-widgets.php:834
884
  #: admin/views/conditions/ad-display-metabox.php:37
885
  #: admin/views/conditions/ad-visitor-metabox.php:37
886
  msgid "Visit the manual"
887
  msgstr ""
888
 
889
+ #: admin/includes/class-overview-widgets.php:837
890
  msgid "Get this add-on"
891
  msgstr ""
892
 
985
  msgstr ""
986
 
987
  #: admin/includes/class-shortcode-creator.php:108
988
+ #: admin/views/placement-form.php:81
989
  #: admin/views/placements-item.php:12
990
  #: classes/widget.php:122
991
  #: modules/gutenberg/includes/class-gutenberg.php:80
1141
  #: classes/ad-debug.php:118
1142
  #: classes/ad-debug.php:167
1143
  #: classes/ad-debug.php:169
1144
+ #: public/class-advanced-ads.php:732
1145
  msgid "Ad"
1146
  msgstr ""
1147
 
1420
  msgid "Enable debug mode"
1421
  msgstr ""
1422
 
1423
+ #: admin/views/ad-output-metabox.php:66
1424
+ msgid "Display only once"
1425
+ msgstr ""
1426
+
1427
+ #: admin/views/ad-output-metabox.php:69
1428
+ msgid "Display the ad only once per page"
1429
+ msgstr ""
1430
+
1431
+ #: admin/views/ad-output-metabox.php:73
1432
+ msgid "Custom Code"
1433
+ msgstr ""
1434
+
1435
+ #: admin/views/ad-output-metabox.php:76
1436
+ msgid "Place your own code below the ad"
1437
+ msgstr ""
1438
+
1439
  #: admin/views/ad-parameters-size.php:9
1440
  msgid "size"
1441
  msgstr ""
1749
  msgid "All Access – with all available add-ons"
1750
  msgstr ""
1751
 
1752
+ #: admin/views/pitches/all-access.php:13
1753
  msgid "Risk free with 30-day Money-Back guarantee"
1754
  msgstr ""
1755
 
1756
+ #: admin/views/pitches/all-access.php:14
1757
  msgid "Get All Access"
1758
  msgstr ""
1759
 
1760
+ #: admin/views/pitches/pro-feature-link.php:1
1761
+ msgid "Pro Feature"
1762
+ msgstr ""
1763
+
1764
+ #: admin/views/pitches/pro-placements.php:6
1765
+ msgid "Random Paragraph"
1766
+ msgstr ""
1767
+
1768
+ #: admin/views/pitches/pro-placements.php:7
1769
+ msgid "After a random paragraph in the main content."
1770
+ msgstr ""
1771
+
1772
+ #: admin/views/pitches/pro-placements.php:12
1773
+ msgid "Above Headline"
1774
+ msgstr ""
1775
+
1776
+ #: admin/views/pitches/pro-placements.php:13
1777
+ msgid "Above the main headline on the page (&lt;h1&gt;)."
1778
+ msgstr ""
1779
+
1780
+ #: admin/views/pitches/pro-placements.php:18
1781
+ msgid "Content Middle"
1782
+ msgstr ""
1783
+
1784
+ #: admin/views/pitches/pro-placements.php:19
1785
+ msgid "In the middle of the main content based on the number of paragraphs."
1786
+ msgstr ""
1787
+
1788
+ #: admin/views/pitches/pro-placements.php:24
1789
+ #: admin/views/placement-injection-top.php:90
1790
+ #: admin/views/placement-injection-top.php:94
1791
+ msgid "Custom Position"
1792
+ msgstr ""
1793
+
1794
+ #: admin/views/pitches/pro-placements.php:25
1795
+ msgid "Attach the ad to any element in the frontend."
1796
+ msgstr ""
1797
+
1798
+ #: admin/views/pitches/pro-placements.php:30
1799
+ msgid "Post Lists"
1800
+ msgstr ""
1801
+
1802
+ #: admin/views/pitches/pro-placements.php:31
1803
+ msgid "Display the ad between posts on post lists, e.g. home, archives, search etc."
1804
+ msgstr ""
1805
+
1806
+ #: admin/views/pitches/pro-placements.php:35
1807
+ msgid "Background Ad"
1808
+ msgstr ""
1809
+
1810
+ #: admin/views/pitches/pro-placements.php:36
1811
+ msgid "Background of the website behind the main wrapper."
1812
+ msgstr ""
1813
+
1814
+ #: admin/views/pitches/pro-placements.php:43
1815
+ msgid "BuddyPress Content"
1816
+ msgstr ""
1817
+
1818
+ #: admin/views/pitches/pro-placements.php:44
1819
+ msgid "Display ads on BuddyPress related pages."
1820
+ msgstr ""
1821
+
1822
+ #: admin/views/pitches/pro-placements.php:51
1823
+ msgid "bbPress Content"
1824
+ msgstr ""
1825
+
1826
+ #: admin/views/pitches/pro-placements.php:52
1827
+ msgid "Display ads in content created with bbPress."
1828
+ msgstr ""
1829
+
1830
  #: admin/views/pitches/pro-tab.php:2
1831
  msgid "Advanced Ads Pro – test and optimize your ad performance"
1832
  msgstr ""
1877
  msgid "Placement types define where the ad is going to be displayed. Learn more about the different types from the <a href=\"%s\">manual</a>"
1878
  msgstr ""
1879
 
1880
+ #: admin/views/placement-form.php:69
1881
  msgid "Please select a placement type."
1882
  msgstr ""
1883
 
1884
+ #: admin/views/placement-form.php:71
1885
  msgid "Choose a Name"
1886
  msgstr ""
1887
 
1888
+ #: admin/views/placement-form.php:72
1889
  msgid "The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. <em>Below Post Headline</em>."
1890
  msgstr ""
1891
 
1892
+ #: admin/views/placement-form.php:74
1893
  msgid "Placement Name"
1894
  msgstr ""
1895
 
1896
+ #: admin/views/placement-form.php:75
1897
  msgid "Please enter a name for your placement."
1898
  msgstr ""
1899
 
1900
+ #: admin/views/placement-form.php:76
1901
  msgid "Choose the Ad or Group"
1902
  msgstr ""
1903
 
1904
+ #: admin/views/placement-form.php:77
1905
  msgid "The ad or group that should be displayed."
1906
  msgstr ""
1907
 
1908
+ #: admin/views/placement-form.php:79
1909
  #: admin/views/placements-item.php:10
1910
  msgid "--not selected--"
1911
  msgstr ""
1912
 
1913
+ #: admin/views/placement-form.php:96
1914
  msgid "Save New Placement"
1915
  msgstr ""
1916
 
1981
  msgid "Header (Manual)"
1982
  msgstr ""
1983
 
 
 
 
 
 
1984
  #: admin/views/placement-injection-top.php:90
1985
  msgid "Show Pro Places"
1986
  msgstr ""
2058
  msgstr ""
2059
 
2060
  #: admin/views/placements.php:22
2061
+ #: admin/views/placements.php:291
2062
  msgid "Create a new placement"
2063
  msgstr ""
2064
 
2065
  #: admin/views/placements.php:23
2066
+ #: admin/views/placements.php:293
2067
  msgid "New Placement"
2068
  msgstr ""
2069
 
2110
  msgid "ad label"
2111
  msgstr ""
2112
 
2113
+ #: admin/views/placements.php:205
2114
+ msgid "Use display conditions for placements."
2115
+ msgstr ""
2116
+
2117
+ #: admin/views/placements.php:206
2118
+ #: admin/views/placements.php:215
2119
+ msgid "The free version provides conditions on the ad edit page."
2120
+ msgstr ""
2121
+
2122
+ #: admin/views/placements.php:214
2123
+ msgid "Use visitor conditions for placements."
2124
+ msgstr ""
2125
+
2126
+ #: admin/views/placements.php:221
2127
+ msgid "Minimum Content Length"
2128
+ msgstr ""
2129
+
2130
+ #: admin/views/placements.php:223
2131
+ msgid "Minimum length of content before automatically injected ads are allowed in them."
2132
+ msgstr ""
2133
+
2134
+ #: admin/views/placements.php:229
2135
+ msgid "Words Between Ads"
2136
+ msgstr ""
2137
+
2138
+ #: admin/views/placements.php:231
2139
+ msgid "A minimum amount of words between automatically injected ads."
2140
+ msgstr ""
2141
+
2142
+ #: admin/views/placements.php:241
2143
  msgid "show all options"
2144
  msgstr ""
2145
 
2146
  #. translators: %s is a URL.
2147
+ #: admin/views/placements.php:262
2148
  msgid "Tutorial: <a href=\"%s\" target=\"_blank\">How to place visible ads in the header of your website</a>."
2149
  msgstr ""
2150
 
2151
+ #: admin/views/placements.php:282
2152
  msgctxt "checkbox to remove placement"
2153
  msgid "delete"
2154
  msgstr ""
2155
 
2156
+ #: admin/views/placements.php:289
2157
  msgid "Save Placements"
2158
  msgstr ""
2159
 
2302
  msgid "Disable %1$sAd Health%2$s in frontend and backend, warnings and internal notices like tips, tutorials, email newsletters and update notices."
2303
  msgstr ""
2304
 
2305
+ #: admin/views/settings/general/disable-post-types.php:15
2306
+ msgid "The free version provides the post type display condition on the ad edit page."
2307
  msgstr ""
2308
 
2309
  #: admin/views/settings/general/disable-shortcode-button.php:2
2432
  msgstr ""
2433
 
2434
  #: classes/ad-debug.php:121
2435
+ #: public/class-advanced-ads.php:696
2436
  msgctxt "ad group singular name"
2437
  msgid "Ad Group"
2438
  msgstr ""
2806
  msgid "days"
2807
  msgstr ""
2808
 
2809
+ #: classes/EDD_SL_Plugin_Updater.php:262
2810
  msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
2811
  msgstr ""
2812
 
2813
+ #: classes/EDD_SL_Plugin_Updater.php:270
2814
  msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s."
2815
  msgstr ""
2816
 
2817
+ #: classes/EDD_SL_Plugin_Updater.php:513
2818
  msgid "You do not have permission to install plugin updates"
2819
  msgstr ""
2820
 
2821
+ #: classes/EDD_SL_Plugin_Updater.php:513
2822
  msgid "Error"
2823
  msgstr ""
2824
 
3886
  msgstr ""
3887
 
3888
  #: modules/import-export/views/page.php:24
3889
+ #: public/class-advanced-ads.php:705
3890
  msgid "Groups"
3891
  msgstr ""
3892
 
3971
  msgid "Advanced Ads Error: %s"
3972
  msgstr ""
3973
 
3974
+ #: public/class-advanced-ads.php:695
3975
  msgctxt "ad group general name"
3976
  msgid "Ad Groups & Rotations"
3977
  msgstr ""
3978
 
3979
+ #: public/class-advanced-ads.php:697
3980
  msgid "Search Ad Groups"
3981
  msgstr ""
3982
 
3983
+ #: public/class-advanced-ads.php:698
3984
  msgid "All Ad Groups"
3985
  msgstr ""
3986
 
3987
+ #: public/class-advanced-ads.php:699
3988
  msgid "Parent Ad Groups"
3989
  msgstr ""
3990
 
3991
+ #: public/class-advanced-ads.php:700
3992
  msgid "Parent Ad Groups:"
3993
  msgstr ""
3994
 
3995
+ #: public/class-advanced-ads.php:701
3996
  msgid "Edit Ad Group"
3997
  msgstr ""
3998
 
3999
+ #: public/class-advanced-ads.php:702
4000
  msgid "Update Ad Group"
4001
  msgstr ""
4002
 
4003
+ #: public/class-advanced-ads.php:703
4004
  msgid "Add New Ad Group"
4005
  msgstr ""
4006
 
4007
+ #: public/class-advanced-ads.php:704
4008
  msgid "New Ad Groups Name"
4009
  msgstr ""
4010
 
4011
+ #: public/class-advanced-ads.php:706
4012
  msgid "No Ad Group found"
4013
  msgstr ""
4014
 
4015
+ #: public/class-advanced-ads.php:736
4016
  msgid "Edit Ad"
4017
  msgstr ""
4018
 
4019
+ #: public/class-advanced-ads.php:738
4020
  msgid "View"
4021
  msgstr ""
4022
 
4023
+ #: public/class-advanced-ads.php:739
4024
  msgid "View the Ad"
4025
  msgstr ""
4026
 
4027
+ #: public/class-advanced-ads.php:740
4028
  msgid "Search Ads"
4029
  msgstr ""
4030
 
4031
+ #: public/class-advanced-ads.php:741
4032
  msgid "No Ads found"
4033
  msgstr ""
4034
 
4035
+ #: public/class-advanced-ads.php:742
4036
  msgid "No Ads found in Trash"
4037
  msgstr ""
4038
 
4039
+ #: public/class-advanced-ads.php:743
4040
  msgid "Parent Ad"
4041
  msgstr ""
4042
 
4043
+ #: public/class-advanced-ads.php:882
4044
  msgctxt "label above ads"
4045
  msgid "Advertisements"
4046
  msgstr ""
lib/composer/autoload_real.php CHANGED
@@ -13,6 +13,9 @@ class ComposerAutoloaderInit_advanced_ads
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \AdvancedAds\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
modules/gadsense/admin/assets/js/adsense.js CHANGED
@@ -651,7 +651,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
651
  $row.children('.unittype').text(type);
652
  });
653
 
654
- jQuery( document ).on('change', '#unit-type, #unit-code', function () {
655
  that.checkAdSlotId(this);
656
  });
657
 
651
  $row.children('.unittype').text(type);
652
  });
653
 
654
+ jQuery( document ).on('change', '#unit-type, #unit-code, #ad-layout-key', function () {
655
  that.checkAdSlotId(this);
656
  });
657
 
public/class-advanced-ads.php CHANGED
@@ -79,7 +79,7 @@ class Advanced_Ads {
79
  *
80
  * @var array list of bots
81
  */
82
- protected $bots = array( 'bot', 'spider', 'crawler', 'scraper', 'parser', '008', 'Accoona-AI-Agent', 'ADmantX', 'alexa', 'appie', 'Apple-PubSub', 'Arachmo', 'Ask Jeeves', 'avira\.com', 'B-l-i-t-z-B-O-T', 'boitho\.com-dc', 'BUbiNG', 'Cerberian Drtrs', 'Charlotte', 'cosmos', 'Covario IDS', 'curl', 'DataparkSearch', 'DDG-Android', 'expo9', 'facebookexternalhit', 'Feedfetcher-Google', 'FindLinks', 'Firefly', 'froogle', 'Genieo', 'heritrix', 'Holmes', 'htdig', 'https://developers\.google\.com', 'ia_archiver', 'ichiro', 'igdeSpyder', 'InfoSeek', 'inktomi', 'Kraken', 'L\.webis', 'Larbin', 'Linguee', 'LinkWalker', 'looksmart', 'lwp-trivial', 'mabontland', 'Mnogosearch', 'mogimogi', 'Morning Paper', 'MVAClient', 'NationalDirectory', 'NetResearchServer', 'NewsGator', 'NG-Search', 'Nusearch', 'NutchCVS', 'Nymesis', 'oegp', 'Orbiter', 'Peew', 'Pompos', 'PostPost', 'proximic', 'PycURL', 'Qseero', 'rabaz', 'Radian6', 'Reeder', 'savetheworldheritage', 'SBIder', 'Scooter', 'ScoutJet', 'Scrubby', 'SearchSight', 'semanticdiscovery', 'Sensis', 'ShopWiki', 'silk', 'Snappy', 'Spade', 'Sqworm', 'StackRambler', 'TechnoratiSnoop', 'TECNOSEEK', 'Teoma', 'Thumbnail\.CZ', 'TinEye', 'truwoGPS', 'updated', 'Vagabondo', 'voltron', 'Vortex', 'voyager', 'VYU2', 'WebBug', 'webcollage', 'WebIndex', 'Websquash\.com', 'WeSEE:Ads', 'wf84', 'Wget', 'WomlpeFactory', 'WordPress', 'yacy', 'Yahoo! Slurp', 'Yahoo! Slurp China', 'YahooSeeker', 'YahooSeeker-Testing', 'YandexBot', 'YandexMedia', 'YandexBlogs', 'YandexNews', 'YandexCalendar', 'YandexImages', 'Yeti', 'yoogliFetchAgent', 'Zao', 'ZyBorg', 'okhttp', 'ips-agent', 'ltx71', 'Optimizer', 'Daum', 'Qwantify' );
83
 
84
  /**
85
  * Loaded instance of Advanced_Ads_Model
@@ -624,6 +624,17 @@ class Advanced_Ads {
624
  return true;
625
  }
626
 
 
 
 
 
 
 
 
 
 
 
 
627
  /**
628
  * Check if the current user is a bot prepopulating the cache
629
  * Ads should be loaded for the bot, because they should show up on the cached site
@@ -875,12 +886,17 @@ class Advanced_Ads {
875
  }
876
 
877
  /**
878
- * Retrieve the number of ads in any status except trash
 
 
 
 
 
879
  */
880
- public static function get_number_of_ads() {
881
  // query number of ads only, if not retrieved, yet.
882
  if ( self::get_instance()->number_of_ads === false ) {
883
- $args = array( 'post_status' => 'any' );
884
  $recent_ads = self::get_instance()->get_model()->get_ads( $args );
885
  self::get_instance()->number_of_ads = count( $recent_ads );
886
  }
79
  *
80
  * @var array list of bots
81
  */
82
+ protected $bots = array( 'bot', 'spider', 'crawler', 'scraper', 'parser', '008', 'Accoona-AI-Agent', 'ADmantX', 'alexa', 'appie', 'Apple-PubSub', 'Arachmo', 'Ask Jeeves', 'avira\.com', 'B-l-i-t-z-B-O-T', 'boitho\.com-dc', 'BUbiNG', 'Cerberian Drtrs', 'Charlotte', 'cosmos', 'Covario IDS', 'curl', 'Datanyze', 'DataparkSearch', 'DDG-Android', 'Ecosia', 'expo9', 'facebookexternalhit', 'Feedfetcher-Google', 'FindLinks', 'Firefly', 'froogle', 'Genieo', 'heritrix', 'Holmes', 'htdig', 'https://developers\.google\.com', 'ia_archiver', 'ichiro', 'igdeSpyder', 'InfoSeek', 'inktomi', 'Kraken', 'L\.webis', 'Larbin', 'Linguee', 'LinkWalker', 'looksmart', 'lwp-trivial', 'mabontland', 'Mnogosearch', 'mogimogi', 'Morning Paper', 'MVAClient', 'NationalDirectory', 'NetResearchServer', 'NewsGator', 'NG-Search', 'Nusearch', 'NutchCVS', 'Nymesis', 'oegp', 'Orbiter', 'Peew', 'Pompos', 'PostPost', 'proximic', 'PycURL', 'Qseero', 'rabaz', 'Radian6', 'Reeder', 'savetheworldheritage', 'SBIder', 'Scooter', 'ScoutJet', 'Scrubby', 'SearchSight', 'semanticdiscovery', 'Sensis', 'ShopWiki', 'silk', 'Snappy', 'Spade', 'Sqworm', 'StackRambler', 'TechnoratiSnoop', 'TECNOSEEK', 'Teoma', 'Thumbnail\.CZ', 'TinEye', 'truwoGPS', 'updated', 'Vagabondo', 'voltron', 'Vortex', 'voyager', 'VYU2', 'WebBug', 'webcollage', 'WebIndex', 'Websquash\.com', 'WeSEE:Ads', 'wf84', 'Wget', 'WomlpeFactory', 'WordPress', 'yacy', 'Yahoo! Slurp', 'Yahoo! Slurp China', 'YahooSeeker', 'YahooSeeker-Testing', 'YandexBot', 'YandexMedia', 'YandexBlogs', 'YandexNews', 'YandexCalendar', 'YandexImages', 'Yeti', 'yoogliFetchAgent', 'Zao', 'ZyBorg', 'okhttp', 'ips-agent', 'ltx71', 'Optimizer', 'Daum', 'Qwantify' );
83
 
84
  /**
85
  * Loaded instance of Advanced_Ads_Model
624
  return true;
625
  }
626
 
627
+ /**
628
+ * Get the array of known bots.
629
+ *
630
+ * @param bool $filter Whether to apply filters.
631
+ *
632
+ * @return array
633
+ */
634
+ public function get_bots( $filter = true ) {
635
+ return (array) ( $filter ? apply_filters( 'advanced-ads-bots', $this->bots ) : $this->bots );
636
+ }
637
+
638
  /**
639
  * Check if the current user is a bot prepopulating the cache
640
  * Ads should be loaded for the bot, because they should show up on the cached site
886
  }
887
 
888
  /**
889
+ * Retrieve the number of ads in any status
890
+ * excludes trash status by default
891
+ *
892
+ * @param string|array $post_status default post status.
893
+ *
894
+ * @return int number of ads.
895
  */
896
+ public static function get_number_of_ads( $post_status = 'any' ) {
897
  // query number of ads only, if not retrieved, yet.
898
  if ( self::get_instance()->number_of_ads === false ) {
899
+ $args = array( 'post_status' => $post_status );
900
  $recent_ads = self::get_instance()->get_model()->get_ads( $args );
901
  self::get_instance()->number_of_ads = count( $recent_ads );
902
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ads, ad manager, ad rotation, adsense, banner
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
  Requires PHP: 5.6
7
- Stable tag: 1.17.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -161,9 +161,10 @@ Localizations: Czech, Dutch, English, French, German, Italian, Japanese, Norwegi
161
  >
162
  > * all add-ons include priority email support
163
  > * [Advanced Ads Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/) – powerful tools for ad optimizations: cache-busting, more placements, lazy load, ad blocker module, click fraud, and more
164
- > * [Geo Targeting](https://wpadvancedads.com/add-ons/geo-targeting/) – display ads based on geo location of the visitor
165
  > * [Tracking](https://wpadvancedads.com/add-ons/tracking/) – ad tracking and statistics
166
  > * [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/) – create mobile ads or ads for specific browser sizes and ads on AMP
 
 
167
  > * [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/) – increase click rates with fixed, sticky, and anchor ads
168
  > * [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/) – display ads and other content in layers and popups
169
  > * [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/) - allows you to sell ads on your website fully automated, including payments and advertiser profiles.
@@ -303,10 +304,22 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
303
  10. Convert AdSense ads into AMP automatically (Responsive add-on)
304
 
305
  == Changelog ==
306
- = 1.17.10 =
 
 
 
 
 
 
 
 
 
 
 
307
  * fixed escaped HTML tag in Ad Planning column
308
  * fixed possible JavaScript error caused by Ad Health checks
309
  * fixed possible third-party conflict causing the ad group filter to throw an exception
 
310
 
311
  = 1.17.9 =
312
 
4
  Requires at least: 4.6
5
  Tested up to: 5.4
6
  Requires PHP: 5.6
7
+ Stable tag: 1.17.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
161
  >
162
  > * all add-ons include priority email support
163
  > * [Advanced Ads Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/) – powerful tools for ad optimizations: cache-busting, more placements, lazy load, ad blocker module, click fraud, and more
 
164
  > * [Tracking](https://wpadvancedads.com/add-ons/tracking/) – ad tracking and statistics
165
  > * [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/) – create mobile ads or ads for specific browser sizes and ads on AMP
166
+ > * [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/) – a quick and error-free way to load ad units from GAM / DFP account without touching any ad codes
167
+ > * [Geo Targeting](https://wpadvancedads.com/add-ons/geo-targeting/) – display ads based on geo location of the visitor
168
  > * [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/) – increase click rates with fixed, sticky, and anchor ads
169
  > * [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/) – display ads and other content in layers and popups
170
  > * [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/) - allows you to sell ads on your website fully automated, including payments and advertiser profiles.
304
  10. Convert AdSense ads into AMP automatically (Responsive add-on)
305
 
306
  == Changelog ==
307
+
308
+ = 1.17.11 =
309
+
310
+ * added Datanyze and Ecosia to bots list
311
+ * linked to [Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/)
312
+ * fixed Layout Key field for AdSense ads not saving new values
313
+ * fixed error that broke the wizard when the URL field of image ads contained a wrong value
314
+ * fixed links to manuals
315
+ * fixed unneeded notification shown when ads are disabled on 404 pages
316
+
317
+ = 1.17.10 =
318
+
319
  * fixed escaped HTML tag in Ad Planning column
320
  * fixed possible JavaScript error caused by Ad Health checks
321
  * fixed possible third-party conflict causing the ad group filter to throw an exception
322
+ * removed unneeded notification shown when ads are disabled on 404 pages
323
 
324
  = 1.17.9 =
325