Advanced Ads - Version 1.6

Version Description

THIS IS A MAJOR UPDATE, PLEASE HELP ME WITH YOUR BUG REPORTS

Update post

Changes you can test:

  • fixed ordered ad groups displaying ads with 0 ad weight
  • fixed order of ad groups to deliver ad with highest weight first
  • added option to allow ad injections on archive pages and outside the loop
  • minor layout fix for update button after selecting rich content ad type
  • fixed timestamp issues using GMT only now (might shift old ad expiry timestamps by timezone offset)

Changes under the hood:

  • allow to cache groups when persistend object cache is available
  • pass placement options to underlying ad/ group
  • allow to exchange loaded ad ids for ajax callback
  • fix override option for ad select
  • wp query is now prepared as ad argument on selection
  • moved query based display conditions to own module
  • fixed ajax request parser
  • actually serve placement on injection (and allow to use placement arguments)
  • advanced-ads-ajax-ad-select-init action when ad is going to be selected by ajax call
  • provide action when plugin was loaded
Download this release

Release Info

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

Code changes from version 1.5.5 to 1.6

admin/assets/css/admin.css CHANGED
@@ -17,6 +17,22 @@
17
  /**
18
  * AD EDIT PAGE
19
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  #ad-main-box { overflow: hidden; }
21
  .post-type-advanced_ads #poststuff .meta-box-sortables .inside {
22
  margin: 0;
@@ -157,7 +173,9 @@ tr:hover .on-hover { display: block; }
157
  #adsense-ad-param-error { color: red; font-weight: bold; }
158
 
159
  /**
160
- - TABS
161
  -*/
162
  .advads-tab { display: none; }
163
  .advads-tab.active { display: block; }
 
 
17
  /**
18
  * AD EDIT PAGE
19
  */
20
+ #advads-ad-info-top { position: relative; top: 0; left: 0; padding: 3em; background: #fff; }
21
+ #advads-ad-info-close { position: absolute; top: 1em; right: 1em; font-size: 2em; color: #666; }
22
+ #advads-ad-info-close:hover { cursor: pointer; color: #000; }
23
+ #advads-ad-info-top h2 { font-weight: bold; color: #0074a2; }
24
+ #advads-ad-info-top div pre input { width: 30em; }
25
+ #advads-ad-info-top .ui-accordion .ui-accordion-header { margin-top: 0; border-radius: 0; }
26
+ #advads-ad-info-top .ui-accordion .ui-accordion-content { border-radius: 0; }
27
+
28
+ #advads-ad-info { overflow: hidden; margin-bottom: 1em; }
29
+ #advads-ad-info > * { float: left; margin: 0; line-height: 2em; }
30
+ #advads-ad-info pre { float: left; margin: 0; line-height: 2em; }
31
+ #advads-ad-info > label > span { float: left; margin-right: .5em; }
32
+ #advads-ad-info > label + pre { margin-right: .5em; }
33
+ #advads-ad-info > label { margin-left: 1em; }
34
+ #advads-ad-info pre input { background: transparent; }
35
+
36
  #ad-main-box { overflow: hidden; }
37
  .post-type-advanced_ads #poststuff .meta-box-sortables .inside {
38
  margin: 0;
173
  #adsense-ad-param-error { color: red; font-weight: bold; }
174
 
175
  /**
176
+ - TABS + SETTINGS
177
  -*/
178
  .advads-tab { display: none; }
179
  .advads-tab.active { display: block; }
180
+ .advads-license-activate-active { color: green; }
181
+ .advads-license-activate-error { color: red; }
admin/assets/css/index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden
 
admin/assets/js/admin.js CHANGED
@@ -177,7 +177,7 @@ jQuery( document ).ready(function ($) {
177
  */
178
  // render button sets on settings page
179
  $(function() {
180
- $( ".advads-settings-buttonset" ).buttonset();
181
  });
182
 
183
  /**
@@ -219,6 +219,38 @@ jQuery( document ).ready(function ($) {
219
  });
220
 
221
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  });
223
 
224
  /**
177
  */
178
  // render button sets on settings page
179
  $(function() {
180
+ $( ".advads-settings-buttonset" ).buttonset();
181
  });
182
 
183
  /**
219
  });
220
 
221
  });
222
+
223
+ // activate licenses
224
+ $('.advads-license-activate').click(function(){
225
+
226
+ var button = $(this);
227
+ if( ! this.dataset.addon ) { return }
228
+
229
+ var query = {
230
+ action: 'advads-activate-license',
231
+ addon: this.dataset.addon,
232
+ pluginname: this.dataset.pluginname,
233
+ optionslug: this.dataset.optionslug,
234
+ security: $('#advads-licenses-ajax-referrer').val()
235
+ };
236
+
237
+ // show loader
238
+ $( '<span class="spinner advads-spinner"></span>' ).insertAfter( button );
239
+
240
+ // send and close message
241
+ $.post(ajaxurl, query, function (r) {
242
+ // remove spinner
243
+ $('span.spinner').remove();
244
+
245
+ if( r === '1' ){
246
+ button.siblings('.advads-license-activate-error').remove();
247
+ button.fadeOut();
248
+ button.siblings('.advads-license-activate-active').fadeIn();
249
+ } else {
250
+ button.next('.advads-license-activate-error').text( r );
251
+ }
252
+ });
253
+ });
254
  });
255
 
256
  /**
admin/assets/js/index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden
 
admin/class-advanced-ads-admin.php CHANGED
@@ -98,6 +98,7 @@ class Advanced_Ads_Admin {
98
  add_action( 'admin_menu', array($this, 'add_plugin_admin_menu') );
99
 
100
  // on post/ad edit screen
 
101
  add_action( 'edit_form_after_title', array($this, 'edit_form_below_title') );
102
  add_action( 'admin_init', array($this, 'add_meta_boxes') );
103
  add_action( 'post_submitbox_misc_actions', array($this, 'add_submit_box_meta') );
@@ -181,6 +182,7 @@ class Advanced_Ads_Admin {
181
 
182
  wp_enqueue_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/admin.js', __FILE__ ), array('jquery', 'jquery-ui-autocomplete'), Advanced_Ads::VERSION );
183
  // jquery ui
 
184
  wp_enqueue_script( 'jquery-ui-button' );
185
 
186
  // just register this script for later inclusion on ad group list page
@@ -389,6 +391,21 @@ class Advanced_Ads_Admin {
389
  );
390
  }
391
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  /**
393
  * add information about the ad below the ad title
394
  *
@@ -439,13 +456,11 @@ class Advanced_Ads_Admin {
439
 
440
  $ad = new Advanced_Ads_Ad( $post->ID );
441
 
442
- $time_adj = current_time( 'timestamp' );
443
-
444
- $curr_day = ( ! empty($ad->expiry_date)) ? date( 'd', $ad->expiry_date ) : gmdate( 'd', $time_adj );
445
- $curr_month = ( ! empty($ad->expiry_date)) ? date( 'm', $ad->expiry_date ) : gmdate( 'm', $time_adj );
446
- $curr_year = ( ! empty($ad->expiry_date)) ? date( 'Y', $ad->expiry_date ) : gmdate( 'Y', $time_adj );
447
-
448
- $enabled = ( ! empty($ad->expiry_date)) ? 1 : 0;
449
 
450
  include ADVADS_BASE_PATH . 'admin/views/ad-submitbox-meta.php';
451
  }
@@ -558,7 +573,10 @@ class Advanced_Ads_Admin {
558
  $year = absint( $_POST['advanced_ad']['expiry_date']['year'] );
559
  $month = absint( $_POST['advanced_ad']['expiry_date']['month'] );
560
  $day = absint( $_POST['advanced_ad']['expiry_date']['day'] );
561
- $ad->expiry_date = mktime( 0, 0, 0, $month, $day, $year );
 
 
 
562
  } else {
563
  $ad->expiry_date = 0;
564
  }
@@ -689,6 +707,14 @@ class Advanced_Ads_Admin {
689
  $hook,
690
  'advanced_ads_setting_section'
691
  );
 
 
 
 
 
 
 
 
692
  // add setting fields for content injection priority
693
  add_settings_field(
694
  'content-injection-priority',
@@ -734,6 +760,8 @@ class Advanced_Ads_Admin {
734
  */
735
  public function render_settings_licenses_section_callback(){
736
  echo '<p>'. __( 'Enter license keys for our powerful <a href="'.ADVADS_URL.'add-ons/" target="_blank">add-ons</a>.', ADVADS_SLUG ) .'</p>';
 
 
737
  }
738
 
739
  /**
@@ -793,6 +821,20 @@ class Advanced_Ads_Admin {
793
  echo '<p class="description">'. sprintf( __( 'Only enable this if you can and want to use the advanced JavaScript functions described <a href="%s">here</a>.', ADVADS_SLUG ), ADVADS_URL . 'javascript-functions/' ) .'</p>';
794
  }
795
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
796
  /**
797
  * render setting for content injection priority
798
  *
@@ -1129,4 +1171,45 @@ class Advanced_Ads_Admin {
1129
  $this->notices = Advanced_Ads_Admin_Notices::get_instance();
1130
  }
1131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1132
  }
98
  add_action( 'admin_menu', array($this, 'add_plugin_admin_menu') );
99
 
100
  // on post/ad edit screen
101
+ add_action( 'edit_form_top', array($this, 'edit_form_above_title') );
102
  add_action( 'edit_form_after_title', array($this, 'edit_form_below_title') );
103
  add_action( 'admin_init', array($this, 'add_meta_boxes') );
104
  add_action( 'post_submitbox_misc_actions', array($this, 'add_submit_box_meta') );
182
 
183
  wp_enqueue_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/admin.js', __FILE__ ), array('jquery', 'jquery-ui-autocomplete'), Advanced_Ads::VERSION );
184
  // jquery ui
185
+ wp_enqueue_script( 'jquery-ui-accordion' );
186
  wp_enqueue_script( 'jquery-ui-button' );
187
 
188
  // just register this script for later inclusion on ad group list page
391
  );
392
  }
393
 
394
+ /**
395
+ * add information above the ad title
396
+ *
397
+ * @since 1.5.6
398
+ * @param obj $post
399
+ */
400
+ public function edit_form_above_title($post){
401
+ if ( ! isset($post->post_type) || $post->post_type != $this->post_type ) {
402
+ return;
403
+ }
404
+ $ad = new Advanced_Ads_Ad( $post->ID );
405
+
406
+ include ADVADS_BASE_PATH . 'admin/views/ad-info-top.php';
407
+ }
408
+
409
  /**
410
  * add information about the ad below the ad title
411
  *
456
 
457
  $ad = new Advanced_Ads_Ad( $post->ID );
458
 
459
+ // get time set for ad or current timestamp (both GMT)
460
+ $time_adj = $ad->expiry_date ? $ad->expiry_date : time();
461
+ $time_adj = gmdate( 'Y-m-d H:i:s', $time_adj );
462
+ list($curr_year, $curr_month, $curr_day) = explode('-', get_date_from_gmt( $time_adj, 'Y-m-d' ) );
463
+ $enabled = 1 - empty($ad->expiry_date);
 
 
464
 
465
  include ADVADS_BASE_PATH . 'admin/views/ad-submitbox-meta.php';
466
  }
573
  $year = absint( $_POST['advanced_ad']['expiry_date']['year'] );
574
  $month = absint( $_POST['advanced_ad']['expiry_date']['month'] );
575
  $day = absint( $_POST['advanced_ad']['expiry_date']['day'] );
576
+ // as PHP 5.2 has not reliable 'u' option need to calculate timestamps this way
577
+ $gmDate = get_gmt_from_date("$year-$month-$day 00:00:00", 'Y-m-d');
578
+ list( $year, $month, $day ) = explode( '-', $gmDate );
579
+ $ad->expiry_date = gmmktime(0, 0, 0, $month, $day, $year);
580
  } else {
581
  $ad->expiry_date = 0;
582
  }
707
  $hook,
708
  'advanced_ads_setting_section'
709
  );
710
+ // add setting fields for content injection protection
711
+ add_settings_field(
712
+ 'content-injection-everywhere',
713
+ __( 'Unlimited ad injection', ADVADS_SLUG ),
714
+ array($this, 'render_settings_content_injection_everywhere'),
715
+ $hook,
716
+ 'advanced_ads_setting_section'
717
+ );
718
  // add setting fields for content injection priority
719
  add_settings_field(
720
  'content-injection-priority',
760
  */
761
  public function render_settings_licenses_section_callback(){
762
  echo '<p>'. __( 'Enter license keys for our powerful <a href="'.ADVADS_URL.'add-ons/" target="_blank">add-ons</a>.', ADVADS_SLUG ) .'</p>';
763
+ // nonce field
764
+ echo '<input type="hidden" id="advads-licenses-ajax-referrer" value="' . wp_create_nonce( "advads_ajax_license_nonce" ) . '"/>';
765
  }
766
 
767
  /**
821
  echo '<p class="description">'. sprintf( __( 'Only enable this if you can and want to use the advanced JavaScript functions described <a href="%s">here</a>.', ADVADS_SLUG ), ADVADS_URL . 'javascript-functions/' ) .'</p>';
822
  }
823
 
824
+ /**
825
+ * render setting for content injection protection
826
+ *
827
+ * @since 1.4.1
828
+ */
829
+ public function render_settings_content_injection_everywhere(){
830
+ $options = Advanced_Ads::get_instance()->options();
831
+ $everywhere = ( isset($options['content-injection-everywhere']) ) ? true : false;
832
+
833
+ echo '<input id="advanced-ads-injection-everywhere" type="checkbox" value="true" name="'.ADVADS_SLUG.'[content-injection-everywhere]" '.checked( $everywhere, true, false ).'>';
834
+ echo '<p class="description">'. __( 'Some plugins and themes trigger ad injection where it shouldn’t happen. Therefore, Advanced Ads ignores injected placements on non-singular pages and outside the loop. However, this can cause problems with some themes. You can enable this option if you don’t see ads or want to enable ad injections on archive pages AT YOUR OWN RISK.', ADVADS_SLUG ) .'</p>';
835
+
836
+ }
837
+
838
  /**
839
  * render setting for content injection priority
840
  *
1171
  $this->notices = Advanced_Ads_Admin_Notices::get_instance();
1172
  }
1173
  }
1174
+
1175
+ /**
1176
+ * save license key
1177
+ *
1178
+ * @since 1.2.0
1179
+ * @param string $addon string with addon identifier
1180
+ */
1181
+ public function activate_license( $addon = '', $plugin_name = '', $options_slug = '' ) {
1182
+
1183
+ if ( '' === $addon || '' === $plugin_name || '' === $options_slug ) {
1184
+ return __( 'Error while trying to register the license. Please contact support.', ADVADS_SLUG );
1185
+ }
1186
+
1187
+ $licenses = get_option(ADVADS_SLUG . '-licenses', array());
1188
+ $license_key = isset($licenses[$addon]) ? $licenses[$addon] : '';
1189
+ if ( '' == $license_key ) {
1190
+ return __( 'Please enter and save a valid license key first.', ADVADS_SLUG );
1191
+ }
1192
+
1193
+ $api_params = array(
1194
+ 'edd_action'=> 'activate_license',
1195
+ 'license' => $license_key,
1196
+ 'item_name' => urlencode( $plugin_name ),
1197
+ 'url' => home_url()
1198
+ );
1199
+ $response = wp_remote_get( add_query_arg( $api_params, ADVADS_URL ) );
1200
+ if ( is_wp_error( $response ) ) {
1201
+ return wp_remote_retrieve_body( $response );
1202
+ }
1203
+
1204
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
1205
+ // save license status
1206
+ update_option($options_slug . '-license-status', $license_data->license, false);
1207
+
1208
+ // display activation problem
1209
+ if( !empty( $license_data->error )) {
1210
+ return sprintf( __('License is invalid. Reason: %s'), $license_data->error);
1211
+ }
1212
+
1213
+ return 1;
1214
+ }
1215
  }
admin/includes/class-notices.php CHANGED
@@ -125,6 +125,9 @@ class Advanced_Ads_Admin_Notices {
125
  if ( version_compare( $old_version, '1.5.4' ) == -1 ) {
126
  $this->notices[] = '1.5.4';
127
  }
 
 
 
128
  }
129
  $new_options['version'] = ADVADS_VERSION;
130
 
125
  if ( version_compare( $old_version, '1.5.4' ) == -1 ) {
126
  $this->notices[] = '1.5.4';
127
  }
128
+ if ( version_compare( $old_version, '1.6' ) == -1 ) {
129
+ $this->notices[] = '1.6';
130
+ }
131
  }
132
  $new_options['version'] = ADVADS_VERSION;
133
 
admin/includes/class-overview-widgets.php CHANGED
@@ -58,6 +58,8 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
58
  array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sticky'), $screen->id, 'side', 'high');
59
  add_meta_box('advads_overview_addon_layer', __( 'PopUps and Layers', ADVADS_SLUG ),
60
  array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_layer'), $screen->id, 'side', 'high');
 
 
61
 
62
  }
63
 
@@ -203,4 +205,14 @@ foreach ( $next_steps as $_step ){
203
  _e( 'Get the PopUp and Layer add-on', ADVADS_SLUG ); ?></a></p><?php
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
206
  }
58
  array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sticky'), $screen->id, 'side', 'high');
59
  add_meta_box('advads_overview_addon_layer', __( 'PopUps and Layers', ADVADS_SLUG ),
60
  array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_layer'), $screen->id, 'side', 'high');
61
+ add_meta_box('advads_overview_addon_slider', __( 'Ad Slider', ADVADS_SLUG ),
62
+ array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_slider'), $screen->id, 'side', 'high');
63
 
64
  }
65
 
205
  _e( 'Get the PopUp and Layer add-on', ADVADS_SLUG ); ?></a></p><?php
206
  }
207
 
208
+ /**
209
+ * slider add-on widget
210
+ */
211
+ public static function render_add_on_slider(){
212
+
213
+ ?><p><?php _e( 'Create a beautiful and simple slider from your ads.', ADVADS_SLUG ); ?></p>
214
+ <p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/slider/" target="_blank"><?php
215
+ _e( 'Get the Slider add-on', ADVADS_SLUG ); ?></a></p><?php
216
+ }
217
+
218
  }
admin/includes/notices.php CHANGED
@@ -25,4 +25,9 @@ $advanced_ads_admin_notices = array(
25
  'type' => 'update',
26
  'text' => 'With Advanced Ads 1.5.4 the handling of <strong>visitor conditions</strong> became more consistent, flexible, and hopefully easier to use too. Please read this <a href="http://wpadvancedads.com/advanced-ads-1-5-4/" target="_blank">update post</a> to learn if this change should concern you.',
27
  ),
 
 
 
 
 
28
  );
25
  'type' => 'update',
26
  'text' => 'With Advanced Ads 1.5.4 the handling of <strong>visitor conditions</strong> became more consistent, flexible, and hopefully easier to use too. Please read this <a href="http://wpadvancedads.com/advanced-ads-1-5-4/" target="_blank">update post</a> to learn if this change should concern you.',
27
  ),
28
+ // if users updated from a previous version to 1.5.7
29
+ '1.6' => array(
30
+ 'type' => 'update',
31
+ 'text' => 'Advanced Ads 1.6 contains important <strong>fixes for ad groups</strong>. Please read the <a href="https://wpadvancedads.com/advanced-ads-1-6/" target="_blank">update post</a>.',
32
+ ),
33
  );
admin/views/ad-display-metabox.php CHANGED
@@ -3,12 +3,12 @@
3
  require_once(ADVADS_BASE_PATH . 'admin/includes/class-display-condition-callbacks.php');
4
  $types = Advanced_Ads::get_instance()->ad_types;
5
  $jquery_ui_buttons = array();
 
6
  ?>
7
  <p class="description"><?php _e( 'Choose where to display the ad and where to hide it.', ADVADS_SLUG ); ?></p>
8
  <div id="advanced-ad-conditions-enable">
9
- <?php $conditions_enabled = (empty($ad->conditions['enabled'])) ? 0 : 1; ?>
10
- <label><input type="radio" name="advanced_ad[conditions][enabled]" value="0" <?php checked( $conditions_enabled, 0 ); ?>/><?php _e( 'Display ad everywhere', ADVADS_SLUG ); ?></label>
11
- <label><input type="radio" name="advanced_ad[conditions][enabled]" value="1" <?php checked( $conditions_enabled, 1 ); ?>/><?php _e( 'Set display conditions', ADVADS_SLUG ); ?></label>
12
  </div>
13
  <div id="advanced-ad-conditions">
14
  <ul id="advads-how-it-works">
3
  require_once(ADVADS_BASE_PATH . 'admin/includes/class-display-condition-callbacks.php');
4
  $types = Advanced_Ads::get_instance()->ad_types;
5
  $jquery_ui_buttons = array();
6
+ $conditions_enabled = isset( $ad->conditions['enabled'] ) && $ad->conditions['enabled'];
7
  ?>
8
  <p class="description"><?php _e( 'Choose where to display the ad and where to hide it.', ADVADS_SLUG ); ?></p>
9
  <div id="advanced-ad-conditions-enable">
10
+ <input id="advads-condition-display-disabled" type="radio" name="advanced_ad[conditions][enabled]" value="0" <?php checked( ! $conditions_enabled ); ?>/><label for="advads-condition-display-disabled"><?php _e( 'Display ad everywhere', ADVADS_SLUG ); ?></label>
11
+ <input id="advads-condition-display-enabled" type="radio" name="advanced_ad[conditions][enabled]" value="1" <?php checked( $conditions_enabled ); ?>/><label for="advads-condition-display-enabled"><?php _e( 'Set display conditions', ADVADS_SLUG ); ?></label>
 
12
  </div>
13
  <div id="advanced-ad-conditions">
14
  <ul id="advads-how-it-works">
admin/views/ad-info-top.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if( isset( $_GET['message'] ) && 6 === $_GET['message'] ) : ?>
2
+ <div id="advads-ad-info-top">
3
+ <span id='advads-ad-info-close'>x</span>
4
+ <h2>&#128077; <?php _e( 'Cool, you just published an ad. What now?', ADVADS_SLUG ); ?></h2>
5
+ <h3><?php _e( 'Display the ad in …', ADVADS_SLUG ); ?></h3>
6
+ <div id="advads-ad-options-accordion">
7
+ <h3><?php _e( '… every post or page', ADVADS_SLUG ); ?></h3>
8
+ <div>
9
+ <p><?php _e( 'Use placements to inject the ad automatically into posts and pages.', ADVADS_SLUG ); ?></p>
10
+ <a href="<?php echo admin_url( 'admin.php?action=edit&page=advanced-ads-placements' ); ?>" class="button button-primary"><?php _e( 'Configure Placements', ADVADS_SLUG ); ?></a>
11
+ </div>
12
+ <h3><?php _e( '… Sidebar or Widget Area', ADVADS_SLUG ); ?></h3>
13
+ <div>
14
+ <p><?php _e( 'Use the <em>Advanced Ads</em> Widget to display ads in your sidebars.', ADVADS_SLUG ); ?></p>
15
+ <a href="<?php echo admin_url('widgets.php'); ?>" class="button button-primary"><?php _e( 'Configure a Widget', ADVADS_SLUG ); ?></a>
16
+ </div>
17
+ <h3><?php _e( '… a few hand selected posts or pages', ADVADS_SLUG ); ?></h3>
18
+ <div>
19
+ <p><?php _e( 'Use the shortcode below to manually place the ad in the content editor of posts and pages.', ADVADS_SLUG ); ?></p>
20
+ <pre><input type="text" onclick="this.select();" value='[the_ad id="<?php echo $post->ID; ?>"]'/></pre>
21
+ </div>
22
+ <h3><?php _e( '… in a custom position in your theme', ADVADS_SLUG ); ?></h3>
23
+ <div>
24
+ <p><?php _e( 'Use the function below to manually place the ad into your template files. This method is needed for more advanced placements like in the header of your theme.', ADVADS_SLUG ); ?></p>
25
+ <pre><input type="text" onclick="this.select();" value="&lt;?php if( function_exists('the_ad') ) the_ad(<?php echo $post->ID; ?>); ?&gt;"/></pre>
26
+ </div>
27
+ <h3><?php _e( '… in an anchor ad or pop-up', ADVADS_SLUG ); ?></h3>
28
+ <div>
29
+ <?php if( ! defined( 'AASADS_SLUG' ) ) : ?>
30
+ <p><?php _e( 'Fix ads to the browser while users are scrolling and create best performing anchor ads.', ADVADS_SLUG ); ?></p>
31
+ <a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/sticky-ads/" target="_blank"><?php
32
+ _e( 'Get the Sticky add-on', ADVADS_SLUG ); ?></a>
33
+ <?php else : ?>
34
+ <p><?php _e( 'You find the settings for the Sticky Ads below.', ADVADS_SLUG ); ?></p>
35
+ <?php endif; ?>
36
+ <?php if( ! defined( 'AAPLDS_SLUG' ) ) : ?>
37
+ <p><?php _e( 'Display content and ads in layers and popups on custom events.', ADVADS_SLUG ); ?></p>
38
+ <a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/popup-and-layer-ads/" target="_blank"><?php
39
+ _e( 'Get the PopUp and Layer add-on', ADVADS_SLUG ); ?></a>
40
+ <?php else : ?>
41
+ <p><?php _e( 'You find the settings for the Layer and PopUp effects below.', ADVADS_SLUG ); ?></p>
42
+ <?php endif; ?>
43
+ </div>
44
+ </div>
45
+
46
+ <p><?php printf( __( 'Learn more about your choices to display an ad in the <a href="%s" target="_blank">manual</a>', ADVADS_SLUG ), ADVADS_URL . 'manual/display-ads/' ); ?></p>
47
+ </div>
48
+ <script>
49
+ jQuery(function() {
50
+ jQuery( "#advads-ad-options-accordion" ).accordion({
51
+ active: false,
52
+ collapsible: true,
53
+ });
54
+ });
55
+ jQuery('#advads-ad-info-close').click(function(){
56
+ jQuery('#advads-ad-info-top').fadeOut();
57
+ });
58
+ </script>
59
+ <?php endif;
admin/views/ad-info.php CHANGED
@@ -1,15 +1,12 @@
1
- <p><?php printf( __( 'Ad Id: %s', ADVADS_SLUG ), "<strong>$post->ID</strong>" ); ?>&nbsp;&nbsp;&nbsp;
2
- <a onclick="advads_toggle('#advads-ad-info')"><?php _e( 'How to use this Ad?', ADVADS_SLUG ); ?></a>
3
- </p>
4
- <div id="advads-ad-info" style="display: none;">
5
- <p><?php printf( __( 'How to display the ad directly? Find more help and examples in the <a href="%s" target="_blank">manual</a>', ADVADS_SLUG ), ADVADS_URL . 'manual/display-ads/' ); ?></p>
6
- <h4><?php _e( 'shortcode', ADVADS_SLUG ); ?></h4>
7
- <p class="description"><?php _e( 'To display an ad in content fields', ADVADS_SLUG ); ?></p>
8
- <pre><input type="text" onclick="this.select();" value='[the_ad id="<?php echo $post->ID; ?>"]'/></pre>
9
- <h4><?php _e( 'template', ADVADS_SLUG ); ?></h4>
10
- <p class="description"><?php _e( 'To display an ad in template files', ADVADS_SLUG ); ?></p>
11
- <pre><input type="text" onclick="this.select();" value="the_ad(<?php echo $post->ID; ?>);"/></pre>
12
  </div>
 
13
  <div id="advads-ad-description">
14
  <?php if ( ! empty($ad->description) ) : ?>
15
  <p title="<?php _e( 'click to change', ADVADS_SLUG ); ?>"
1
+ <div id="advads-ad-info">
2
+ <span><?php printf( __( 'Ad Id: %s', ADVADS_SLUG ), "<strong>$post->ID</strong>" ); ?></span>
3
+ <label><span><?php _e( 'shortcode', ADVADS_SLUG ); ?></span>
4
+ <pre><input type="text" onclick="this.select();" value='[the_ad id="<?php echo $post->ID; ?>"]'/></pre></label>
5
+ <label><span><?php _e( 'theme function', ADVADS_SLUG ); ?></span>
6
+ <pre><input type="text" onclick="this.select();" value="&lt;?php the_ad(<?php echo $post->ID; ?>); ?&gt;"/></pre></label>
7
+ <span><?php printf( __( 'Find more display options in the <a href="%s" target="_blank">manual</a>.', ADVADS_SLUG ), ADVADS_URL . 'manual/display-ads/' ); ?></span>
 
 
 
 
8
  </div>
9
+ </p>
10
  <div id="advads-ad-description">
11
  <?php if ( ! empty($ad->description) ) : ?>
12
  <p title="<?php _e( 'click to change', ADVADS_SLUG ); ?>"
admin/views/ad-submitbox-meta.php CHANGED
@@ -7,7 +7,7 @@
7
  $month = '<select name="advanced_ad[expiry_date][month]"' . ">\n";
8
  for ( $i = 1; $i < 13; $i = $i + 1 ) {
9
  $monthnum = zeroise( $i, 2 );
10
- $month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $curr_month, false ) . '>';
11
  $month .= sprintf( _x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', ADVADS_SLUG ),
12
  $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
13
  }
@@ -15,7 +15,6 @@
15
 
16
  $day = '<input type="text" name="advanced_ad[expiry_date][day]" value="' . $curr_day . '" size="2" maxlength="2" autocomplete="off" />';
17
  $year = '<input type="text" name="advanced_ad[expiry_date][year]" value="' . $curr_year . '" size="4" maxlength="4" autocomplete="off" />';
18
-
19
  ?><div class="timestamp-wrap">
20
  <?php printf( _x( '%1$s %2$s, %3$s', 'order of expiry date fields 1: month, 2: day, 3: year', ADVADS_SLUG ), $month, $day, $year ); ?>
21
  </div>
7
  $month = '<select name="advanced_ad[expiry_date][month]"' . ">\n";
8
  for ( $i = 1; $i < 13; $i = $i + 1 ) {
9
  $monthnum = zeroise( $i, 2 );
10
+ $month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $curr_month, $monthnum, false ) . '>';
11
  $month .= sprintf( _x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', ADVADS_SLUG ),
12
  $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
13
  }
15
 
16
  $day = '<input type="text" name="advanced_ad[expiry_date][day]" value="' . $curr_day . '" size="2" maxlength="2" autocomplete="off" />';
17
  $year = '<input type="text" name="advanced_ad[expiry_date][year]" value="' . $curr_year . '" size="4" maxlength="4" autocomplete="off" />';
 
18
  ?><div class="timestamp-wrap">
19
  <?php printf( _x( '%1$s %2$s, %3$s', 'order of expiry date fields 1: month, 2: day, 3: year', ADVADS_SLUG ), $month, $day, $year ); ?>
20
  </div>
admin/views/ad-visitor-metabox.php CHANGED
@@ -24,6 +24,9 @@ foreach ( $options as $_options ) :
24
  ?></tbody></table>
25
  <input type="hidden" id="advads-visitor-conditions-index" value="<?php echo isset( $options ) ? count( $options ) : 0; ?>"/>
26
  </div>
 
 
 
27
  <hr/>
28
  <fieldset>
29
  <legend><?php _e( 'New condition', ADVADS_SLUG ); ?></legend>
24
  ?></tbody></table>
25
  <input type="hidden" id="advads-visitor-conditions-index" value="<?php echo isset( $options ) ? count( $options ) : 0; ?>"/>
26
  </div>
27
+ <?php if( ! isset( $options ) || count( $options ) == 0 ) :
28
+ ?><p><?php _e( 'Visitor conditions limit the number of users who can see your ad. There is no need to set visitor conditions if you want all users to see the ad.', ADVADS_SLUG ); ?></p><?php
29
+ endif; ?>
30
  <hr/>
31
  <fieldset>
32
  <legend><?php _e( 'New condition', ADVADS_SLUG ); ?></legend>
admin/views/setting-license.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <input type="text" class="regular-text" placeholder="<?php _e('License key', AAT_SLUG); ?>"
2
+ name="<?php echo ADVADS_SLUG . '-licenses'; ?>[<?php echo $index; ?>]"
3
+ value="<?php echo esc_attr_e($license_key); ?>"
4
+ <?php if( $license_status === 'valid' ) echo ' disabled="disabled"'; ?>/><?php
5
+ if( $license_status !== false && $license_status == 'valid' ) :
6
+ $show_active = true;
7
+ else :
8
+ $show_active = false;
9
+ if($license_key !== '') :
10
+ ?><button type="button" class="button-secondary advads-license-activate"
11
+ data-addon="<?php echo $index; ?>"
12
+ data-pluginname="<?php echo $plugin_name; ?>"
13
+ data-optionslug="<?php echo $options_slug; ?>"
14
+ name="advads_license_activate"><?php _e('Activate License'); ?></button><?php
15
+ endif;
16
+ $errortext = ( ! $license_status || $license_status == 'invalid') ? __('license key invalid', AAT_SLUG) : '';
17
+ ?><span class="advads-license-activate-error"><?php echo $errortext; ?></span><?php
18
+ endif;
19
+ ?><span class="advads-license-activate-active" <?php if( ! $show_active ) echo 'style="display: none;"'; ?>><?php _e('active', AAT_SLUG); ?></span><?php
20
+ if($license_key === '') :
21
+ ?><p class="description"><?php _e('1. enter the key and save options; 2. click the activate button behind the field'); ?></p><?php
22
+ endif;
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.5.5
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
@@ -38,7 +38,7 @@ define( 'ADVADS_BASE_DIR', dirname( plugin_basename( __FILE__ ) ) ); // director
38
  // general and global slug, e.g. to store options in WP, textdomain
39
  define( 'ADVADS_SLUG', 'advanced-ads' );
40
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
41
- define( 'ADVADS_VERSION', '1.5.5' );
42
 
43
  /*----------------------------------------------------------------------------*
44
  * Autoloading, modules and functions
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.6
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
38
  // general and global slug, e.g. to store options in WP, textdomain
39
  define( 'ADVADS_SLUG', 'advanced-ads' );
40
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
41
+ define( 'ADVADS_VERSION', '1.6' );
42
 
43
  /*----------------------------------------------------------------------------*
44
  * Autoloading, modules and functions
classes/EDD_SL_Plugin_Updater.php ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // uncomment this line for testing
4
+ //set_site_transient( 'update_plugins', null );
5
+
6
+ /**
7
+ * Allows plugins to use their own update API.
8
+ *
9
+ * @author Pippin Williamson
10
+ * @version 1.6
11
+ */
12
+ class EDD_SL_Plugin_Updater {
13
+ private $api_url = '';
14
+ private $api_data = array();
15
+ private $name = '';
16
+ private $slug = '';
17
+
18
+ /**
19
+ * Class constructor.
20
+ *
21
+ * @uses plugin_basename()
22
+ * @uses hook()
23
+ *
24
+ * @param string $_api_url The URL pointing to the custom API endpoint.
25
+ * @param string $_plugin_file Path to the plugin file.
26
+ * @param array $_api_data Optional data to send with API calls.
27
+ * @return void
28
+ */
29
+ function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
30
+ $this->api_url = trailingslashit( $_api_url );
31
+ $this->api_data = $_api_data;
32
+ $this->name = plugin_basename( $_plugin_file );
33
+ $this->slug = basename( $_plugin_file, '.php' );
34
+ $this->version = $_api_data['version'];
35
+
36
+ // Set up hooks.
37
+ $this->init();
38
+ add_action( 'admin_init', array( $this, 'show_changelog' ) );
39
+ }
40
+
41
+ /**
42
+ * Set up WordPress filters to hook into WP's update process.
43
+ *
44
+ * @uses add_filter()
45
+ *
46
+ * @return void
47
+ */
48
+ public function init() {
49
+
50
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
51
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
52
+
53
+ add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
54
+ }
55
+
56
+ /**
57
+ * Check for Updates at the defined API endpoint and modify the update array.
58
+ *
59
+ * This function dives into the update API just when WordPress creates its update array,
60
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
61
+ * It is reassembled from parts of the native WordPress plugin update code.
62
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
63
+ *
64
+ * @uses api_request()
65
+ *
66
+ * @param array $_transient_data Update array build by WordPress.
67
+ * @return array Modified update array with custom plugin data.
68
+ */
69
+ function check_update( $_transient_data ) {
70
+
71
+ global $pagenow;
72
+
73
+ if( ! is_object( $_transient_data ) ) {
74
+ $_transient_data = new stdClass;
75
+ }
76
+
77
+ if( 'plugins.php' == $pagenow && is_multisite() ) {
78
+ return $_transient_data;
79
+ }
80
+
81
+ if ( empty( $_transient_data->response ) || empty( $_transient_data->response[ $this->name ] ) ) {
82
+
83
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
84
+
85
+ if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
86
+
87
+ $this->did_check = true;
88
+
89
+ if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
90
+
91
+ $_transient_data->response[ $this->name ] = $version_info;
92
+
93
+ }
94
+
95
+ $_transient_data->last_checked = time();
96
+ $_transient_data->checked[ $this->name ] = $this->version;
97
+
98
+ }
99
+
100
+ }
101
+
102
+ return $_transient_data;
103
+ }
104
+
105
+ /**
106
+ * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
107
+ *
108
+ * @param string $file
109
+ * @param array $plugin
110
+ */
111
+ public function show_update_notification( $file, $plugin ) {
112
+
113
+ if( ! current_user_can( 'update_plugins' ) ) {
114
+ return;
115
+ }
116
+
117
+ if( ! is_multisite() ) {
118
+ return;
119
+ }
120
+
121
+ if ( $this->name != $file ) {
122
+ return;
123
+ }
124
+
125
+ // Remove our filter on the site transient
126
+ remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
127
+
128
+ $update_cache = get_site_transient( 'update_plugins' );
129
+
130
+ if ( ! is_object( $update_cache ) || empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
131
+
132
+ $cache_key = md5( 'edd_plugin_' .sanitize_key( $this->name ) . '_version_info' );
133
+ $version_info = get_transient( $cache_key );
134
+
135
+ if( false === $version_info ) {
136
+
137
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
138
+
139
+ set_transient( $cache_key, $version_info, 3600 );
140
+ }
141
+
142
+
143
+ if( ! is_object( $version_info ) ) {
144
+ return;
145
+ }
146
+
147
+ if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
148
+
149
+ $update_cache->response[ $this->name ] = $version_info;
150
+
151
+ }
152
+
153
+ $update_cache->last_checked = time();
154
+ $update_cache->checked[ $this->name ] = $this->version;
155
+
156
+ set_site_transient( 'update_plugins', $update_cache );
157
+
158
+ } else {
159
+
160
+ $version_info = $update_cache->response[ $this->name ];
161
+
162
+ }
163
+
164
+ // Restore our filter
165
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
166
+
167
+ if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
168
+
169
+ // build a plugin list row, with update notification
170
+ $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
171
+ echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
172
+
173
+ $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
174
+
175
+ if ( empty( $version_info->download_link ) ) {
176
+ printf(
177
+ __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a>.', 'edd' ),
178
+ esc_html( $version_info->name ),
179
+ esc_url( $changelog_link ),
180
+ esc_html( $version_info->new_version )
181
+ );
182
+ } else {
183
+ printf(
184
+ __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a> or <a href="%4$s">update now</a>.', 'edd' ),
185
+ esc_html( $version_info->name ),
186
+ esc_url( $changelog_link ),
187
+ esc_html( $version_info->new_version ),
188
+ esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) )
189
+ );
190
+ }
191
+
192
+ echo '</div></td></tr>';
193
+ }
194
+ }
195
+
196
+
197
+ /**
198
+ * Updates information on the "View version x.x details" page with custom data.
199
+ *
200
+ * @uses api_request()
201
+ *
202
+ * @param mixed $_data
203
+ * @param string $_action
204
+ * @param object $_args
205
+ * @return object $_data
206
+ */
207
+ function plugins_api_filter( $_data, $_action = '', $_args = null ) {
208
+
209
+
210
+ if ( $_action != 'plugin_information' ) {
211
+
212
+ return $_data;
213
+
214
+ }
215
+
216
+ if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
217
+
218
+ return $_data;
219
+
220
+ }
221
+
222
+ $to_send = array(
223
+ 'slug' => $this->slug,
224
+ 'is_ssl' => is_ssl(),
225
+ 'fields' => array(
226
+ 'banners' => false, // These will be supported soon hopefully
227
+ 'reviews' => false
228
+ )
229
+ );
230
+
231
+ $api_response = $this->api_request( 'plugin_information', $to_send );
232
+
233
+ if ( false !== $api_response ) {
234
+ $_data = $api_response;
235
+ }
236
+
237
+ return $_data;
238
+ }
239
+
240
+
241
+ /**
242
+ * Disable SSL verification in order to prevent download update failures
243
+ *
244
+ * @param array $args
245
+ * @param string $url
246
+ * @return object $array
247
+ */
248
+ function http_request_args( $args, $url ) {
249
+ // If it is an https request and we are performing a package download, disable ssl verification
250
+ if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
251
+ $args['sslverify'] = false;
252
+ }
253
+ return $args;
254
+ }
255
+
256
+ /**
257
+ * Calls the API and, if successfull, returns the object delivered by the API.
258
+ *
259
+ * @uses get_bloginfo()
260
+ * @uses wp_remote_post()
261
+ * @uses is_wp_error()
262
+ *
263
+ * @param string $_action The requested action.
264
+ * @param array $_data Parameters for the API action.
265
+ * @return false||object
266
+ */
267
+ private function api_request( $_action, $_data ) {
268
+
269
+ global $wp_version;
270
+
271
+ $data = array_merge( $this->api_data, $_data );
272
+
273
+ if ( $data['slug'] != $this->slug )
274
+ return;
275
+
276
+ if ( empty( $data['license'] ) )
277
+ return;
278
+
279
+ if( $this->api_url == home_url() ) {
280
+ return false; // Don't allow a plugin to ping itself
281
+ }
282
+
283
+ $api_params = array(
284
+ 'edd_action' => 'get_version',
285
+ 'license' => $data['license'],
286
+ 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
287
+ 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
288
+ 'slug' => $data['slug'],
289
+ 'author' => $data['author'],
290
+ 'url' => home_url()
291
+ );
292
+
293
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
294
+
295
+ if ( ! is_wp_error( $request ) ) {
296
+ $request = json_decode( wp_remote_retrieve_body( $request ) );
297
+ }
298
+
299
+ if ( $request && isset( $request->sections ) ) {
300
+ $request->sections = maybe_unserialize( $request->sections );
301
+ } else {
302
+ $request = false;
303
+ }
304
+
305
+ return $request;
306
+ }
307
+
308
+ public function show_changelog() {
309
+
310
+
311
+ if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
312
+ return;
313
+ }
314
+
315
+ if( empty( $_REQUEST['plugin'] ) ) {
316
+ return;
317
+ }
318
+
319
+ if( empty( $_REQUEST['slug'] ) ) {
320
+ return;
321
+ }
322
+
323
+ if( ! current_user_can( 'update_plugins' ) ) {
324
+ wp_die( __( 'You do not have permission to install plugin updates', 'edd' ), __( 'Error', 'edd' ), array( 'response' => 403 ) );
325
+ }
326
+
327
+ $response = $this->api_request( 'plugin_latest_version', array( 'slug' => $_REQUEST['slug'] ) );
328
+
329
+ if( $response && isset( $response->sections['changelog'] ) ) {
330
+ echo '<div style="background:#fff;padding:10px;">' . $response->sections['changelog'] . '</div>';
331
+ }
332
+
333
+
334
+ exit;
335
+ }
336
+
337
+ }
classes/ad-ajax.php CHANGED
@@ -33,17 +33,33 @@ class Advanced_Ads_Ajax {
33
  // set proper header
34
  header( 'Content-Type: application/json; charset: utf-8' );
35
 
 
 
 
36
  // init handlers
37
  $selector = Advanced_Ads_Select::get_instance();
38
  $methods = $selector->get_methods();
39
  $method = isset( $_REQUEST['ad_method'] ) ? (string) $_REQUEST['ad_method'] : null;
40
  $id = isset( $_REQUEST['ad_id'] ) ? (string) $_REQUEST['ad_id'] : null;
41
  $arguments = isset( $_REQUEST['ad_args'] ) ? (array) $_REQUEST['ad_args'] : array();
 
 
 
 
42
 
43
  $response = array();
44
  if ( isset( $methods[ $method ] ) && isset( $id ) ) {
 
 
 
 
 
 
 
45
  $content = $selector->get_ad_by_method( $id, $method, $arguments );
46
- $response = array( 'status' => 'success', 'item' => $content, 'id' => $id, 'method' => $method );
 
 
47
  } else {
48
  // report error
49
  $response = array( 'status' => 'error', 'message' => 'No valid ID or METHOD found.' );
33
  // set proper header
34
  header( 'Content-Type: application/json; charset: utf-8' );
35
 
36
+ // allow modules / add ons to test (this is rather late but should happen before anything important is called)
37
+ do_action( 'advanced-ads-ajax-ad-select-init' );
38
+
39
  // init handlers
40
  $selector = Advanced_Ads_Select::get_instance();
41
  $methods = $selector->get_methods();
42
  $method = isset( $_REQUEST['ad_method'] ) ? (string) $_REQUEST['ad_method'] : null;
43
  $id = isset( $_REQUEST['ad_id'] ) ? (string) $_REQUEST['ad_id'] : null;
44
  $arguments = isset( $_REQUEST['ad_args'] ) ? (array) $_REQUEST['ad_args'] : array();
45
+ $adIds = isset( $_REQUEST['ad_ids'] ) ? $_REQUEST['ad_ids'] : null;
46
+ if ( is_string( $adIds ) ) {
47
+ $adIds = json_decode( $adIds, true );
48
+ }
49
 
50
  $response = array();
51
  if ( isset( $methods[ $method ] ) && isset( $id ) ) {
52
+ $advads = Advanced_Ads::get_instance();
53
+ if (is_array($adIds)) { // ads loaded previously and passed by query
54
+ $advads->current_ads += $adIds;
55
+ }
56
+ $l = count( $advads->current_ads );
57
+
58
+ // build content
59
  $content = $selector->get_ad_by_method( $id, $method, $arguments );
60
+ $adIds = array_slice( $advads->current_ads, $l ); // ads loaded by this request
61
+
62
+ $response = array( 'status' => 'success', 'item' => $content, 'id' => $id, 'method' => $method, 'ads' => $adIds );
63
  } else {
64
  // report error
65
  $response = array( 'status' => 'error', 'message' => 'No valid ID or METHOD found.' );
classes/ad-model.php CHANGED
@@ -2,6 +2,20 @@
2
 
3
  class Advanced_Ads_Model {
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  *
7
  * @var wpdb
2
 
3
  class Advanced_Ads_Model {
4
 
5
+ /**
6
+ * Cache group for WP Object Cache
7
+ *
8
+ * @var string
9
+ */
10
+ const OBJECT_CACHE_GROUP = 'advanced-ads';
11
+
12
+ /**
13
+ * Default time-to-live for WP Object Cache
14
+ *
15
+ * @var string
16
+ */
17
+ const OBJECT_CACHE_TTL = 720; // 12 Minutes
18
+
19
  /**
20
  *
21
  * @var wpdb
classes/ad-select.php CHANGED
@@ -17,6 +17,11 @@
17
  */
18
  class Advanced_Ads_Select {
19
 
 
 
 
 
 
20
  protected $methods;
21
 
22
  private function __construct() {}
@@ -48,9 +53,9 @@ class Advanced_Ads_Select {
48
  {
49
  if ( ! isset($this->methods) ) {
50
  $methods = array(
51
- 'id' => array( $this, 'get_ad_by_id' ),
52
- 'group' => array( $this, 'get_ad_by_group' ),
53
- 'placement' => array( $this, 'get_ad_by_placement' ),
54
  );
55
 
56
  $this->methods = apply_filters( 'advanced-ads-ad-select-methods', $methods );
@@ -71,8 +76,8 @@ class Advanced_Ads_Select {
71
  {
72
  $args = (array) $args;
73
 
74
- if ( ! isset($args['method']) ) $args['method'] = $method;
75
- if ( ! isset($args['id']) ) $args['id'] = $id;
76
 
77
  $args = apply_filters( 'advanced-ads-ad-select-args', $args );
78
 
@@ -95,8 +100,11 @@ class Advanced_Ads_Select {
95
 
96
  // internal
97
  public function get_ad_by_id($args) {
 
 
 
98
  if ( ! isset($args['id']) || $args['id'] == 0 ) {
99
- return isset($args['override']) ? $args['override'] : null;
100
  }
101
 
102
  // get ad
@@ -110,22 +118,30 @@ class Advanced_Ads_Select {
110
 
111
  // internal
112
  public function get_ad_by_group($args) {
 
 
 
113
  if ( ! isset($args['id']) || $args['id'] == 0 ) {
114
- return isset($args['override']) ? $args['override'] : null;
115
  }
116
 
117
  // get ad
118
- $adgroup = new Advanced_Ads_Group( (int) $args['id'] );
 
119
  return $adgroup->output();
120
  }
121
 
122
  // internal
123
  public function get_ad_by_placement($args) {
 
 
 
124
  if ( ! isset($args['id']) || $args['id'] == '' ) {
125
- return isset($args['override']) ? $args['override'] : null;
126
  }
127
 
128
  // get placement content
129
- return Advanced_Ads_Placements::output( $args['id'] );
 
130
  }
131
  }
17
  */
18
  class Advanced_Ads_Select {
19
 
20
+ const PLACEMENT = 'placement';
21
+ const GROUP = 'group';
22
+ const AD = 'id'; // alias of self::ID
23
+ const ID = 'id';
24
+
25
  protected $methods;
26
 
27
  private function __construct() {}
53
  {
54
  if ( ! isset($this->methods) ) {
55
  $methods = array(
56
+ self::AD => array( $this, 'get_ad_by_id' ),
57
+ self::GROUP => array( $this, 'get_ad_by_group' ),
58
+ self::PLACEMENT => array( $this, 'get_ad_by_placement' ),
59
  );
60
 
61
  $this->methods = apply_filters( 'advanced-ads-ad-select-methods', $methods );
76
  {
77
  $args = (array) $args;
78
 
79
+ if ( $id || ! isset( $args['id'] ) ) $args['id'] = $id;
80
+ $args['method'] = $method;
81
 
82
  $args = apply_filters( 'advanced-ads-ad-select-args', $args );
83
 
100
 
101
  // internal
102
  public function get_ad_by_id($args) {
103
+ if ( isset($args['override']) ) {
104
+ return $args['override'];
105
+ }
106
  if ( ! isset($args['id']) || $args['id'] == 0 ) {
107
+ return ;
108
  }
109
 
110
  // get ad
118
 
119
  // internal
120
  public function get_ad_by_group($args) {
121
+ if ( isset($args['override']) ) {
122
+ return $args['override'];
123
+ }
124
  if ( ! isset($args['id']) || $args['id'] == 0 ) {
125
+ return;
126
  }
127
 
128
  // get ad
129
+ $id = (int) $args['id'];
130
+ $adgroup = new Advanced_Ads_Group( $id, $args );
131
  return $adgroup->output();
132
  }
133
 
134
  // internal
135
  public function get_ad_by_placement($args) {
136
+ if ( isset($args['override']) ) {
137
+ return $args['override'];
138
+ }
139
  if ( ! isset($args['id']) || $args['id'] == '' ) {
140
+ return ;
141
  }
142
 
143
  // get placement content
144
+ $id = $args['id'];
145
+ return Advanced_Ads_Placements::output( $id, $args );
146
  }
147
  }
classes/ad.php CHANGED
@@ -172,7 +172,7 @@ class Advanced_Ads_Ad {
172
  // set wrapper conditions
173
  $this->wrapper = apply_filters( 'advanced-ads-set-wrapper', $this->wrapper, $this );
174
  // add unique wrapper id, if options given
175
- if ( is_array( $this->wrapper ) && $this->wrapper !== array() && ! isset($this->wrapper['id']) ){
176
  // create unique id if not yet given
177
  $this->wrapper['id'] = $this->create_wrapper_id();
178
  }
@@ -186,8 +186,9 @@ class Advanced_Ads_Ad {
186
  * @since 1.0.0
187
  * @todo check against default values
188
  */
189
- public function options($field = ''){
190
  // retrieve options, if not given yet
 
191
  if ( $this->options === array() ) {
192
  // load arguments given on ad load
193
  $this->options = $this->args;
@@ -201,11 +202,15 @@ class Advanced_Ads_Ad {
201
  // return specific option
202
  if ( $field != '' ) {
203
  if ( isset($this->options[$field]) ) {
204
- return $this->options[$field]; }
 
205
  } else { // return all options
206
  if ( ! empty($this->options) ) {
207
- return $this->options; }
 
208
  }
 
 
209
  }
210
 
211
  /**
@@ -264,9 +269,7 @@ class Advanced_Ads_Ad {
264
  return false;
265
  }
266
 
267
- if ( ! $this->can_display_by_conditions()
268
- || ! $this->can_display_by_visitor()
269
- || ! $this->can_display_by_expiry_date() ) {
270
  return false;
271
  }
272
 
@@ -276,241 +279,6 @@ class Advanced_Ads_Ad {
276
  return $can_display;
277
  }
278
 
279
- /**
280
- * check display conditions
281
- *
282
- * @since 1.1.0 moved here from can_display()
283
- * @return bool $can_display true if can be displayed in frontend
284
- */
285
- public function can_display_by_conditions(){
286
- // use $wp_the_query to check the original query and not custom queries
287
- global $post, $wp_the_query;
288
-
289
- $query = $wp_the_query->get_queried_object();
290
-
291
- if ( empty($this->options['conditions']) ||
292
- ! is_array( $this->options['conditions'] ) ) { return true; }
293
-
294
- // display ad if conditions are explicitely disabled
295
- if ( isset($this->options['conditions']['enabled']) && ! $this->options['conditions']['enabled'] ) { return true; }
296
-
297
- $conditions = $this->options['conditions'];
298
- foreach ( $conditions as $_cond_key => $_cond_value ) {
299
- switch ( $_cond_key ){
300
- // check for post ids
301
- case 'postids' :
302
- if ( $wp_the_query->is_singular() && empty($_cond_value['all']) ){
303
- // this check is deprecated: included posts
304
- if ( ! empty($_cond_value['include']) ){
305
- if ( is_string( $_cond_value['include'] ) ){
306
- $post_ids = explode( ',', $_cond_value['include'] );
307
- } else {
308
- $post_ids = $_cond_value['include'];
309
- }
310
- if ( is_array( $post_ids )
311
- && isset($post->ID)
312
- && ! in_array( $post->ID, $post_ids ) ) {
313
- return false; }
314
- }
315
- // included posts
316
- if ( ! empty($_cond_value['method']) && 'include' == $_cond_value['method'] ){
317
- $post_ids = $_cond_value['ids'];
318
- if ( is_array( $post_ids ) && isset($post->ID) && ! in_array( $post->ID, $post_ids ) ){
319
- return false;
320
- }
321
- }
322
- // this check is deprecated: excluded posts
323
- if ( ! empty($_cond_value['exclude']) ){
324
- if ( is_string( $_cond_value['exclude'] ) ){
325
- $post_ids = explode( ',', $_cond_value['exclude'] );
326
- } else {
327
- $post_ids = $_cond_value['exclude'];
328
- }
329
- if ( is_array( $post_ids ) && isset($post->ID) && in_array( $post->ID, $post_ids ) ){
330
- return false;
331
- }
332
- }
333
- // excluded posts
334
- if ( ! empty($_cond_value['method']) && 'exclude' == $_cond_value['method'] ){
335
- $post_ids = $_cond_value['ids'];
336
- if ( is_array( $post_ids ) && isset($post->ID) && in_array( $post->ID, $post_ids ) ){
337
- return false;
338
- }
339
- }
340
- }
341
- break;
342
- // check for category ids
343
- case 'categoryids' :
344
- // included
345
- if ( $wp_the_query->is_singular() && empty($_cond_value['all']) ){
346
- // get all taxonomies of the post
347
- $term_ids = $this->get_object_terms( $post->ID );
348
-
349
- if ( ! empty($_cond_value['include']) ){
350
- if ( is_string( $_cond_value['include'] ) ){
351
- $category_ids = explode( ',', $_cond_value['include'] );
352
- } else {
353
- $category_ids = $_cond_value['include'];
354
- }
355
-
356
- // check if currently in a post (not post page, but also posts in loops)
357
- if ( is_array( $category_ids ) && isset($post->ID)
358
- && ! count( array_intersect( $category_ids, $term_ids ) ) ) { // is there any taxonomy the same?
359
- return false;
360
- }
361
- }
362
- // check for excluded category ids
363
- if ( ! empty($_cond_value['exclude']) ){
364
- if ( is_string( $_cond_value['exclude'] ) ){
365
- $category_ids = explode( ',', $_cond_value['exclude'] );
366
- } else {
367
- $category_ids = $_cond_value['exclude'];
368
- }
369
- // check if currently in a post (not post page, but also posts in loops)
370
- if ( is_array( $category_ids ) && isset($post->ID)
371
- && count( array_intersect( $category_ids, $term_ids ) ) ) { // is there any taxonomy the same
372
- // being only in one excluded category is enough to not display the ad
373
- return false;
374
- }
375
- }
376
- }
377
- break;
378
- // check for included category archive ids
379
- // @link http://codex.wordpress.org/Conditional_Tags#A_Category_Page
380
- case 'categoryarchiveids' :
381
- if ( isset($query->term_id) && $wp_the_query->is_archive() && empty($_cond_value['all']) ){
382
- if ( ! empty($_cond_value['include']) ){
383
- if ( is_string( $_cond_value['include'] ) ){
384
- $category_ids = explode( ',', $_cond_value['include'] );
385
- } else {
386
- $category_ids = $_cond_value['include'];
387
- }
388
- if ( is_array( $category_ids ) && ! in_array( $query->term_id, $category_ids ) ) {
389
- return false; }
390
- }
391
- // check for excluded category archive ids
392
- if ( ! empty($_cond_value['exclude']) ){
393
- if ( is_string( $_cond_value['exclude'] ) ){
394
- $category_ids = explode( ',', $_cond_value['exclude'] );
395
- } else {
396
- $category_ids = $_cond_value['exclude'];
397
- }
398
- if ( is_array( $category_ids ) && in_array( $query->term_id, $category_ids ) ) {
399
- return false; }
400
- }
401
- }
402
- break;
403
- // check for included post types
404
- case 'posttypes' :
405
- // display everywhere, if include not set (= all is checked)
406
- // TODO remove condition check for string; deprecated since 1.2.2
407
- if ( empty($_cond_value['all']) ){
408
- if ( ! empty($_cond_value['include']) ){
409
- if ( is_string( $_cond_value['include'] ) ){
410
- $post_types = explode( ',', $_cond_value['include'] );
411
- } else {
412
- $post_types = $_cond_value['include'];
413
- }
414
- // check if currently in a post (not post page, but also posts in loops)
415
- if ( is_array( $post_types ) && ! in_array( get_post_type(), $post_types ) ) {
416
- return false;
417
- }
418
- }
419
- // check for excluded post types
420
- // TODO remove in a later version, deprecated since 1.2.2
421
- if ( ! empty($_cond_value['exclude']) ){
422
- $post_types = explode( ',', $_cond_value['exclude'] );
423
- // check if currently in a post (not post page, but also posts in loops)
424
- if ( is_array( $post_types ) && in_array( get_post_type(), $post_types ) ) {
425
- return false;
426
- }
427
- }
428
- }
429
- break;
430
- // check is_front_page
431
- // @link https://codex.wordpress.org/Conditional_Tags#The_Front_Page
432
- case 'is_front_page' :
433
- if ( $_cond_value == 0 && $wp_the_query->is_front_page()) {
434
- return false; }
435
- break;
436
- // check is_singular
437
- // @link https://codex.wordpress.org/Conditional_Tags#A_Post_Type
438
- case 'is_singular' :
439
- if ( $_cond_value == 0 && $wp_the_query->is_singular() ) {
440
- return false; }
441
- break;
442
- // check is_archive
443
- // @link https://codex.wordpress.org/Conditional_Tags#Any_Archive_Page
444
- case 'is_archive' :
445
- if ( $_cond_value == 0 && $wp_the_query->is_archive() ) {
446
- return false; }
447
- break;
448
- // check is_search
449
- // @link https://codex.wordpress.org/Conditional_Tags#A_Search_Result_Page
450
- case 'is_search' :
451
- if ( $_cond_value == 0 && $wp_the_query->is_search() ) {
452
- return false; }
453
- break;
454
- // check is_404
455
- // @link https://codex.wordpress.org/Conditional_Tags#A_404_Not_Found_Page
456
- case 'is_404' :
457
- if ( $_cond_value == 0 && $wp_the_query->is_404() ) {
458
- return false; }
459
- break;
460
- // check is_attachment
461
- // @link https://codex.wordpress.org/Conditional_Tags#An_Attachment
462
- case 'is_attachment' :
463
- if ( $_cond_value == 0 && $wp_the_query->is_attachment() ) {
464
- return false; }
465
- break;
466
- // check !is_main_query
467
- // @link https://codex.wordpress.org/Function_Reference/is_main_query
468
- case 'is_main_query' :
469
- if ( $_cond_value == 0 && !is_main_query() ) {
470
- return false; }
471
- break;
472
- }
473
- }
474
-
475
- return true;
476
- }
477
-
478
- /**
479
- * get all terms of a specific post or post type
480
- *
481
- * @param int $post_id id of the post
482
- * @return arr $out ids of terms this post belongs to
483
- */
484
- private function get_object_terms($post_id = 0){
485
-
486
- $post_id = absint( $post_id );
487
- if ( ! $post_id ) { return array(); }
488
-
489
- // get post by post id
490
- $post = get_post( $post_id );
491
-
492
- // get post type by post
493
- $post_type = $post->post_type;
494
-
495
- // get post type taxonomies
496
- $taxonomies = get_object_taxonomies( $post_type, 'objects' );
497
-
498
- $term_ids = array();
499
- foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){
500
-
501
- // get the terms related to post
502
- $terms = get_the_terms( $post->ID, $taxonomy_slug );
503
-
504
- if ( ! empty( $terms ) ) {
505
- foreach ( $terms as $term ) {
506
- $term_ids[] = $term->term_id;
507
- }
508
- }
509
- }
510
-
511
- return $term_ids;
512
- }
513
-
514
  /**
515
  * check visitor conditions
516
  *
@@ -575,20 +343,15 @@ class Advanced_Ads_Ad {
575
  */
576
  public function can_display_by_expiry_date(){
577
 
578
- if ( !isset($this->options['expiry_date']) ) { return true; }
579
-
580
- $ad_expiry_date = absint($this->options( 'expiry_date' ));
581
-
582
- if ( $ad_expiry_date == 0 ) { return true; }
583
 
584
- // create blog specific timestamp
585
- // TODO this is broken: use get_date_from_gmt()
586
- $blog_expiry_date = time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
587
-
588
- // check blog time against current time
589
- if ( $blog_expiry_date >= $ad_expiry_date ) { return false; }
590
 
591
- return true;
 
592
  }
593
 
594
  /**
@@ -621,8 +384,7 @@ class Advanced_Ads_Ad {
621
  // filter to manipulate options or add more to be saved
622
  $options = apply_filters( 'advanced-ads-save-options', $options, $this );
623
 
624
- update_post_meta( $this->id, self::$options_meta_field, $options );
625
-
626
  }
627
 
628
  /**
@@ -664,7 +426,7 @@ class Advanced_Ads_Ad {
664
  * @param string $content ad content
665
  * @param obj $ad ad object
666
  */
667
- public function prepare_frontend_output(){
668
 
669
  // load ad type specific content filter
670
  $output = $this->type_obj->prepare_output( $this );
172
  // set wrapper conditions
173
  $this->wrapper = apply_filters( 'advanced-ads-set-wrapper', $this->wrapper, $this );
174
  // add unique wrapper id, if options given
175
+ if ( is_array( $this->wrapper ) && $this->wrapper !== array() && ! isset( $this->wrapper['id'] ) ){
176
  // create unique id if not yet given
177
  $this->wrapper['id'] = $this->create_wrapper_id();
178
  }
186
  * @since 1.0.0
187
  * @todo check against default values
188
  */
189
+ public function options( $field = '', $default = null ) {
190
  // retrieve options, if not given yet
191
+ // -TODO may execute multiple times (if empty); bad design and risk to access unintialised data with direct access to $this->options property.
192
  if ( $this->options === array() ) {
193
  // load arguments given on ad load
194
  $this->options = $this->args;
202
  // return specific option
203
  if ( $field != '' ) {
204
  if ( isset($this->options[$field]) ) {
205
+ return $this->options[$field];
206
+ }
207
  } else { // return all options
208
  if ( ! empty($this->options) ) {
209
+ return $this->options;
210
+ }
211
  }
212
+
213
+ return $default;
214
  }
215
 
216
  /**
269
  return false;
270
  }
271
 
272
+ if ( ! $this->can_display_by_visitor() || ! $this->can_display_by_expiry_date() ) {
 
 
273
  return false;
274
  }
275
 
279
  return $can_display;
280
  }
281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  /**
283
  * check visitor conditions
284
  *
343
  */
344
  public function can_display_by_expiry_date(){
345
 
346
+ // if expiry_date is not set null is returned
347
+ $ad_expiry_date = (int) $this->options( 'expiry_date' );
 
 
 
348
 
349
+ if ( $ad_expiry_date <= 0 ) {
350
+ return true;
351
+ }
 
 
 
352
 
353
+ // check blog time against current time (GMT)
354
+ return $ad_expiry_date > time();
355
  }
356
 
357
  /**
384
  // filter to manipulate options or add more to be saved
385
  $options = apply_filters( 'advanced-ads-save-options', $options, $this );
386
 
387
+ update_post_meta( $this->id, self::$options_meta_field, $options );
 
388
  }
389
 
390
  /**
426
  * @param string $content ad content
427
  * @param obj $ad ad object
428
  */
429
+ public function prepare_frontend_output() {
430
 
431
  // load ad type specific content filter
432
  $output = $this->type_obj->prepare_output( $this );
classes/ad_ajax_callbacks.php CHANGED
@@ -27,6 +27,7 @@ class Advanced_Ads_Ad_Ajax_Callbacks {
27
  add_action( 'wp_ajax_advads-terms-search', array( $this, 'search_terms' ) );
28
  add_action( 'wp_ajax_advads-close-notice', array( $this, 'close_notice' ) );
29
  add_action( 'wp_ajax_advads-subscribe-notice', array( $this, 'subscribe' ) );
 
30
  }
31
 
32
  /**
@@ -142,4 +143,22 @@ class Advanced_Ads_Ad_Ajax_Callbacks {
142
  echo Advanced_Ads_Admin_Notices::get_instance()->subscribe($_POST['notice']);
143
  die();
144
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  }
27
  add_action( 'wp_ajax_advads-terms-search', array( $this, 'search_terms' ) );
28
  add_action( 'wp_ajax_advads-close-notice', array( $this, 'close_notice' ) );
29
  add_action( 'wp_ajax_advads-subscribe-notice', array( $this, 'subscribe' ) );
30
+ add_action( 'wp_ajax_advads-activate-license', array( $this, 'activate_license' ) );
31
  }
32
 
33
  /**
143
  echo Advanced_Ads_Admin_Notices::get_instance()->subscribe($_POST['notice']);
144
  die();
145
  }
146
+
147
+ /**
148
+ * activate license of an add-on
149
+ *
150
+ * @since 1.5.7
151
+ */
152
+ public function activate_license(){
153
+
154
+
155
+ // check nonce
156
+ check_ajax_referer( 'advads_ajax_license_nonce', 'security' );
157
+
158
+ if ( !isset( $_POST['addon'] ) || $_POST['addon'] === '' ) { die(); }
159
+
160
+ echo Advanced_Ads_Admin::get_instance()->activate_license( $_POST['addon'], $_POST['pluginname'], $_POST['optionslug'] );
161
+
162
+ die();
163
+ }
164
  }
classes/ad_group.php CHANGED
@@ -30,8 +30,8 @@ class Advanced_Ads_Group {
30
 
31
  /**
32
  * group type
33
- *
34
- * @since 1.4.8
35
  */
36
  public $type = 'default';
37
 
@@ -70,13 +70,20 @@ class Advanced_Ads_Group {
70
  */
71
  public $ad_count = 1;
72
 
73
- /**
74
  * contains other options
75
  *
76
  * @since 1.5.5
77
  */
78
  public $options = array();
79
 
 
 
 
 
 
 
 
80
  /**
81
  * containing ad weights
82
  */
@@ -91,31 +98,36 @@ class Advanced_Ads_Group {
91
  * init ad group object
92
  *
93
  * @since 1.0.0
94
- * @param int|obj $group either id of the ad group (= taxonomy id) or term object
 
95
  */
96
- public function __construct($group) {
97
 
98
  $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
99
 
100
  $group = get_term( $group, $this->taxonomy );
101
- if ( $group == null || is_wp_error($group) ) { return; }
 
 
102
 
103
- $this->load( $group );
104
  }
105
 
106
  /**
107
  * load additional ad group properties
108
  *
109
  * @since 1.4.8
110
- * @param int $id group id
111
- * @param obj $group wp term object
 
112
  */
113
- private function load($group) {
114
  $this->id = $group->term_id;
115
  $this->name = $group->name;
116
  $this->slug = $group->slug;
117
  $this->description = $group->description;
118
  $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
 
119
 
120
  $this->load_additional_attributes();
121
  }
@@ -125,20 +137,21 @@ class Advanced_Ads_Group {
125
  *
126
  * @since 1.4.8
127
  */
128
- protected function load_additional_attributes(){
 
129
  $all_groups = get_option( 'advads-ad-groups', array() );
130
 
131
- if(isset($all_groups[$this->id]['type'])){
132
- $this->type = $all_groups[$this->id]['type'];
133
  }
134
 
135
  // get ad count; default is 1
136
- if(isset($all_groups[$this->id]['ad_count'])){
137
- $this->ad_count = ($all_groups[$this->id]['ad_count'] === 'all' ) ? 'all' : absint( $all_groups[$this->id]['ad_count'] );
138
  }
139
 
140
- if(isset($all_groups[$this->id]['options'])){
141
- $this->options = isset( $all_groups[$this->id]['options'] ) ? $all_groups[$this->id]['options'] : array();
142
  }
143
  }
144
 
@@ -150,11 +163,15 @@ class Advanced_Ads_Group {
150
  */
151
  public function output(){
152
 
153
- if(!$this->id) return;
 
 
154
 
155
  // load ads
156
  $ads = $this->load_all_ads();
157
- if ( $ads === array() ) { return; }
 
 
158
 
159
  // get ad weights serving as an order here
160
  $weights = $this->get_ad_weights();
@@ -167,9 +184,18 @@ class Advanced_Ads_Group {
167
  $weights = $this->ad_weights;
168
  }
169
 
 
 
 
 
 
 
 
170
  // order ads based on group type
171
  switch($this->type){
172
  case 'ordered' :
 
 
173
  $ordered_ad_ids = array_keys($weights);
174
  break;
175
  default : // default
@@ -181,19 +207,18 @@ class Advanced_Ads_Group {
181
  // load the ad output
182
  $output = array();
183
  $ads_displayed = 0;
 
184
  foreach ( $ordered_ad_ids as $_ad_id ) {
185
- // +TODO should use ad-selection interface to output actual ad
186
- // .. might break context otherwise or cause hard to detect issues
187
  // load the ad object
188
- $ad = new Advanced_Ads_Ad( $_ad_id );
189
- if ( $ad->can_display() ) {
190
- $output[] = $ad->output();
191
  $ads_displayed++;
 
192
  if( $ads_displayed === $this->ad_count ) {
193
- break;
194
  }
195
  }
196
- // break the loop when maximum ads are reached
197
  }
198
 
199
  // add the group to the global output array
@@ -202,6 +227,7 @@ class Advanced_Ads_Group {
202
 
203
  // filter grouped ads output
204
  $output_string = implode( '', apply_filters( 'advanced-ads-group-output-array', $output, $this ) );
 
205
  // filter final group output
206
  return apply_filters( 'advanced-ads-group-output', $output_string, $this );
207
  }
@@ -223,27 +249,43 @@ class Advanced_Ads_Group {
223
  *
224
  * @since 1.0.0
225
  * @update 1.1.0 load only public ads
 
226
  * @return arr $ads array with ad (post) objects
227
  */
228
  private function load_all_ads() {
229
 
230
- if(!$this->id) return array();
 
 
231
 
 
 
 
 
232
  $args = array(
233
  'post_type' => $this->post_type,
234
  'post_status' => 'publish',
235
  'posts_per_page' => -1,
236
  'taxonomy' => $this->taxonomy,
237
  'term' => $this->slug,
238
- 'orderby' => 'id'
239
  );
240
- $ads = new WP_Query( $args );
241
 
242
- if ( $ads->have_posts() ) {
243
- return $this->ads = $this->add_post_ids( $ads->posts );
 
 
 
244
  } else {
245
- return $this->ads = array();
 
 
 
 
 
246
  }
 
 
247
  }
248
 
249
  /**
30
 
31
  /**
32
  * group type
33
+ *
34
+ * @since 1.4.8
35
  */
36
  public $type = 'default';
37
 
70
  */
71
  public $ad_count = 1;
72
 
73
+ /**$slug
74
  * contains other options
75
  *
76
  * @since 1.5.5
77
  */
78
  public $options = array();
79
 
80
+ /**
81
+ * Optional arguments passed to ads.
82
+ *
83
+ * @var array
84
+ */
85
+ protected $ad_args = array();
86
+
87
  /**
88
  * containing ad weights
89
  */
98
  * init ad group object
99
  *
100
  * @since 1.0.0
101
+ * @param int|obj $group either id of the ad group (= taxonomy id) or term object
102
+ * @param array $ad_args optional arguments passed to ads
103
  */
104
+ public function __construct( $group, $ad_args = array() ) {
105
 
106
  $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
107
 
108
  $group = get_term( $group, $this->taxonomy );
109
+ if ( $group == null || is_wp_error( $group ) ) {
110
+ return;
111
+ }
112
 
113
+ $this->load( $group, $ad_args );
114
  }
115
 
116
  /**
117
  * load additional ad group properties
118
  *
119
  * @since 1.4.8
120
+ * @param int $id group id
121
+ * @param obj $group wp term object
122
+ * @param array $ad_args optional arguments passed to ads
123
  */
124
+ private function load( $group, $ad_args ) {
125
  $this->id = $group->term_id;
126
  $this->name = $group->name;
127
  $this->slug = $group->slug;
128
  $this->description = $group->description;
129
  $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
130
+ $this->ad_args = $ad_args;
131
 
132
  $this->load_additional_attributes();
133
  }
137
  *
138
  * @since 1.4.8
139
  */
140
+ protected function load_additional_attributes() {
141
+ // -TODO should abstract (i.e. only call once per request)
142
  $all_groups = get_option( 'advads-ad-groups', array() );
143
 
144
+ if ( isset( $all_groups[ $this->id ]['type'] ) ) {
145
+ $this->type = $all_groups[ $this->id ]['type'];
146
  }
147
 
148
  // get ad count; default is 1
149
+ if ( isset( $all_groups[ $this->id ]['ad_count'] ) ) {
150
+ $this->ad_count = $all_groups[ $this->id ]['ad_count'] === 'all' ? 'all' : (int) $all_groups[ $this->id ]['ad_count'];
151
  }
152
 
153
+ if ( isset( $all_groups[ $this->id ]['options'] ) ) {
154
+ $this->options = isset( $all_groups[ $this->id ]['options'] ) ? $all_groups[ $this->id ]['options'] : array();
155
  }
156
  }
157
 
163
  */
164
  public function output(){
165
 
166
+ if ( ! $this->id ) {
167
+ return;
168
+ }
169
 
170
  // load ads
171
  $ads = $this->load_all_ads();
172
+ if ( $ads === array() ) {
173
+ return;
174
+ }
175
 
176
  // get ad weights serving as an order here
177
  $weights = $this->get_ad_weights();
184
  $weights = $this->ad_weights;
185
  }
186
 
187
+ // remove ads with 0 ad weight
188
+ foreach( $weights as $_ad_id => $_ad_weight ){
189
+ if( $_ad_weight === 0 ){
190
+ unset( $weights[ $_ad_id ] );
191
+ }
192
+ }
193
+
194
  // order ads based on group type
195
  switch($this->type){
196
  case 'ordered' :
197
+ // order to highest weight first
198
+ arsort( $weights );
199
  $ordered_ad_ids = array_keys($weights);
200
  break;
201
  default : // default
207
  // load the ad output
208
  $output = array();
209
  $ads_displayed = 0;
210
+ $ad_select = Advanced_Ads_Select::get_instance();
211
  foreach ( $ordered_ad_ids as $_ad_id ) {
 
 
212
  // load the ad object
213
+ $ad = $ad_select->get_ad_by_method( $_ad_id, Advanced_Ads_Select::AD, $this->ad_args );
214
+ if ( $ad !== null ) {
215
+ $output[] = $ad;
216
  $ads_displayed++;
217
+ // break the loop when maximum ads are reached
218
  if( $ads_displayed === $this->ad_count ) {
219
+ break;
220
  }
221
  }
 
222
  }
223
 
224
  // add the group to the global output array
227
 
228
  // filter grouped ads output
229
  $output_string = implode( '', apply_filters( 'advanced-ads-group-output-array', $output, $this ) );
230
+
231
  // filter final group output
232
  return apply_filters( 'advanced-ads-group-output', $output_string, $this );
233
  }
249
  *
250
  * @since 1.0.0
251
  * @update 1.1.0 load only public ads
252
+ * @update allow to cache groups for few minutes
253
  * @return arr $ads array with ad (post) objects
254
  */
255
  private function load_all_ads() {
256
 
257
+ if ( ! $this->id ) {
258
+ return array();
259
+ }
260
 
261
+ // reset
262
+ $this->ads = array();
263
+
264
+ // much more complex than needed: one of the three queries is not needed and the last query gets slow quiet fast
265
  $args = array(
266
  'post_type' => $this->post_type,
267
  'post_status' => 'publish',
268
  'posts_per_page' => -1,
269
  'taxonomy' => $this->taxonomy,
270
  'term' => $this->slug,
271
+ 'orderby' => 'id' // might want to avoid sorting as not needed for most calls and fast in PHP; slight I/O blocking concern
272
  );
 
273
 
274
+ $found = false;
275
+ $key = 'ad_group_all_ads_' . $this->post_type . '_' . $this->taxonomy . '_' . $this->slug;
276
+ $ads = wp_cache_get( $key, Advanced_Ads_Model::OBJECT_CACHE_GROUP, false, $found );
277
+ if ( $found ) {
278
+ $this->ads = $ads;
279
  } else {
280
+ $ads = new WP_Query( $args );
281
+
282
+ if ( $ads->have_posts() ) {
283
+ $this->ads = $this->add_post_ids( $ads->posts );
284
+ wp_cache_set( $key, $this->ads, Advanced_Ads_Model::OBJECT_CACHE_GROUP, Advanced_Ads_Model::OBJECT_CACHE_TTL);
285
+ }
286
  }
287
+
288
+ return $this->ads;
289
  }
290
 
291
  /**
classes/ad_placements.php CHANGED
@@ -200,48 +200,68 @@ class Advanced_Ads_Placements {
200
  * return content of a placement
201
  *
202
  * @since 1.1.0
203
- * @param string $id slug of the display
 
204
  */
205
- public static function output($id = '') {
206
  // get placement data for the slug
207
  if ( $id == '' ) {
208
- return; }
 
209
 
210
- $placements = get_option( 'advads-ads-placements', array() );
211
 
212
- if ( isset($placements[$id]['item']) ) {
213
- $_item = explode( '_', $placements[$id]['item'] );
214
 
215
- if ( isset($_item[1]) ) {
216
- $_item_id = absint( $_item[1] ); }
217
- elseif (empty($_item_id))
218
- return;
219
 
220
- // return either ad or group content
221
- if ( $_item[0] == 'ad' ) {
222
- // add the placement to the global output array
223
- $advads = Advanced_Ads::get_instance();
224
- $advads->current_ads[] = array('type' => 'placement', 'id' => $id, 'title' => $placements[$id]['name']);
225
-
226
- // create class from placement id, but not, if header injection
227
- if ( isset($placements[$id]['type']) && $placements[$id]['type'] == 'header' ){
228
- $ad_args = array();
229
- } else {
230
- $class = 'advads-' . $id;
231
- $ad_args = array('output' => array('class' => array($class)));
232
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( $_item_id, 'id', $ad_args );
235
- } elseif ( $_item[0] == 'group' ) {
236
- // add the placement to the global output array
237
- $advads = Advanced_Ads::get_instance();
238
- $advads->current_ads[] = array('type' => 'placement', 'id' => $id, 'title' => $placements[$id]['name']);
239
 
240
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( $_item_id, 'group' );
241
- }
242
  }
243
-
244
- return;
245
  }
246
 
247
  /**
@@ -255,17 +275,16 @@ class Advanced_Ads_Placements {
255
  * @link inspired by http://www.wpbeginner.com/wp-tutorials/how-to-insert-ads-within-your-post-content-in-wordpress/
256
  */
257
  public static function &inject_in_content($placement_id, $options, &$content) {
258
-
259
  /*
260
- * hot-fixed to support some tags under idealised conditions.
261
- * this does ignore:
262
- * - autop() messups
263
- * - nesting of any kind
264
- * - non-valid XHTML (i.e. wild HTML)
265
- *
266
- * 'after' is experimental as the concept requires DOM and is not fully deterministic across implementations.
267
- * it falls back to 'before' n+1-th element or 'after' closing tag of the n-th.
268
- */
269
  $tag = isset($options['tag']) ? $options['tag'] : 'p';
270
  $position = isset($options['position']) ? $options['position'] : 'after';
271
  $paragraph_id = isset($options['index']) ? $options['index'] : 1;
@@ -299,7 +318,7 @@ class Advanced_Ads_Placements {
299
  }
300
 
301
  if ( isset($insertAt) ) {
302
- $ad_content = Advanced_Ads_Placements::output( $placement_id );
303
  if ( $insertAt === false ) {
304
  $content .= $ad_content; // fallback: end-of-content
305
  } else {
200
  * return content of a placement
201
  *
202
  * @since 1.1.0
203
+ * @param string $id slug of the display
204
+ * @param array $args optional arguments (passed to child)
205
  */
206
+ public static function output( $id = '', $args = array() ) {
207
  // get placement data for the slug
208
  if ( $id == '' ) {
209
+ return;
210
+ }
211
 
212
+ $placements = Advanced_Ads::get_ad_placements_array();
213
 
214
+ if ( isset( $placements[ $id ]['item'] ) && $placements[ $id ]['item'] !== '' ) {
215
+ $_item = explode( '_', $placements[ $id ]['item'] );
216
 
217
+ if ( ! isset( $_item[1] ) || empty( $_item[1] ) ) {
218
+ return ;
219
+ }
 
220
 
221
+ // inject options
222
+ if ( isset( $placements[ $id ]['options'] ) && is_array( $placements[ $id ]['options'] ) ) {
223
+ foreach ( $placements[ $id ]['options'] as $_k => $_v ) {
224
+ if ( ! isset( $args[ $_k ] ) ) {
225
+ $args[ $_k ] = $_v;
226
+ }
 
 
 
 
 
 
227
  }
228
+ }
229
+ // return either ad or group content
230
+ switch ( $_item[0] ) {
231
+ case 'ad':
232
+ case Advanced_Ads_Select::AD:
233
+ // create class from placement id (not if header injection)
234
+ if ( ! isset( $placements[ $id ]['type'] ) || $placements[ $id ]['type'] !== 'header' ) {
235
+ if ( ! isset( $args['output'] ) ) {
236
+ $args['output'] = array();
237
+ }
238
+ if ( ! isset( $args['output']['class'] ) ) {
239
+ $args['output']['class'] = array();
240
+ }
241
+ $class = 'advads-' . $id;
242
+ if ( ! in_array( $class, $args['output']['class'] ) ) {
243
+ $args['output']['class'][] = $class;
244
+ }
245
+ }
246
+
247
+ // fix method id
248
+ $_item[0] = Advanced_Ads_Select::AD;
249
+ break;
250
+
251
+ // avoid loops (programmatical error)
252
+ case Advanced_Ads_Select::PLACEMENT:
253
+ return;
254
+
255
+ case Advanced_Ads_Select::GROUP:
256
+ default:
257
+ }
258
 
259
+ // add the placement to the global output array
260
+ $advads = Advanced_Ads::get_instance();
261
+ $advads->current_ads[] = array('type' => 'placement', 'id' => $id, 'title' => $placements[ $id ]['name']);
 
 
262
 
263
+ return Advanced_Ads_Select::get_instance()->get_ad_by_method( (int) $_item[1], $_item[0], $args );
 
264
  }
 
 
265
  }
266
 
267
  /**
275
  * @link inspired by http://www.wpbeginner.com/wp-tutorials/how-to-insert-ads-within-your-post-content-in-wordpress/
276
  */
277
  public static function &inject_in_content($placement_id, $options, &$content) {
 
278
  /*
279
+ * hot-fixed to support some tags under idealised conditions.
280
+ * this does ignore:
281
+ * - autop() messups
282
+ * - nesting of any kind
283
+ * - non-valid XHTML (i.e. wild HTML)
284
+ *
285
+ * 'after' is experimental as the concept requires DOM and is not fully deterministic across implementations.
286
+ * it falls back to 'before' n+1-th element or 'after' closing tag of the n-th.
287
+ */
288
  $tag = isset($options['tag']) ? $options['tag'] : 'p';
289
  $position = isset($options['position']) ? $options['position'] : 'after';
290
  $paragraph_id = isset($options['index']) ? $options['index'] : 1;
318
  }
319
 
320
  if ( isset($insertAt) ) {
321
+ $ad_content = Advanced_Ads_Select::get_instance()->get_ad_by_method( $placement_id, 'placement', $options );
322
  if ( $insertAt === false ) {
323
  $content .= $ad_content; // fallback: end-of-content
324
  } else {
classes/ad_type_content.php CHANGED
@@ -63,13 +63,13 @@ class Advanced_Ads_Ad_Type_Content extends Advanced_Ads_Ad_Type_Abstract{
63
  ?><p><?php _e( 'Please <strong>save the ad</strong> before changing it to the content type.', ADVADS_SLUG ); ?></p><?php
64
  $status = get_post_status( $ad->id );
65
  if ( 'publish' != $status && 'future' != $status && 'pending' != $status ) { ?>
66
- <input <?php if ( 'private' == $status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" />
67
  <?php } else {
68
  ?><input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ) ?>" />
69
  <input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e( 'Update' ) ?>" /><?php
70
  }
71
  if ( ! empty($ad->content) ) : ?><textarea id="advads-ad-content-plain" style="display:none;" cols="1" rows="1" name="advanced_ad[content]"><?php
72
- echo $ad->content; ?></textarea><br class="clear"/><?php endif;
73
  } else {
74
  $args = array(
75
  'textarea_name' => 'advanced_ad[content]',
@@ -77,7 +77,7 @@ echo $ad->content; ?></textarea><br class="clear"/><?php endif;
77
  'drag_drop_upload' => true
78
  );
79
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
80
- }
81
  }
82
 
83
  /**
63
  ?><p><?php _e( 'Please <strong>save the ad</strong> before changing it to the content type.', ADVADS_SLUG ); ?></p><?php
64
  $status = get_post_status( $ad->id );
65
  if ( 'publish' != $status && 'future' != $status && 'pending' != $status ) { ?>
66
+ <input <?php if ( 'private' == $status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button button-primary" />
67
  <?php } else {
68
  ?><input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ) ?>" />
69
  <input name="save" type="submit" class="button button-primary button-large" id="publish" accesskey="p" value="<?php esc_attr_e( 'Update' ) ?>" /><?php
70
  }
71
  if ( ! empty($ad->content) ) : ?><textarea id="advads-ad-content-plain" style="display:none;" cols="1" rows="1" name="advanced_ad[content]"><?php
72
+ echo $ad->content; ?></textarea><?php endif;
73
  } else {
74
  $args = array(
75
  'textarea_name' => 'advanced_ad[content]',
77
  'drag_drop_upload' => true
78
  );
79
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
80
+ } ?><br class="clear"/><?php
81
  }
82
 
83
  /**
classes/plugin.php CHANGED
@@ -87,6 +87,10 @@ class Advanced_Ads_Plugin {
87
  add_action( 'admin_menu', array( $this, 'remove_taxonomy_menu_item' ) );
88
  // load widgets
89
  add_action( 'widgets_init', array( $this, 'widget_init' ) );
 
 
 
 
90
  }
91
 
92
  /**
@@ -380,4 +384,48 @@ class Advanced_Ads_Plugin {
380
  $this->internal_options = $options;
381
  update_option( ADVADS_SLUG . '-internal', $options );
382
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  }
87
  add_action( 'admin_menu', array( $this, 'remove_taxonomy_menu_item' ) );
88
  // load widgets
89
  add_action( 'widgets_init', array( $this, 'widget_init' ) );
90
+
91
+ // update add-ons
92
+ add_action( 'admin_init', array($this, 'add_on_updater'), 1 );
93
+
94
  }
95
 
96
  /**
384
  $this->internal_options = $options;
385
  update_option( ADVADS_SLUG . '-internal', $options );
386
  }
387
+
388
+ /*
389
+ * add-on updater
390
+ *
391
+ * @since 1.5.7
392
+ *
393
+ */
394
+ public function add_on_updater(){
395
+
396
+ /**
397
+ * list of registered add ons
398
+ * contains:
399
+ * name
400
+ * version
401
+ * path
402
+ * options_slug
403
+ * short option slug (=key)
404
+ */
405
+ $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
406
+
407
+ if( $add_ons === array() ) {
408
+ return;
409
+ }
410
+
411
+ foreach( $add_ons as $_add_on_key => $_add_on ){
412
+ // check status
413
+ if(get_option($_add_on['options_slug'] . '-license-status', false) !== 'valid') {
414
+ return;
415
+ }
416
+
417
+ // retrieve our license key from the DB
418
+ $licenses = get_option(ADVADS_SLUG . '-licenses', array());
419
+ $license_key = isset($licenses[$_add_on_key]) ? $licenses[$_add_on_key] : '';
420
+
421
+ // setup the updater
422
+ new EDD_SL_Plugin_Updater( ADVADS_URL, $_add_on['path'], array(
423
+ 'version' => $_add_on['version'],
424
+ 'license' => $license_key,
425
+ 'item_name' => $_add_on['name'],
426
+ 'author' => 'Thomas Maier'
427
+ )
428
+ );
429
+ }
430
+ }
431
  }
composer.lock CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "_readme": [
3
  "This file locks the dependencies of your project to a known state",
4
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
  "hash": "a5682b6980988f749640ce92382a6247",
1
  {
2
  "_readme": [
3
  "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
  "hash": "a5682b6980988f749640ce92382a6247",
languages/advanced-ads-de_DE.mo CHANGED
Binary file
languages/advanced-ads-de_DE.po CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: Advanved Ads\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
  "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Tue May 12 2015 08:56:55 GMT+0200 (CEST)\n"
7
  "Last-Translator: admin <post@webzunft.de>\n"
8
  "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
  "Language: German\n"
@@ -26,62 +26,62 @@ msgstr ""
26
  "X-Textdomain-Support: yes\n"
27
  "X-Loco-Target-Locale: de_DE"
28
 
29
- #: ../admin/class-advanced-ads-admin.php:200
30
  msgid "Overview"
31
  msgstr "Übersicht"
32
 
33
  #. translators: plugin header field 'Name'
34
- #: ../admin/class-advanced-ads-admin.php:200 ../classes/widget.php:21
35
  msgid "Advanced Ads"
36
  msgstr "Advanced Ads"
37
 
38
- #: ../admin/class-advanced-ads-admin.php:204 ../admin/class-advanced-ads-admin.
39
- #: php:204 ../admin/views/ad-group-list-form-row.php:24 ../admin/views/ad-group-
40
  #: list-header.php:5 ../admin/views/placements.php:64 ../classes/widget.php:66 ..
41
  #: public/class-advanced-ads.php:539
42
  msgid "Ads"
43
  msgstr "Anzeigen"
44
 
45
- #: ../admin/class-advanced-ads-admin.php:208 ../admin/views/placements.php:57 ..
46
  #: classes/widget.php:59
47
  msgid "Ad Groups"
48
  msgstr "Anzeigen-Gruppen"
49
 
50
- #: ../admin/class-advanced-ads-admin.php:208 ../public/class-advanced-ads.php:513
51
  msgid "Groups"
52
  msgstr "Gruppen"
53
 
54
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/debug.php:14
55
  msgid "Ad Placements"
56
  msgstr "Anzeigen-Platzierungen"
57
 
58
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/placements.php:18
59
  msgid "Placements"
60
  msgstr "Platzierungen"
61
 
62
- #: ../admin/class-advanced-ads-admin.php:217
63
  msgid "Advanced Ads Settings"
64
  msgstr "Advanced-Ads-Einstellungen"
65
 
66
- #: ../admin/class-advanced-ads-admin.php:217 ../admin/class-advanced-ads-admin.
67
- #: php:387 ../admin/views/debug.php:11
68
  msgid "Settings"
69
  msgstr "Einstellungen"
70
 
71
- #: ../admin/class-advanced-ads-admin.php:220
72
  msgid "Advanced Ads Debugging"
73
  msgstr "Advanced-Ads-Fehleranalyse (Debugging)"
74
 
75
- #: ../admin/class-advanced-ads-admin.php:220
76
  msgid "Debug"
77
  msgstr "Debug"
78
 
79
- #: ../admin/class-advanced-ads-admin.php:301 ../admin/class-advanced-ads-admin.
80
- #: php:328
81
  msgid "Sorry, you are not allowed to access this feature."
82
  msgstr "Sie haben leider keinen Zugriff auf diese Funktion"
83
 
84
- #: ../admin/class-advanced-ads-admin.php:314
85
  msgid ""
86
  "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
87
  "deleted?"
@@ -89,161 +89,161 @@ msgstr ""
89
  "Sie haben versucht, ein Element, das nicht existiert, zu bearbeiten. "
90
  "Vielleicht wurde es gelöscht?"
91
 
92
- #: ../admin/class-advanced-ads-admin.php:414
93
  msgid "Ad Type"
94
  msgstr "Anzeigen-Typ"
95
 
96
- #: ../admin/class-advanced-ads-admin.php:417
97
  msgid "Ad Parameters"
98
  msgstr "Anzeigen-Parameter"
99
 
100
- #: ../admin/class-advanced-ads-admin.php:420
101
  msgid "Layout / Output"
102
  msgstr "Layout / Ausgabe"
103
 
104
- #: ../admin/class-advanced-ads-admin.php:423
105
  msgid "Display Conditions"
106
  msgstr "Anzeige-Bedingungen"
107
 
108
- #: ../admin/class-advanced-ads-admin.php:426
109
  msgid "Visitor Conditions"
110
  msgstr "Besucher-Bedingungen"
111
 
112
- #: ../admin/class-advanced-ads-admin.php:583 ../admin/class-advanced-ads-admin.
113
- #: php:584
114
  msgid "Ad updated."
115
  msgstr "Anzeige aktualisiert."
116
 
117
  #. translators: %s: date and time of the revision
118
- #: ../admin/class-advanced-ads-admin.php:586
119
  #, php-format
120
  msgid "Ad restored to revision from %s"
121
  msgstr "Anzeige aus Revision %s wiederhergestellt"
122
 
123
- #: ../admin/class-advanced-ads-admin.php:587
124
  msgid "Ad published."
125
  msgstr "Anzeige veröffentlicht."
126
 
127
- #: ../admin/class-advanced-ads-admin.php:588
128
  msgid "Ad saved."
129
  msgstr "Anzeige gespeichert."
130
 
131
- #: ../admin/class-advanced-ads-admin.php:589
132
  msgid "Ad submitted."
133
  msgstr "Anzeige gesendet."
134
 
135
- #: ../admin/class-advanced-ads-admin.php:591
136
  #, php-format
137
  msgid "Ad scheduled for: <strong>%1$s</strong>."
138
  msgstr "Anzeige geplant für <strong>%1$s</strong>."
139
 
140
  #. translators: Publish box date format, see http://php.net/date
141
- #: ../admin/class-advanced-ads-admin.php:593
142
  msgid "M j, Y @ G:i"
143
  msgstr "j M Y @ G:i"
144
 
145
- #: ../admin/class-advanced-ads-admin.php:595
146
  msgid "Ad draft updated."
147
  msgstr "Anzeigenentwurf gespeichert."
148
 
149
- #: ../admin/class-advanced-ads-admin.php:614
150
  #, php-format
151
  msgid "%s ad updated."
152
  msgid_plural "%s ads updated."
153
  msgstr[0] "%s Anzeige aktualisiert."
154
  msgstr[1] "%s Anzeigen aktualisiert."
155
 
156
- #: ../admin/class-advanced-ads-admin.php:615
157
  #, php-format
158
  msgid "%s ad not updated, somebody is editing it."
159
  msgid_plural "%s ads not updated, somebody is editing them."
160
  msgstr[0] "%s Anzeige nicht aktualisiert, jemand bearbeitet sie."
161
  msgstr[1] "%s Anzeigen nicht aktualisiert, jemand bearbeitet sie."
162
 
163
- #: ../admin/class-advanced-ads-admin.php:616
164
  #, php-format
165
  msgid "%s ad permanently deleted."
166
  msgid_plural "%s ads permanently deleted."
167
  msgstr[0] "%s Anzeige endgültig gelöscht."
168
  msgstr[1] "%s Anzeigen endgültig gelöscht."
169
 
170
- #: ../admin/class-advanced-ads-admin.php:617
171
  #, php-format
172
  msgid "%s ad moved to the Trash."
173
  msgid_plural "%s ads moved to the Trash."
174
  msgstr[0] "%s Anzeige in den Papierkorb verschoben."
175
  msgstr[1] "%s Anzeigen in den Papierkorb verschoben."
176
 
177
- #: ../admin/class-advanced-ads-admin.php:618
178
  #, php-format
179
  msgid "%s ad restored from the Trash."
180
  msgid_plural "%s ads restored from the Trash."
181
  msgstr[0] "%s Anzeige aus dem Papierkorb wiederhergestellt."
182
  msgstr[1] "%s Anzeige aus dem Papierkorb wiederhergestellt."
183
 
184
- #: ../admin/class-advanced-ads-admin.php:655 ../admin/views/settings.php:12
185
  msgid "General"
186
  msgstr "Allgemein"
187
 
188
- #: ../admin/class-advanced-ads-admin.php:663 ../admin/views/settings.php:18
189
  msgid "Licenses"
190
  msgstr "Lizenzen"
191
 
192
- #: ../admin/class-advanced-ads-admin.php:671
193
  msgid "Disable ads"
194
  msgstr "Anzeigen auf dieser Seite deaktivieren."
195
 
196
- #: ../admin/class-advanced-ads-admin.php:679
197
  msgid "Hide ads for logged in users"
198
  msgstr "Verstecke Anzeigen vor eingeloggten Benutzern"
199
 
200
- #: ../admin/class-advanced-ads-admin.php:687
201
  msgid "Use advanced JavaScript"
202
  msgstr "Advanced-JavaScript benutzen"
203
 
204
- #: ../admin/class-advanced-ads-admin.php:695
205
  msgid "Priority of content injection filter"
206
  msgstr "Priorität der Anzeigen-Injektion"
207
 
208
- #: ../admin/class-advanced-ads-admin.php:703
209
  msgid "Hide ads from bots"
210
  msgstr "Anzeigen vor Bots verbergen"
211
 
212
- #: ../admin/class-advanced-ads-admin.php:711
213
  msgid "Disable notices"
214
  msgstr "Mitteilungen deaktivieren"
215
 
216
- #: ../admin/class-advanced-ads-admin.php:767
217
  msgid "(display to all)"
218
  msgstr "(für alle sichtbar)"
219
 
220
- #: ../admin/class-advanced-ads-admin.php:768
221
  msgid "Subscriber"
222
  msgstr "Abonnent"
223
 
224
- #: ../admin/class-advanced-ads-admin.php:769
225
  msgid "Contributor"
226
  msgstr "Mitarbeiter"
227
 
228
- #: ../admin/class-advanced-ads-admin.php:770
229
  msgid "Author"
230
  msgstr "Autor"
231
 
232
- #: ../admin/class-advanced-ads-admin.php:771
233
  msgid "Editor"
234
  msgstr "Redakteur"
235
 
236
- #: ../admin/class-advanced-ads-admin.php:772
237
  msgid "Admin"
238
  msgstr "Admin"
239
 
240
- #: ../admin/class-advanced-ads-admin.php:780
241
  msgid "Choose the lowest role a user must have in order to not see any ads."
242
  msgstr ""
243
  "Wählen Sie die niedrigste Rolle die ein Benutzer haben muss um keine "
244
  "Anzeigen zu sehen."
245
 
246
- #: ../admin/class-advanced-ads-admin.php:793
247
  #, php-format
248
  msgid ""
249
  "Only enable this if you can and want to use the advanced JavaScript "
@@ -252,7 +252,7 @@ msgstr ""
252
  "Aktivieren Sie dies nur, wenn Sie die erweiterten und <a href=\"%s\">hier</a> "
253
  "beschriebenen Advanced-JavaScript-Funktionen verwenden können und wollen."
254
 
255
- #: ../admin/class-advanced-ads-admin.php:806
256
  msgid ""
257
  "Play with this value in order to change the priority of the injected ads "
258
  "compared to other auto injected elements in the post content."
@@ -260,7 +260,7 @@ msgstr ""
260
  "Ändern Sie diesen Wert um die Position automatisch eingefügter Anzeigen im "
261
  "Content gegenüber anderer Elementen zu beeinflussen."
262
 
263
- #: ../admin/class-advanced-ads-admin.php:819
264
  #, php-format
265
  msgid ""
266
  "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
@@ -271,7 +271,7 @@ msgstr ""
271
  "werden mit dem <a href=\"%s\" target=\"_blank\">Tracking Add-On</a> dann auch "
272
  "keine Impressionen mehr gezählt."
273
 
274
- #: ../admin/class-advanced-ads-admin.php:820
275
  msgid ""
276
  "Disabling this option only makes sense if your ads contain content you want "
277
  "to display to bots (like search engines) or your site is cached and bots "
@@ -280,7 +280,7 @@ msgstr ""
280
  "Deaktivieren Sie diese Option, wenn Bots (z.B. Suchmaschinen) die "
281
  "Werbeinhalte sehen sollen oder Ihre Seite einen Cache nutzt."
282
 
283
- #: ../admin/class-advanced-ads-admin.php:833
284
  msgid ""
285
  "Disable all internal notices like tips, tutorials and email newsletters but "
286
  "not critical update notices. Disabling notices is recommended if you run "
@@ -290,40 +290,40 @@ msgstr ""
290
  "Kritische Nachrichten sind hiervon ausgenommen. Nutzen Sie diese Einstellung,"
291
  " wenn Sie Advanced Ads auf mehreren Blog installiert haben."
292
 
293
- #: ../admin/class-advanced-ads-admin.php:862
294
  msgid "Ad Details"
295
  msgstr "Anzeigeneinstellungen"
296
 
297
- #: ../admin/class-advanced-ads-admin.php:936
298
  msgid "Ad Settings"
299
  msgstr "Anzeigen-Einstellungen"
300
 
301
- #: ../admin/class-advanced-ads-admin.php:1011 ../admin/views/overview.php:23
302
  msgid "Ads Dashboard"
303
  msgstr "Anzeigen-Dashboard"
304
 
305
- #: ../admin/class-advanced-ads-admin.php:1023
306
  msgid "From the ad optimization universe"
307
  msgstr "Neues aus dem Anzeigen-Universum"
308
 
309
- #: ../admin/class-advanced-ads-admin.php:1032
310
  msgid "Advanced Ads Tutorials"
311
  msgstr "Advanced Ads Tutorials"
312
 
313
- #: ../admin/class-advanced-ads-admin.php:1043
314
  #, php-format
315
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
316
  msgstr "%d Anzeigen – <a href=\"%s\">verwalten</a> - <a href=\"%s\">neu</a>"
317
 
318
- #: ../admin/class-advanced-ads-admin.php:1054
319
  msgid "plugin manual and homepage"
320
  msgstr "Plugin-Anleitung und Homepage"
321
 
322
- #: ../admin/class-advanced-ads-admin.php:1061
323
  msgid "Get the tutorial via email"
324
  msgstr "Tutorial per E-Mail (engl.)\n"
325
 
326
- #: ../admin/class-advanced-ads-admin.php:1068
327
  msgid "Get AdSense tips via email"
328
  msgstr "AdSense Tips per E-Mail (engl.)"
329
 
@@ -353,7 +353,7 @@ msgid "up to %d ads displayed"
353
  msgstr "bis zu %d Anzeigen sichtbar"
354
 
355
  #: ../admin/includes/class-ad-groups-list.php:187 ../admin/views/ad-group-list-
356
- #: form-row.php:33
357
  msgid "No ads assigned"
358
  msgstr "Keine Anzeigen zugeordnet"
359
 
@@ -589,7 +589,11 @@ msgstr "Sticky (fixierte) Anzeigen"
589
  msgid "PopUps and Layers"
590
  msgstr "PopUps und Layer"
591
 
592
- #: ../admin/includes/class-overview-widgets.php:77 ../admin/includes/notices.php:20
 
 
 
 
593
  msgid ""
594
  "Learn more about how and <strong>how much you can earn with AdSense</strong> "
595
  "and Advanced Ads from my dedicated newsletter."
@@ -597,26 +601,26 @@ msgstr ""
597
  "Erfahren Sie im Newsletter mehr darüber, wie und <strong>wie viel Sie mit "
598
  "AdSense verdienen</strong> können (engl.)."
599
 
600
- #: ../admin/includes/class-overview-widgets.php:78 ../admin/includes/notices.php:
601
  #: 21 ../admin/views/notices/inline.php:3 ../admin/views/notices/subscribe.php:3
602
  msgid "Subscribe me now"
603
  msgstr "Jetzt abonnieren"
604
 
605
- #: ../admin/includes/class-overview-widgets.php:85
606
  msgid "Get the first steps and more tutorials to your inbox."
607
  msgstr ""
608
  "Erhalten Sie die Ersten Schritte und weitere Tutorials direkt in Ihr "
609
  "Postfach."
610
 
611
- #: ../admin/includes/class-overview-widgets.php:86
612
  msgid "Send it now"
613
  msgstr "Jetzt senden"
614
 
615
- #: ../admin/includes/class-overview-widgets.php:109
616
  msgid "Create your first ad"
617
  msgstr "Erstellen Sie Ihre erste Anzeige"
618
 
619
- #: ../admin/includes/class-overview-widgets.php:112
620
  msgid ""
621
  "Ad Groups contain ads and are currently used to rotate multiple ads on a "
622
  "single spot."
@@ -624,47 +628,47 @@ msgstr ""
624
  "Anzeigengruppen enthalten Anzeigen und werden verwendet, um mehrere Anzeigen "
625
  "an einer Stelle zu rotieren."
626
 
627
- #: ../admin/includes/class-overview-widgets.php:114
628
  msgid "Create your first group"
629
  msgstr "Erstellen Sie Ihre erste Gruppe"
630
 
631
- #: ../admin/includes/class-overview-widgets.php:117
632
  msgid "Ad Placements are the best way to manage where to display ads and groups."
633
  msgstr ""
634
  "Anzeigen-Platzierungen sind am besten geeignet um zu bestimmen, wo Anzeigen "
635
  "und Gruppen veröffentlicht werden."
636
 
637
- #: ../admin/includes/class-overview-widgets.php:119
638
  msgid "Create your first placement"
639
  msgstr "Erstellen Sie Ihre erste Platzierung"
640
 
641
- #: ../admin/includes/class-overview-widgets.php:124
642
  msgid "Next steps"
643
  msgstr "Nächste Schritte"
644
 
645
- #: ../admin/includes/class-overview-widgets.php:136
646
  #, php-format
647
  msgid "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
648
  msgstr "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
649
 
650
- #: ../admin/includes/class-overview-widgets.php:137
651
  #, php-format
652
  msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
653
  msgstr "<a href=\"%s\" target=\"_blank\">Anleitung (engl.)</a>"
654
 
655
- #: ../admin/includes/class-overview-widgets.php:138
656
  #, php-format
657
  msgid "Ask other users in the <a href=\"%s\" target=\"_blank\">wordpress.org forum</a>"
658
  msgstr ""
659
  "Andere Nutzer auf <a href=\"%s\" target=\"_blank\">wordpress.org</a> um Hilfe "
660
  "bitten."
661
 
662
- #: ../admin/includes/class-overview-widgets.php:139
663
  #, php-format
664
  msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
665
  msgstr "Über <a href=\"%s\" target=\"_blank\">neue Funktionen</a> abstimmen."
666
 
667
- #: ../admin/includes/class-overview-widgets.php:140
668
  #, php-format
669
  msgid ""
670
  "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
@@ -673,7 +677,7 @@ msgstr ""
673
  "Dem Entwickler mit einem &#9733;&#9733;&#9733;&#9733;&#9733; Review auf <a "
674
  "href=\"%s\" target=\"_blank\">wordpress.org</a> danken."
675
 
676
- #: ../admin/includes/class-overview-widgets.php:149
677
  msgid ""
678
  "Need help to set up and optimize your ads? Need custom coding on your site? "
679
  "Ask me for a quote."
@@ -682,62 +686,63 @@ msgstr ""
682
  "Benötigen Sie einen erfahrenen, deutschsprachigen WordPress-Entwickler? "
683
  "Kontaktieren Sie mich bzgl. eines Angebotes."
684
 
685
- #: ../admin/includes/class-overview-widgets.php:150
686
  #, php-format
687
  msgid "Help with ads on %s"
688
  msgstr "Unterstützung von %s"
689
 
690
- #: ../admin/includes/class-overview-widgets.php:151
691
  msgid "Get an offer"
692
  msgstr "Angebot erfragen"
693
 
694
- #: ../admin/includes/class-overview-widgets.php:159
695
  msgid "Track the impressions of and clicks on your ads."
696
  msgstr "Einblendungen und Klicks von Anzeigen erfassen und auswerten."
697
 
698
- #: ../admin/includes/class-overview-widgets.php:160
699
  msgid "2 methods to count impressions"
700
  msgstr "2 Zählmethoden"
701
 
702
- #: ../admin/includes/class-overview-widgets.php:161
703
  msgid "beautiful stats for all or single ads"
704
  msgstr "Wunderschöne Statistiken"
705
 
706
- #: ../admin/includes/class-overview-widgets.php:162
707
  msgid "get stats for predefined and custom persiods"
708
  msgstr "Statistiken für vorgewählte oder eigene Zeiträume"
709
 
710
- #: ../admin/includes/class-overview-widgets.php:163
711
  msgid "group stats by day, week or month"
712
  msgstr "Statistik nach Tag, Woche oder Monat"
713
 
714
- #: ../admin/includes/class-overview-widgets.php:165
715
  msgid "Get the Tracking add-on"
716
  msgstr "Tracking-Erweiterung holen"
717
 
718
- #: ../admin/includes/class-overview-widgets.php:173
719
  msgid "Display ads based on the size of your visitor’s browser or device."
720
  msgstr ""
721
  "Anzeigen anhand der Browserbreite der Besucher ausliefern. DIE Lösung für "
722
  "mobile Layouts."
723
 
724
- #: ../admin/includes/class-overview-widgets.php:174
725
  msgid "set a range (from … to …) pixels for the browser size"
726
  msgstr "von … bis … Browserbreiten für Anzeigen angeben"
727
 
728
- #: ../admin/includes/class-overview-widgets.php:175
729
  msgid "set custom sizes for AdSense responsive ads"
730
  msgstr "Größen von AdSense Responsive Ads feinsteuern"
731
 
732
- #: ../admin/includes/class-overview-widgets.php:176
733
  msgid "list all ads by their responsive settings"
734
  msgstr "aller responsiven Anzeigen auf einem Blick listen\n"
735
 
736
- #: ../admin/includes/class-overview-widgets.php:178
737
  msgid "Get the Responsive add-on"
738
  msgstr "Responsive-Erweiterung holen\n"
739
 
740
- #: ../admin/includes/class-overview-widgets.php:186
 
741
  msgid ""
742
  "Fix ads to the browser while users are scrolling and create best performing "
743
  "anchor ads."
@@ -745,38 +750,49 @@ msgstr ""
745
  "Erstellen Sie stark performande Anzeigen durch mitscrollende Anzeigen am "
746
  "Browserfenster."
747
 
748
- #: ../admin/includes/class-overview-widgets.php:187
749
  msgid "position ads that don’t scroll with the screen"
750
  msgstr "Anzeigen erstellen, die beim Scrollen nicht verschwinden"
751
 
752
- #: ../admin/includes/class-overview-widgets.php:188
753
  msgid "build anchor ads not only on mobile devices"
754
  msgstr "Anchor-Anzeigen auch für Desktop-Geräte"
755
 
756
- #: ../admin/includes/class-overview-widgets.php:190
 
757
  msgid "Get the Sticky add-on"
758
  msgstr "Sticky-Erweiterung holen"
759
 
760
- #: ../admin/includes/class-overview-widgets.php:198
 
761
  msgid "Display content and ads in layers and popups on custom events."
762
  msgstr "Anzeigen und Inhalte in Layern und PopUps einblenden."
763
 
764
- #: ../admin/includes/class-overview-widgets.php:199
765
  msgid "display a popup after a user interaction like scrolling"
766
  msgstr "verschiedene Auslöser, z.B. nach Scrollen oder auf 2. Seitenhälfte"
767
 
768
- #: ../admin/includes/class-overview-widgets.php:200
769
  msgid "optional backgroup overlay"
770
  msgstr "optionale Hintergrundeinfärbung"
771
 
772
- #: ../admin/includes/class-overview-widgets.php:201
773
  msgid "allow users to close the popup"
774
  msgstr "Nutzern das Schließen des PopUps erlauben"
775
 
776
- #: ../admin/includes/class-overview-widgets.php:203
 
777
  msgid "Get the PopUp and Layer add-on"
778
  msgstr "PopUp und Layer Erweiterung holen\n"
779
 
 
 
 
 
 
 
 
 
780
  #: ../admin/includes/notices.php:14
781
  msgid ""
782
  "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
@@ -900,12 +916,12 @@ msgstr "alle"
900
  msgid "Number of ads to display in the block"
901
  msgstr "Anzahl der Anzeigen die gleichzeitig im Block ausgegeben werden."
902
 
903
- #: ../admin/views/ad-group-list-form-row.php:27 ../public/class-advanced-ads.php:
904
  #: 540
905
  msgid "Ad"
906
  msgstr "Anzeige"
907
 
908
- #: ../admin/views/ad-group-list-form-row.php:28
909
  msgid "weight"
910
  msgstr "Gewicht"
911
 
@@ -918,12 +934,12 @@ msgid "Details"
918
  msgstr "Details"
919
 
920
  #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
921
- #: admin/views/ad-info.php:6 ../admin/views/placements.php:22
922
  msgid "shortcode"
923
  msgstr "Shortcode"
924
 
925
  #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
926
- #: admin/views/ad-info.php:9 ../admin/views/placements.php:25
927
  msgid "template"
928
  msgstr "Template"
929
 
@@ -996,41 +1012,114 @@ msgstr "Zum Anzeigen einer Anzeigen-Gruppe mit der ID 6 in Template-Dateien"
996
  msgid "Update Groups"
997
  msgstr "Gruppen aktualisieren\n"
998
 
999
- #: ../admin/views/ad-info.php:1
1000
- #, php-format
1001
- msgid "Ad Id: %s"
1002
- msgstr "Anzeigen-ID: %s"
1003
 
1004
- #: ../admin/views/ad-info.php:2
1005
- msgid "How to use this Ad?"
1006
- msgstr "Wie kann ich diese Anzeige verwenden?"
1007
 
1008
- #: ../admin/views/ad-info.php:5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1009
  #, php-format
1010
  msgid ""
1011
- "How to display the ad directly? Find more help and examples in the <a "
1012
- "href=\"%s\" target=\"_blank\">manual</a>"
1013
  msgstr ""
1014
- "Anzeige veröffentlichen? Hilfe und Beispiele finden Sie in der <a href=\"%s\" "
1015
- "target=\"_blank\">Anleitung</a>"
1016
 
1017
- #: ../admin/views/ad-info.php:7
1018
- msgid "To display an ad in content fields"
1019
- msgstr "Anzeige im Text-Editor einbinden"
 
1020
 
1021
- #: ../admin/views/ad-info.php:10
1022
- msgid "To display an ad in template files"
1023
- msgstr "Anzeige in Template-Dateien nutzen"
 
 
 
 
 
 
 
1024
 
1025
- #: ../admin/views/ad-info.php:15
1026
  msgid "click to change"
1027
  msgstr "zum Ändern klicken"
1028
 
1029
- #: ../admin/views/ad-info.php:19
1030
  msgid "Add a description"
1031
  msgstr "Beschreibung angeben"
1032
 
1033
- #: ../admin/views/ad-info.php:22
1034
  msgid "Internal description or your own notes about this ad."
1035
  msgstr "Eigene Beschreibung und Notizen zu dieser Anzeige."
1036
 
@@ -1137,29 +1226,38 @@ msgstr ""
1137
  "Anzeigebedingungen, die sich auf den Benutzer beziehen. Auf gecachten "
1138
  "Webseiten bitte mit Vorsicht anwenden."
1139
 
1140
- #: ../admin/views/ad-visitor-metabox.php:29
 
 
 
 
 
 
 
 
 
1141
  msgid "New condition"
1142
  msgstr "Neue Bedingung"
1143
 
1144
- #: ../admin/views/ad-visitor-metabox.php:32
1145
  msgctxt "visitor condition connector"
1146
  msgid "and"
1147
  msgstr "und"
1148
 
1149
- #: ../admin/views/ad-visitor-metabox.php:33
1150
  msgctxt "visitor condition connector"
1151
  msgid "or"
1152
  msgstr "oder"
1153
 
1154
- #: ../admin/views/ad-visitor-metabox.php:36
1155
  msgid "-- choose a condition --"
1156
  msgstr "-- Bedingung wählen --"
1157
 
1158
- #: ../admin/views/ad-visitor-metabox.php:41
1159
  msgid "add"
1160
  msgstr "hinzufügen"
1161
 
1162
- #: ../admin/views/ad-visitor-metabox.php:45
1163
  #, php-format
1164
  msgid ""
1165
  "Define the exact browser width for which an ad should be visible using the "
@@ -1169,7 +1267,7 @@ msgstr ""
1169
  "geben Sie die genaue Browserbreite an, für die diese Anzeige sichtbar sein "
1170
  "sollen.\n"
1171
 
1172
- #: ../admin/views/ad-visitor-metabox.php:102
1173
  msgid ""
1174
  "The visitor conditions below are deprecated. Please use the new version of "
1175
  "visitor conditions to replace it."
@@ -1177,15 +1275,15 @@ msgstr ""
1177
  "Die unten aufgeführten Besucherbedingungen sind veraltet. Bitte nutzen Sie "
1178
  "die neueren Versionen oben."
1179
 
1180
- #: ../admin/views/ad-visitor-metabox.php:108
1181
  msgid "Display on all devices"
1182
  msgstr "Auf allen Geräten anzeigen"
1183
 
1184
- #: ../admin/views/ad-visitor-metabox.php:112
1185
  msgid "only on mobile devices"
1186
  msgstr "Nur auf mobilen Geräten"
1187
 
1188
- #: ../admin/views/ad-visitor-metabox.php:116
1189
  msgid "not on mobile devices"
1190
  msgstr "Nicht auf mobilen Endgeräten"
1191
 
@@ -1539,12 +1637,12 @@ msgid "equal"
1539
  msgstr "ist gleich"
1540
 
1541
  #: ../classes/visitor-conditions.php:117
1542
- msgid "equal and higher"
1543
- msgstr "ist gleich oder höher"
1544
 
1545
  #: ../classes/visitor-conditions.php:118
1546
- msgid "equal and lower"
1547
- msgstr "ist gleich oder niedriger"
1548
 
1549
  #: ../classes/widget.php:19
1550
  msgid "Display Ads and Ad Groups."
3
  "Project-Id-Version: Advanved Ads\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
  "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
+ "PO-Revision-Date: Fri May 29 2015 09:39:06 GMT+0200 (CEST)\n"
7
  "Last-Translator: admin <post@webzunft.de>\n"
8
  "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
  "Language: German\n"
26
  "X-Textdomain-Support: yes\n"
27
  "X-Loco-Target-Locale: de_DE"
28
 
29
+ #: ../admin/class-advanced-ads-admin.php:202
30
  msgid "Overview"
31
  msgstr "Übersicht"
32
 
33
  #. translators: plugin header field 'Name'
34
+ #: ../admin/class-advanced-ads-admin.php:202 ../classes/widget.php:21
35
  msgid "Advanced Ads"
36
  msgstr "Advanced Ads"
37
 
38
+ #: ../admin/class-advanced-ads-admin.php:206 ../admin/class-advanced-ads-admin.
39
+ #: php:206 ../admin/views/ad-group-list-form-row.php:25 ../admin/views/ad-group-
40
  #: list-header.php:5 ../admin/views/placements.php:64 ../classes/widget.php:66 ..
41
  #: public/class-advanced-ads.php:539
42
  msgid "Ads"
43
  msgstr "Anzeigen"
44
 
45
+ #: ../admin/class-advanced-ads-admin.php:210 ../admin/views/placements.php:57 ..
46
  #: classes/widget.php:59
47
  msgid "Ad Groups"
48
  msgstr "Anzeigen-Gruppen"
49
 
50
+ #: ../admin/class-advanced-ads-admin.php:210 ../public/class-advanced-ads.php:513
51
  msgid "Groups"
52
  msgstr "Gruppen"
53
 
54
+ #: ../admin/class-advanced-ads-admin.php:215 ../admin/views/debug.php:14
55
  msgid "Ad Placements"
56
  msgstr "Anzeigen-Platzierungen"
57
 
58
+ #: ../admin/class-advanced-ads-admin.php:215 ../admin/views/placements.php:18
59
  msgid "Placements"
60
  msgstr "Platzierungen"
61
 
62
+ #: ../admin/class-advanced-ads-admin.php:219
63
  msgid "Advanced Ads Settings"
64
  msgstr "Advanced-Ads-Einstellungen"
65
 
66
+ #: ../admin/class-advanced-ads-admin.php:219 ../admin/class-advanced-ads-admin.
67
+ #: php:389 ../admin/views/debug.php:11
68
  msgid "Settings"
69
  msgstr "Einstellungen"
70
 
71
+ #: ../admin/class-advanced-ads-admin.php:222
72
  msgid "Advanced Ads Debugging"
73
  msgstr "Advanced-Ads-Fehleranalyse (Debugging)"
74
 
75
+ #: ../admin/class-advanced-ads-admin.php:222
76
  msgid "Debug"
77
  msgstr "Debug"
78
 
79
+ #: ../admin/class-advanced-ads-admin.php:303 ../admin/class-advanced-ads-admin.
80
+ #: php:330
81
  msgid "Sorry, you are not allowed to access this feature."
82
  msgstr "Sie haben leider keinen Zugriff auf diese Funktion"
83
 
84
+ #: ../admin/class-advanced-ads-admin.php:316
85
  msgid ""
86
  "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
87
  "deleted?"
89
  "Sie haben versucht, ein Element, das nicht existiert, zu bearbeiten. "
90
  "Vielleicht wurde es gelöscht?"
91
 
92
+ #: ../admin/class-advanced-ads-admin.php:431
93
  msgid "Ad Type"
94
  msgstr "Anzeigen-Typ"
95
 
96
+ #: ../admin/class-advanced-ads-admin.php:434
97
  msgid "Ad Parameters"
98
  msgstr "Anzeigen-Parameter"
99
 
100
+ #: ../admin/class-advanced-ads-admin.php:437
101
  msgid "Layout / Output"
102
  msgstr "Layout / Ausgabe"
103
 
104
+ #: ../admin/class-advanced-ads-admin.php:440
105
  msgid "Display Conditions"
106
  msgstr "Anzeige-Bedingungen"
107
 
108
+ #: ../admin/class-advanced-ads-admin.php:443
109
  msgid "Visitor Conditions"
110
  msgstr "Besucher-Bedingungen"
111
 
112
+ #: ../admin/class-advanced-ads-admin.php:600 ../admin/class-advanced-ads-admin.
113
+ #: php:601
114
  msgid "Ad updated."
115
  msgstr "Anzeige aktualisiert."
116
 
117
  #. translators: %s: date and time of the revision
118
+ #: ../admin/class-advanced-ads-admin.php:603
119
  #, php-format
120
  msgid "Ad restored to revision from %s"
121
  msgstr "Anzeige aus Revision %s wiederhergestellt"
122
 
123
+ #: ../admin/class-advanced-ads-admin.php:604
124
  msgid "Ad published."
125
  msgstr "Anzeige veröffentlicht."
126
 
127
+ #: ../admin/class-advanced-ads-admin.php:605
128
  msgid "Ad saved."
129
  msgstr "Anzeige gespeichert."
130
 
131
+ #: ../admin/class-advanced-ads-admin.php:606
132
  msgid "Ad submitted."
133
  msgstr "Anzeige gesendet."
134
 
135
+ #: ../admin/class-advanced-ads-admin.php:608
136
  #, php-format
137
  msgid "Ad scheduled for: <strong>%1$s</strong>."
138
  msgstr "Anzeige geplant für <strong>%1$s</strong>."
139
 
140
  #. translators: Publish box date format, see http://php.net/date
141
+ #: ../admin/class-advanced-ads-admin.php:610
142
  msgid "M j, Y @ G:i"
143
  msgstr "j M Y @ G:i"
144
 
145
+ #: ../admin/class-advanced-ads-admin.php:612
146
  msgid "Ad draft updated."
147
  msgstr "Anzeigenentwurf gespeichert."
148
 
149
+ #: ../admin/class-advanced-ads-admin.php:631
150
  #, php-format
151
  msgid "%s ad updated."
152
  msgid_plural "%s ads updated."
153
  msgstr[0] "%s Anzeige aktualisiert."
154
  msgstr[1] "%s Anzeigen aktualisiert."
155
 
156
+ #: ../admin/class-advanced-ads-admin.php:632
157
  #, php-format
158
  msgid "%s ad not updated, somebody is editing it."
159
  msgid_plural "%s ads not updated, somebody is editing them."
160
  msgstr[0] "%s Anzeige nicht aktualisiert, jemand bearbeitet sie."
161
  msgstr[1] "%s Anzeigen nicht aktualisiert, jemand bearbeitet sie."
162
 
163
+ #: ../admin/class-advanced-ads-admin.php:633
164
  #, php-format
165
  msgid "%s ad permanently deleted."
166
  msgid_plural "%s ads permanently deleted."
167
  msgstr[0] "%s Anzeige endgültig gelöscht."
168
  msgstr[1] "%s Anzeigen endgültig gelöscht."
169
 
170
+ #: ../admin/class-advanced-ads-admin.php:634
171
  #, php-format
172
  msgid "%s ad moved to the Trash."
173
  msgid_plural "%s ads moved to the Trash."
174
  msgstr[0] "%s Anzeige in den Papierkorb verschoben."
175
  msgstr[1] "%s Anzeigen in den Papierkorb verschoben."
176
 
177
+ #: ../admin/class-advanced-ads-admin.php:635
178
  #, php-format
179
  msgid "%s ad restored from the Trash."
180
  msgid_plural "%s ads restored from the Trash."
181
  msgstr[0] "%s Anzeige aus dem Papierkorb wiederhergestellt."
182
  msgstr[1] "%s Anzeige aus dem Papierkorb wiederhergestellt."
183
 
184
+ #: ../admin/class-advanced-ads-admin.php:672 ../admin/views/settings.php:12
185
  msgid "General"
186
  msgstr "Allgemein"
187
 
188
+ #: ../admin/class-advanced-ads-admin.php:680 ../admin/views/settings.php:18
189
  msgid "Licenses"
190
  msgstr "Lizenzen"
191
 
192
+ #: ../admin/class-advanced-ads-admin.php:688
193
  msgid "Disable ads"
194
  msgstr "Anzeigen auf dieser Seite deaktivieren."
195
 
196
+ #: ../admin/class-advanced-ads-admin.php:696
197
  msgid "Hide ads for logged in users"
198
  msgstr "Verstecke Anzeigen vor eingeloggten Benutzern"
199
 
200
+ #: ../admin/class-advanced-ads-admin.php:704
201
  msgid "Use advanced JavaScript"
202
  msgstr "Advanced-JavaScript benutzen"
203
 
204
+ #: ../admin/class-advanced-ads-admin.php:712
205
  msgid "Priority of content injection filter"
206
  msgstr "Priorität der Anzeigen-Injektion"
207
 
208
+ #: ../admin/class-advanced-ads-admin.php:720
209
  msgid "Hide ads from bots"
210
  msgstr "Anzeigen vor Bots verbergen"
211
 
212
+ #: ../admin/class-advanced-ads-admin.php:728
213
  msgid "Disable notices"
214
  msgstr "Mitteilungen deaktivieren"
215
 
216
+ #: ../admin/class-advanced-ads-admin.php:784
217
  msgid "(display to all)"
218
  msgstr "(für alle sichtbar)"
219
 
220
+ #: ../admin/class-advanced-ads-admin.php:785
221
  msgid "Subscriber"
222
  msgstr "Abonnent"
223
 
224
+ #: ../admin/class-advanced-ads-admin.php:786
225
  msgid "Contributor"
226
  msgstr "Mitarbeiter"
227
 
228
+ #: ../admin/class-advanced-ads-admin.php:787
229
  msgid "Author"
230
  msgstr "Autor"
231
 
232
+ #: ../admin/class-advanced-ads-admin.php:788
233
  msgid "Editor"
234
  msgstr "Redakteur"
235
 
236
+ #: ../admin/class-advanced-ads-admin.php:789
237
  msgid "Admin"
238
  msgstr "Admin"
239
 
240
+ #: ../admin/class-advanced-ads-admin.php:797
241
  msgid "Choose the lowest role a user must have in order to not see any ads."
242
  msgstr ""
243
  "Wählen Sie die niedrigste Rolle die ein Benutzer haben muss um keine "
244
  "Anzeigen zu sehen."
245
 
246
+ #: ../admin/class-advanced-ads-admin.php:810
247
  #, php-format
248
  msgid ""
249
  "Only enable this if you can and want to use the advanced JavaScript "
252
  "Aktivieren Sie dies nur, wenn Sie die erweiterten und <a href=\"%s\">hier</a> "
253
  "beschriebenen Advanced-JavaScript-Funktionen verwenden können und wollen."
254
 
255
+ #: ../admin/class-advanced-ads-admin.php:823
256
  msgid ""
257
  "Play with this value in order to change the priority of the injected ads "
258
  "compared to other auto injected elements in the post content."
260
  "Ändern Sie diesen Wert um die Position automatisch eingefügter Anzeigen im "
261
  "Content gegenüber anderer Elementen zu beeinflussen."
262
 
263
+ #: ../admin/class-advanced-ads-admin.php:836
264
  #, php-format
265
  msgid ""
266
  "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
271
  "werden mit dem <a href=\"%s\" target=\"_blank\">Tracking Add-On</a> dann auch "
272
  "keine Impressionen mehr gezählt."
273
 
274
+ #: ../admin/class-advanced-ads-admin.php:837
275
  msgid ""
276
  "Disabling this option only makes sense if your ads contain content you want "
277
  "to display to bots (like search engines) or your site is cached and bots "
280
  "Deaktivieren Sie diese Option, wenn Bots (z.B. Suchmaschinen) die "
281
  "Werbeinhalte sehen sollen oder Ihre Seite einen Cache nutzt."
282
 
283
+ #: ../admin/class-advanced-ads-admin.php:850
284
  msgid ""
285
  "Disable all internal notices like tips, tutorials and email newsletters but "
286
  "not critical update notices. Disabling notices is recommended if you run "
290
  "Kritische Nachrichten sind hiervon ausgenommen. Nutzen Sie diese Einstellung,"
291
  " wenn Sie Advanced Ads auf mehreren Blog installiert haben."
292
 
293
+ #: ../admin/class-advanced-ads-admin.php:879
294
  msgid "Ad Details"
295
  msgstr "Anzeigeneinstellungen"
296
 
297
+ #: ../admin/class-advanced-ads-admin.php:953
298
  msgid "Ad Settings"
299
  msgstr "Anzeigen-Einstellungen"
300
 
301
+ #: ../admin/class-advanced-ads-admin.php:1028 ../admin/views/overview.php:23
302
  msgid "Ads Dashboard"
303
  msgstr "Anzeigen-Dashboard"
304
 
305
+ #: ../admin/class-advanced-ads-admin.php:1040
306
  msgid "From the ad optimization universe"
307
  msgstr "Neues aus dem Anzeigen-Universum"
308
 
309
+ #: ../admin/class-advanced-ads-admin.php:1049
310
  msgid "Advanced Ads Tutorials"
311
  msgstr "Advanced Ads Tutorials"
312
 
313
+ #: ../admin/class-advanced-ads-admin.php:1060
314
  #, php-format
315
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
316
  msgstr "%d Anzeigen – <a href=\"%s\">verwalten</a> - <a href=\"%s\">neu</a>"
317
 
318
+ #: ../admin/class-advanced-ads-admin.php:1071
319
  msgid "plugin manual and homepage"
320
  msgstr "Plugin-Anleitung und Homepage"
321
 
322
+ #: ../admin/class-advanced-ads-admin.php:1078
323
  msgid "Get the tutorial via email"
324
  msgstr "Tutorial per E-Mail (engl.)\n"
325
 
326
+ #: ../admin/class-advanced-ads-admin.php:1085
327
  msgid "Get AdSense tips via email"
328
  msgstr "AdSense Tips per E-Mail (engl.)"
329
 
353
  msgstr "bis zu %d Anzeigen sichtbar"
354
 
355
  #: ../admin/includes/class-ad-groups-list.php:187 ../admin/views/ad-group-list-
356
+ #: form-row.php:34
357
  msgid "No ads assigned"
358
  msgstr "Keine Anzeigen zugeordnet"
359
 
589
  msgid "PopUps and Layers"
590
  msgstr "PopUps und Layer"
591
 
592
+ #: ../admin/includes/class-overview-widgets.php:61
593
+ msgid "Ad Slider"
594
+ msgstr ""
595
+
596
+ #: ../admin/includes/class-overview-widgets.php:79 ../admin/includes/notices.php:20
597
  msgid ""
598
  "Learn more about how and <strong>how much you can earn with AdSense</strong> "
599
  "and Advanced Ads from my dedicated newsletter."
601
  "Erfahren Sie im Newsletter mehr darüber, wie und <strong>wie viel Sie mit "
602
  "AdSense verdienen</strong> können (engl.)."
603
 
604
+ #: ../admin/includes/class-overview-widgets.php:80 ../admin/includes/notices.php:
605
  #: 21 ../admin/views/notices/inline.php:3 ../admin/views/notices/subscribe.php:3
606
  msgid "Subscribe me now"
607
  msgstr "Jetzt abonnieren"
608
 
609
+ #: ../admin/includes/class-overview-widgets.php:87
610
  msgid "Get the first steps and more tutorials to your inbox."
611
  msgstr ""
612
  "Erhalten Sie die Ersten Schritte und weitere Tutorials direkt in Ihr "
613
  "Postfach."
614
 
615
+ #: ../admin/includes/class-overview-widgets.php:88
616
  msgid "Send it now"
617
  msgstr "Jetzt senden"
618
 
619
+ #: ../admin/includes/class-overview-widgets.php:111
620
  msgid "Create your first ad"
621
  msgstr "Erstellen Sie Ihre erste Anzeige"
622
 
623
+ #: ../admin/includes/class-overview-widgets.php:114
624
  msgid ""
625
  "Ad Groups contain ads and are currently used to rotate multiple ads on a "
626
  "single spot."
628
  "Anzeigengruppen enthalten Anzeigen und werden verwendet, um mehrere Anzeigen "
629
  "an einer Stelle zu rotieren."
630
 
631
+ #: ../admin/includes/class-overview-widgets.php:116
632
  msgid "Create your first group"
633
  msgstr "Erstellen Sie Ihre erste Gruppe"
634
 
635
+ #: ../admin/includes/class-overview-widgets.php:119
636
  msgid "Ad Placements are the best way to manage where to display ads and groups."
637
  msgstr ""
638
  "Anzeigen-Platzierungen sind am besten geeignet um zu bestimmen, wo Anzeigen "
639
  "und Gruppen veröffentlicht werden."
640
 
641
+ #: ../admin/includes/class-overview-widgets.php:121
642
  msgid "Create your first placement"
643
  msgstr "Erstellen Sie Ihre erste Platzierung"
644
 
645
+ #: ../admin/includes/class-overview-widgets.php:126
646
  msgid "Next steps"
647
  msgstr "Nächste Schritte"
648
 
649
+ #: ../admin/includes/class-overview-widgets.php:138
650
  #, php-format
651
  msgid "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
652
  msgstr "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
653
 
654
+ #: ../admin/includes/class-overview-widgets.php:139
655
  #, php-format
656
  msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
657
  msgstr "<a href=\"%s\" target=\"_blank\">Anleitung (engl.)</a>"
658
 
659
+ #: ../admin/includes/class-overview-widgets.php:140
660
  #, php-format
661
  msgid "Ask other users in the <a href=\"%s\" target=\"_blank\">wordpress.org forum</a>"
662
  msgstr ""
663
  "Andere Nutzer auf <a href=\"%s\" target=\"_blank\">wordpress.org</a> um Hilfe "
664
  "bitten."
665
 
666
+ #: ../admin/includes/class-overview-widgets.php:141
667
  #, php-format
668
  msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
669
  msgstr "Über <a href=\"%s\" target=\"_blank\">neue Funktionen</a> abstimmen."
670
 
671
+ #: ../admin/includes/class-overview-widgets.php:142
672
  #, php-format
673
  msgid ""
674
  "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
677
  "Dem Entwickler mit einem &#9733;&#9733;&#9733;&#9733;&#9733; Review auf <a "
678
  "href=\"%s\" target=\"_blank\">wordpress.org</a> danken."
679
 
680
+ #: ../admin/includes/class-overview-widgets.php:151
681
  msgid ""
682
  "Need help to set up and optimize your ads? Need custom coding on your site? "
683
  "Ask me for a quote."
686
  "Benötigen Sie einen erfahrenen, deutschsprachigen WordPress-Entwickler? "
687
  "Kontaktieren Sie mich bzgl. eines Angebotes."
688
 
689
+ #: ../admin/includes/class-overview-widgets.php:152
690
  #, php-format
691
  msgid "Help with ads on %s"
692
  msgstr "Unterstützung von %s"
693
 
694
+ #: ../admin/includes/class-overview-widgets.php:153
695
  msgid "Get an offer"
696
  msgstr "Angebot erfragen"
697
 
698
+ #: ../admin/includes/class-overview-widgets.php:161
699
  msgid "Track the impressions of and clicks on your ads."
700
  msgstr "Einblendungen und Klicks von Anzeigen erfassen und auswerten."
701
 
702
+ #: ../admin/includes/class-overview-widgets.php:162
703
  msgid "2 methods to count impressions"
704
  msgstr "2 Zählmethoden"
705
 
706
+ #: ../admin/includes/class-overview-widgets.php:163
707
  msgid "beautiful stats for all or single ads"
708
  msgstr "Wunderschöne Statistiken"
709
 
710
+ #: ../admin/includes/class-overview-widgets.php:164
711
  msgid "get stats for predefined and custom persiods"
712
  msgstr "Statistiken für vorgewählte oder eigene Zeiträume"
713
 
714
+ #: ../admin/includes/class-overview-widgets.php:165
715
  msgid "group stats by day, week or month"
716
  msgstr "Statistik nach Tag, Woche oder Monat"
717
 
718
+ #: ../admin/includes/class-overview-widgets.php:167
719
  msgid "Get the Tracking add-on"
720
  msgstr "Tracking-Erweiterung holen"
721
 
722
+ #: ../admin/includes/class-overview-widgets.php:175
723
  msgid "Display ads based on the size of your visitor’s browser or device."
724
  msgstr ""
725
  "Anzeigen anhand der Browserbreite der Besucher ausliefern. DIE Lösung für "
726
  "mobile Layouts."
727
 
728
+ #: ../admin/includes/class-overview-widgets.php:176
729
  msgid "set a range (from … to …) pixels for the browser size"
730
  msgstr "von … bis … Browserbreiten für Anzeigen angeben"
731
 
732
+ #: ../admin/includes/class-overview-widgets.php:177
733
  msgid "set custom sizes for AdSense responsive ads"
734
  msgstr "Größen von AdSense Responsive Ads feinsteuern"
735
 
736
+ #: ../admin/includes/class-overview-widgets.php:178
737
  msgid "list all ads by their responsive settings"
738
  msgstr "aller responsiven Anzeigen auf einem Blick listen\n"
739
 
740
+ #: ../admin/includes/class-overview-widgets.php:180
741
  msgid "Get the Responsive add-on"
742
  msgstr "Responsive-Erweiterung holen\n"
743
 
744
+ #: ../admin/includes/class-overview-widgets.php:188 ../admin/views/ad-info-top.
745
+ #: php:30
746
  msgid ""
747
  "Fix ads to the browser while users are scrolling and create best performing "
748
  "anchor ads."
750
  "Erstellen Sie stark performande Anzeigen durch mitscrollende Anzeigen am "
751
  "Browserfenster."
752
 
753
+ #: ../admin/includes/class-overview-widgets.php:189
754
  msgid "position ads that don’t scroll with the screen"
755
  msgstr "Anzeigen erstellen, die beim Scrollen nicht verschwinden"
756
 
757
+ #: ../admin/includes/class-overview-widgets.php:190
758
  msgid "build anchor ads not only on mobile devices"
759
  msgstr "Anchor-Anzeigen auch für Desktop-Geräte"
760
 
761
+ #: ../admin/includes/class-overview-widgets.php:192 ../admin/views/ad-info-top.
762
+ #: php:32
763
  msgid "Get the Sticky add-on"
764
  msgstr "Sticky-Erweiterung holen"
765
 
766
+ #: ../admin/includes/class-overview-widgets.php:200 ../admin/views/ad-info-top.
767
+ #: php:37
768
  msgid "Display content and ads in layers and popups on custom events."
769
  msgstr "Anzeigen und Inhalte in Layern und PopUps einblenden."
770
 
771
+ #: ../admin/includes/class-overview-widgets.php:201
772
  msgid "display a popup after a user interaction like scrolling"
773
  msgstr "verschiedene Auslöser, z.B. nach Scrollen oder auf 2. Seitenhälfte"
774
 
775
+ #: ../admin/includes/class-overview-widgets.php:202
776
  msgid "optional backgroup overlay"
777
  msgstr "optionale Hintergrundeinfärbung"
778
 
779
+ #: ../admin/includes/class-overview-widgets.php:203
780
  msgid "allow users to close the popup"
781
  msgstr "Nutzern das Schließen des PopUps erlauben"
782
 
783
+ #: ../admin/includes/class-overview-widgets.php:205 ../admin/views/ad-info-top.
784
+ #: php:39
785
  msgid "Get the PopUp and Layer add-on"
786
  msgstr "PopUp und Layer Erweiterung holen\n"
787
 
788
+ #: ../admin/includes/class-overview-widgets.php:213
789
+ msgid "Create a beautiful and simple slider from your ads."
790
+ msgstr "Erstelle einen Slider aus deinen Anzeigen."
791
+
792
+ #: ../admin/includes/class-overview-widgets.php:215
793
+ msgid "Get the Slider add-on"
794
+ msgstr "Slider-Erweiterung holen"
795
+
796
  #: ../admin/includes/notices.php:14
797
  msgid ""
798
  "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
916
  msgid "Number of ads to display in the block"
917
  msgstr "Anzahl der Anzeigen die gleichzeitig im Block ausgegeben werden."
918
 
919
+ #: ../admin/views/ad-group-list-form-row.php:28 ../public/class-advanced-ads.php:
920
  #: 540
921
  msgid "Ad"
922
  msgstr "Anzeige"
923
 
924
+ #: ../admin/views/ad-group-list-form-row.php:29
925
  msgid "weight"
926
  msgstr "Gewicht"
927
 
934
  msgstr "Details"
935
 
936
  #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
937
+ #: admin/views/ad-info.php:3 ../admin/views/placements.php:22
938
  msgid "shortcode"
939
  msgstr "Shortcode"
940
 
941
  #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
942
+ #: admin/views/placements.php:25
943
  msgid "template"
944
  msgstr "Template"
945
 
1012
  msgid "Update Groups"
1013
  msgstr "Gruppen aktualisieren\n"
1014
 
1015
+ #: ../admin/views/ad-info-top.php:4
1016
+ msgid "Cool, you just published an ad. What now?"
1017
+ msgstr "Super, Sie haben gerade eine Anzeige veröffentlicht. Und jetzt?"
 
1018
 
1019
+ #: ../admin/views/ad-info-top.php:5
1020
+ msgid "Display the ad in "
1021
+ msgstr "Anzeige einbinden in "
1022
 
1023
+ #: ../admin/views/ad-info-top.php:7
1024
+ msgid "… every post or page"
1025
+ msgstr "… jeden Beitrag oder jede Seite"
1026
+
1027
+ #: ../admin/views/ad-info-top.php:9
1028
+ msgid "Use placements to inject the ad automatically into posts and pages."
1029
+ msgstr ""
1030
+ "Benutzen Sie Platzierungen um Anzeigen automatisch in Beiträge und Seiten "
1031
+ "einzubinden."
1032
+
1033
+ #: ../admin/views/ad-info-top.php:10
1034
+ msgid "Configure Placements"
1035
+ msgstr "Platzierungen nutzen"
1036
+
1037
+ #: ../admin/views/ad-info-top.php:12
1038
+ msgid "… Sidebar or Widget Area"
1039
+ msgstr "… Sidebar oder Widgets"
1040
+
1041
+ #: ../admin/views/ad-info-top.php:14
1042
+ msgid "Use the <em>Advanced Ads</em> Widget to display ads in your sidebars."
1043
+ msgstr ""
1044
+ "Nutzen Sie das <em>Advanced Ads</em> Widget um Anzeigen in Sidebars und "
1045
+ "Widget-Bereichen einzubinden."
1046
+
1047
+ #: ../admin/views/ad-info-top.php:15
1048
+ msgid "Configure a Widget"
1049
+ msgstr "Widget erstellen"
1050
+
1051
+ #: ../admin/views/ad-info-top.php:17
1052
+ msgid "… a few hand selected posts or pages"
1053
+ msgstr "… in ausgewählten Beiträgen oder Seiten\n"
1054
+
1055
+ #: ../admin/views/ad-info-top.php:19
1056
+ msgid ""
1057
+ "Use the shortcode below to manually place the ad in the content editor of "
1058
+ "posts and pages."
1059
+ msgstr ""
1060
+ "Benutzen Sie den Shortcode um Anzeigen manuell im Content-Editor von "
1061
+ "Beiträgen oder Seiten zu platzieren."
1062
+
1063
+ #: ../admin/views/ad-info-top.php:22
1064
+ msgid "… in a custom position in your theme"
1065
+ msgstr "… in einer festen Position im Theme."
1066
+
1067
+ #: ../admin/views/ad-info-top.php:24
1068
+ msgid ""
1069
+ "Use the function below to manually place the ad into your template files. "
1070
+ "This method is needed for more advanced placements like in the header of "
1071
+ "your theme."
1072
+ msgstr ""
1073
+ "Benutzen Sie die Funktion unten um die Anzeige manuell in eine Position in "
1074
+ "den Template-Dateien Ihres Themes einzubinden. Diese Methode eignet sich für "
1075
+ "den fortgeschrittenen Einsatz von Anzeigen, z.B. im Kopfbereich Ihres Themes."
1076
+
1077
+ #: ../admin/views/ad-info-top.php:27
1078
+ msgid "… in an anchor ad or pop-up"
1079
+ msgstr "… als Anchor-Anzeige oder Pop-Up"
1080
+
1081
+ #: ../admin/views/ad-info-top.php:34
1082
+ msgid "You find the settings for the Sticky Ads below."
1083
+ msgstr "Sie finden die Einstellungen für Sticky-Anzeigen unten."
1084
+
1085
+ #: ../admin/views/ad-info-top.php:41
1086
+ msgid "You find the settings for the Layer and PopUp effects below."
1087
+ msgstr "Sie finden die Einstellungen für Layer und Pop-Ups unten."
1088
+
1089
+ #: ../admin/views/ad-info-top.php:46
1090
  #, php-format
1091
  msgid ""
1092
+ "Learn more about your choices to display an ad in the <a href=\"%s\" "
1093
+ "target=\"_blank\">manual</a>"
1094
  msgstr ""
1095
+ "Erfahren Sie mehr über die Möglichkeiten zur Einbindung von Anzeigen in der "
1096
+ "<a href=\"%s\" target=\"_blank\">Anleitung (engl.)</a>."
1097
 
1098
+ #: ../admin/views/ad-info.php:2
1099
+ #, php-format
1100
+ msgid "Ad Id: %s"
1101
+ msgstr "Anzeigen-ID: %s"
1102
 
1103
+ #: ../admin/views/ad-info.php:5
1104
+ msgid "theme function"
1105
+ msgstr "Funktion"
1106
+
1107
+ #: ../admin/views/ad-info.php:7
1108
+ #, php-format
1109
+ msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
1110
+ msgstr ""
1111
+ "Sie finden weitere Anzeigemöglichkeiten in der <a href=\"%s\" "
1112
+ "target=\"_blank\">Anleitung</a>."
1113
 
1114
+ #: ../admin/views/ad-info.php:12
1115
  msgid "click to change"
1116
  msgstr "zum Ändern klicken"
1117
 
1118
+ #: ../admin/views/ad-info.php:16
1119
  msgid "Add a description"
1120
  msgstr "Beschreibung angeben"
1121
 
1122
+ #: ../admin/views/ad-info.php:19
1123
  msgid "Internal description or your own notes about this ad."
1124
  msgstr "Eigene Beschreibung und Notizen zu dieser Anzeige."
1125
 
1226
  "Anzeigebedingungen, die sich auf den Benutzer beziehen. Auf gecachten "
1227
  "Webseiten bitte mit Vorsicht anwenden."
1228
 
1229
+ #: ../admin/views/ad-visitor-metabox.php:28
1230
+ msgid ""
1231
+ "Visitor conditions limit the number of users who can see your ad. There is "
1232
+ "no need to set visitor conditions if you want all users to see the ad."
1233
+ msgstr ""
1234
+ "Besucherbedingungen begrenzen die Anzahl an Besuchern, die eine Anzeige "
1235
+ "sehen. Vermeiden Sie solche Bedingungen, wenn alle Nutzer die Anzeige sehen "
1236
+ "sollen."
1237
+
1238
+ #: ../admin/views/ad-visitor-metabox.php:32
1239
  msgid "New condition"
1240
  msgstr "Neue Bedingung"
1241
 
1242
+ #: ../admin/views/ad-visitor-metabox.php:35
1243
  msgctxt "visitor condition connector"
1244
  msgid "and"
1245
  msgstr "und"
1246
 
1247
+ #: ../admin/views/ad-visitor-metabox.php:36
1248
  msgctxt "visitor condition connector"
1249
  msgid "or"
1250
  msgstr "oder"
1251
 
1252
+ #: ../admin/views/ad-visitor-metabox.php:39
1253
  msgid "-- choose a condition --"
1254
  msgstr "-- Bedingung wählen --"
1255
 
1256
+ #: ../admin/views/ad-visitor-metabox.php:44
1257
  msgid "add"
1258
  msgstr "hinzufügen"
1259
 
1260
+ #: ../admin/views/ad-visitor-metabox.php:48
1261
  #, php-format
1262
  msgid ""
1263
  "Define the exact browser width for which an ad should be visible using the "
1267
  "geben Sie die genaue Browserbreite an, für die diese Anzeige sichtbar sein "
1268
  "sollen.\n"
1269
 
1270
+ #: ../admin/views/ad-visitor-metabox.php:105
1271
  msgid ""
1272
  "The visitor conditions below are deprecated. Please use the new version of "
1273
  "visitor conditions to replace it."
1275
  "Die unten aufgeführten Besucherbedingungen sind veraltet. Bitte nutzen Sie "
1276
  "die neueren Versionen oben."
1277
 
1278
+ #: ../admin/views/ad-visitor-metabox.php:111
1279
  msgid "Display on all devices"
1280
  msgstr "Auf allen Geräten anzeigen"
1281
 
1282
+ #: ../admin/views/ad-visitor-metabox.php:115
1283
  msgid "only on mobile devices"
1284
  msgstr "Nur auf mobilen Geräten"
1285
 
1286
+ #: ../admin/views/ad-visitor-metabox.php:119
1287
  msgid "not on mobile devices"
1288
  msgstr "Nicht auf mobilen Endgeräten"
1289
 
1637
  msgstr "ist gleich"
1638
 
1639
  #: ../classes/visitor-conditions.php:117
1640
+ msgid "equal or higher"
1641
+ msgstr "gleich oder höher"
1642
 
1643
  #: ../classes/visitor-conditions.php:118
1644
+ msgid "equal or lower"
1645
+ msgstr "gleich oder niedriger"
1646
 
1647
  #: ../classes/widget.php:19
1648
  msgid "Display Ads and Ad Groups."
languages/advanced-ads.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: Advanved Ads\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
7
  "POT-Creation-Date: 2015-01-27 16:47+0100\n"
8
- "POT-Revision-Date: Tue May 12 2015 08:53:50 GMT+0200 (CEST)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
11
  "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
@@ -24,232 +24,232 @@ msgstr ""
24
  "X-Poedit-Basepath: ../\n"
25
  "X-Poedit-SearchPath-0: ."
26
 
27
- #: ../admin/class-advanced-ads-admin.php:200
28
  msgid "Overview"
29
  msgstr ""
30
 
31
- #: ../admin/class-advanced-ads-admin.php:200 ../classes/widget.php:21
32
  msgid "Advanced Ads"
33
  msgstr ""
34
 
35
- #: ../admin/class-advanced-ads-admin.php:204 ../admin/class-advanced-ads-admin.
36
- #: php:204 ../admin/views/ad-group-list-form-row.php:24 ../admin/views/ad-group-
37
  #: list-header.php:5 ../admin/views/placements.php:64 ../classes/widget.php:66 ..
38
  #: /public/class-advanced-ads.php:539
39
  msgid "Ads"
40
  msgstr ""
41
 
42
- #: ../admin/class-advanced-ads-admin.php:208 ../admin/views/placements.php:57 ..
43
  #: /classes/widget.php:59
44
  msgid "Ad Groups"
45
  msgstr ""
46
 
47
- #: ../admin/class-advanced-ads-admin.php:208 ../public/class-advanced-ads.php:513
48
  msgid "Groups"
49
  msgstr ""
50
 
51
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/debug.php:14
52
  msgid "Ad Placements"
53
  msgstr ""
54
 
55
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/placements.php:18
56
  msgid "Placements"
57
  msgstr ""
58
 
59
- #: ../admin/class-advanced-ads-admin.php:217
60
  msgid "Advanced Ads Settings"
61
  msgstr ""
62
 
63
- #: ../admin/class-advanced-ads-admin.php:217 ../admin/class-advanced-ads-admin.
64
- #: php:387 ../admin/views/debug.php:11
65
  msgid "Settings"
66
  msgstr ""
67
 
68
- #: ../admin/class-advanced-ads-admin.php:220
69
  msgid "Advanced Ads Debugging"
70
  msgstr ""
71
 
72
- #: ../admin/class-advanced-ads-admin.php:220
73
  msgid "Debug"
74
  msgstr ""
75
 
76
- #: ../admin/class-advanced-ads-admin.php:301 ../admin/class-advanced-ads-admin.
77
- #: php:328
78
  msgid "Sorry, you are not allowed to access this feature."
79
  msgstr ""
80
 
81
- #: ../admin/class-advanced-ads-admin.php:314
82
  msgid ""
83
  "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
84
  "deleted?"
85
  msgstr ""
86
 
87
- #: ../admin/class-advanced-ads-admin.php:414
88
  msgid "Ad Type"
89
  msgstr ""
90
 
91
- #: ../admin/class-advanced-ads-admin.php:417
92
  msgid "Ad Parameters"
93
  msgstr ""
94
 
95
- #: ../admin/class-advanced-ads-admin.php:420
96
  msgid "Layout / Output"
97
  msgstr ""
98
 
99
- #: ../admin/class-advanced-ads-admin.php:423
100
  msgid "Display Conditions"
101
  msgstr ""
102
 
103
- #: ../admin/class-advanced-ads-admin.php:426
104
  msgid "Visitor Conditions"
105
  msgstr ""
106
 
107
- #: ../admin/class-advanced-ads-admin.php:583 ../admin/class-advanced-ads-admin.
108
- #: php:584
109
  msgid "Ad updated."
110
  msgstr ""
111
 
112
  #. translators: %s: date and time of the revision
113
- #: ../admin/class-advanced-ads-admin.php:586
114
  #, php-format
115
  msgid "Ad restored to revision from %s"
116
  msgstr ""
117
 
118
- #: ../admin/class-advanced-ads-admin.php:587
119
  msgid "Ad published."
120
  msgstr ""
121
 
122
- #: ../admin/class-advanced-ads-admin.php:588
123
  msgid "Ad saved."
124
  msgstr ""
125
 
126
- #: ../admin/class-advanced-ads-admin.php:589
127
  msgid "Ad submitted."
128
  msgstr ""
129
 
130
- #: ../admin/class-advanced-ads-admin.php:591
131
  #, php-format
132
  msgid "Ad scheduled for: <strong>%1$s</strong>."
133
  msgstr ""
134
 
135
  #. translators: Publish box date format, see http://php.net/date
136
- #: ../admin/class-advanced-ads-admin.php:593
137
  msgid "M j, Y @ G:i"
138
  msgstr ""
139
 
140
- #: ../admin/class-advanced-ads-admin.php:595
141
  msgid "Ad draft updated."
142
  msgstr ""
143
 
144
- #: ../admin/class-advanced-ads-admin.php:614
145
  #, php-format
146
  msgid "%s ad updated."
147
  msgid_plural "%s ads updated."
148
  msgstr[0] ""
149
  msgstr[1] ""
150
 
151
- #: ../admin/class-advanced-ads-admin.php:615
152
  #, php-format
153
  msgid "%s ad not updated, somebody is editing it."
154
  msgid_plural "%s ads not updated, somebody is editing them."
155
  msgstr[0] ""
156
  msgstr[1] ""
157
 
158
- #: ../admin/class-advanced-ads-admin.php:616
159
  #, php-format
160
  msgid "%s ad permanently deleted."
161
  msgid_plural "%s ads permanently deleted."
162
  msgstr[0] ""
163
  msgstr[1] ""
164
 
165
- #: ../admin/class-advanced-ads-admin.php:617
166
  #, php-format
167
  msgid "%s ad moved to the Trash."
168
  msgid_plural "%s ads moved to the Trash."
169
  msgstr[0] ""
170
  msgstr[1] ""
171
 
172
- #: ../admin/class-advanced-ads-admin.php:618
173
  #, php-format
174
  msgid "%s ad restored from the Trash."
175
  msgid_plural "%s ads restored from the Trash."
176
  msgstr[0] ""
177
  msgstr[1] ""
178
 
179
- #: ../admin/class-advanced-ads-admin.php:655 ../admin/views/settings.php:12
180
  msgid "General"
181
  msgstr ""
182
 
183
- #: ../admin/class-advanced-ads-admin.php:663 ../admin/views/settings.php:18
184
  msgid "Licenses"
185
  msgstr ""
186
 
187
- #: ../admin/class-advanced-ads-admin.php:671
188
  msgid "Disable ads"
189
  msgstr ""
190
 
191
- #: ../admin/class-advanced-ads-admin.php:679
192
  msgid "Hide ads for logged in users"
193
  msgstr ""
194
 
195
- #: ../admin/class-advanced-ads-admin.php:687
196
  msgid "Use advanced JavaScript"
197
  msgstr ""
198
 
199
- #: ../admin/class-advanced-ads-admin.php:695
200
  msgid "Priority of content injection filter"
201
  msgstr ""
202
 
203
- #: ../admin/class-advanced-ads-admin.php:703
204
  msgid "Hide ads from bots"
205
  msgstr ""
206
 
207
- #: ../admin/class-advanced-ads-admin.php:711
208
  msgid "Disable notices"
209
  msgstr ""
210
 
211
- #: ../admin/class-advanced-ads-admin.php:767
212
  msgid "(display to all)"
213
  msgstr ""
214
 
215
- #: ../admin/class-advanced-ads-admin.php:768
216
  msgid "Subscriber"
217
  msgstr ""
218
 
219
- #: ../admin/class-advanced-ads-admin.php:769
220
  msgid "Contributor"
221
  msgstr ""
222
 
223
- #: ../admin/class-advanced-ads-admin.php:770
224
  msgid "Author"
225
  msgstr ""
226
 
227
- #: ../admin/class-advanced-ads-admin.php:771
228
  msgid "Editor"
229
  msgstr ""
230
 
231
- #: ../admin/class-advanced-ads-admin.php:772
232
  msgid "Admin"
233
  msgstr ""
234
 
235
- #: ../admin/class-advanced-ads-admin.php:780
236
  msgid "Choose the lowest role a user must have in order to not see any ads."
237
  msgstr ""
238
 
239
- #: ../admin/class-advanced-ads-admin.php:793
240
  #, php-format
241
  msgid ""
242
  "Only enable this if you can and want to use the advanced JavaScript "
243
  "functions described <a href=\"%s\">here</a>."
244
  msgstr ""
245
 
246
- #: ../admin/class-advanced-ads-admin.php:806
247
  msgid ""
248
  "Play with this value in order to change the priority of the injected ads "
249
  "compared to other auto injected elements in the post content."
250
  msgstr ""
251
 
252
- #: ../admin/class-advanced-ads-admin.php:819
253
  #, php-format
254
  msgid ""
255
  "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
@@ -257,54 +257,54 @@ msgid ""
257
  "Add-On</a>."
258
  msgstr ""
259
 
260
- #: ../admin/class-advanced-ads-admin.php:820
261
  msgid ""
262
  "Disabling this option only makes sense if your ads contain content you want "
263
  "to display to bots (like search engines) or your site is cached and bots "
264
  "could create a cached version without the ads."
265
  msgstr ""
266
 
267
- #: ../admin/class-advanced-ads-admin.php:833
268
  msgid ""
269
  "Disable all internal notices like tips, tutorials and email newsletters but "
270
  "not critical update notices. Disabling notices is recommended if you run "
271
  "multiple blogs with Advanced Ads already.."
272
  msgstr ""
273
 
274
- #: ../admin/class-advanced-ads-admin.php:862
275
  msgid "Ad Details"
276
  msgstr ""
277
 
278
- #: ../admin/class-advanced-ads-admin.php:936
279
  msgid "Ad Settings"
280
  msgstr ""
281
 
282
- #: ../admin/class-advanced-ads-admin.php:1011 ../admin/views/overview.php:23
283
  msgid "Ads Dashboard"
284
  msgstr ""
285
 
286
- #: ../admin/class-advanced-ads-admin.php:1023
287
  msgid "From the ad optimization universe"
288
  msgstr ""
289
 
290
- #: ../admin/class-advanced-ads-admin.php:1032
291
  msgid "Advanced Ads Tutorials"
292
  msgstr ""
293
 
294
- #: ../admin/class-advanced-ads-admin.php:1043
295
  #, php-format
296
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
297
  msgstr ""
298
 
299
- #: ../admin/class-advanced-ads-admin.php:1054
300
  msgid "plugin manual and homepage"
301
  msgstr ""
302
 
303
- #: ../admin/class-advanced-ads-admin.php:1061
304
  msgid "Get the tutorial via email"
305
  msgstr ""
306
 
307
- #: ../admin/class-advanced-ads-admin.php:1068
308
  msgid "Get AdSense tips via email"
309
  msgstr ""
310
 
@@ -334,7 +334,7 @@ msgid "up to %d ads displayed"
334
  msgstr ""
335
 
336
  #: ../admin/includes/class-ad-groups-list.php:187 ../admin/views/ad-group-list-
337
- #: form-row.php:33
338
  msgid "No ads assigned"
339
  msgstr ""
340
 
@@ -544,175 +544,191 @@ msgstr ""
544
  msgid "PopUps and Layers"
545
  msgstr ""
546
 
547
- #: ../admin/includes/class-overview-widgets.php:77 ../admin/includes/notices.php:20
 
 
 
 
548
  msgid ""
549
  "Learn more about how and <strong>how much you can earn with AdSense</strong> "
550
  "and Advanced Ads from my dedicated newsletter."
551
  msgstr ""
552
 
553
- #: ../admin/includes/class-overview-widgets.php:78 ../admin/includes/notices.php:
554
  #: 21 ../admin/views/notices/inline.php:3 ../admin/views/notices/subscribe.php:3
555
  msgid "Subscribe me now"
556
  msgstr ""
557
 
558
- #: ../admin/includes/class-overview-widgets.php:85
559
  msgid "Get the first steps and more tutorials to your inbox."
560
  msgstr ""
561
 
562
- #: ../admin/includes/class-overview-widgets.php:86
563
  msgid "Send it now"
564
  msgstr ""
565
 
566
- #: ../admin/includes/class-overview-widgets.php:109
567
  msgid "Create your first ad"
568
  msgstr ""
569
 
570
- #: ../admin/includes/class-overview-widgets.php:112
571
  msgid ""
572
  "Ad Groups contain ads and are currently used to rotate multiple ads on a "
573
  "single spot."
574
  msgstr ""
575
 
576
- #: ../admin/includes/class-overview-widgets.php:114
577
  msgid "Create your first group"
578
  msgstr ""
579
 
580
- #: ../admin/includes/class-overview-widgets.php:117
581
  msgid "Ad Placements are the best way to manage where to display ads and groups."
582
  msgstr ""
583
 
584
- #: ../admin/includes/class-overview-widgets.php:119
585
  msgid "Create your first placement"
586
  msgstr ""
587
 
588
- #: ../admin/includes/class-overview-widgets.php:124
589
  msgid "Next steps"
590
  msgstr ""
591
 
592
- #: ../admin/includes/class-overview-widgets.php:136
593
  #, php-format
594
  msgid "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
595
  msgstr ""
596
 
597
- #: ../admin/includes/class-overview-widgets.php:137
598
  #, php-format
599
  msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
600
  msgstr ""
601
 
602
- #: ../admin/includes/class-overview-widgets.php:138
603
  #, php-format
604
  msgid "Ask other users in the <a href=\"%s\" target=\"_blank\">wordpress.org forum</a>"
605
  msgstr ""
606
 
607
- #: ../admin/includes/class-overview-widgets.php:139
608
  #, php-format
609
  msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
610
  msgstr ""
611
 
612
- #: ../admin/includes/class-overview-widgets.php:140
613
  #, php-format
614
  msgid ""
615
  "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
616
  "href=\"%s\" target=\"_blank\">wordpress.org</a>"
617
  msgstr ""
618
 
619
- #: ../admin/includes/class-overview-widgets.php:149
620
  msgid ""
621
  "Need help to set up and optimize your ads? Need custom coding on your site? "
622
  "Ask me for a quote."
623
  msgstr ""
624
 
625
- #: ../admin/includes/class-overview-widgets.php:150
626
  #, php-format
627
  msgid "Help with ads on %s"
628
  msgstr ""
629
 
630
- #: ../admin/includes/class-overview-widgets.php:151
631
  msgid "Get an offer"
632
  msgstr ""
633
 
634
- #: ../admin/includes/class-overview-widgets.php:159
635
  msgid "Track the impressions of and clicks on your ads."
636
  msgstr ""
637
 
638
- #: ../admin/includes/class-overview-widgets.php:160
639
  msgid "2 methods to count impressions"
640
  msgstr ""
641
 
642
- #: ../admin/includes/class-overview-widgets.php:161
643
  msgid "beautiful stats for all or single ads"
644
  msgstr ""
645
 
646
- #: ../admin/includes/class-overview-widgets.php:162
647
  msgid "get stats for predefined and custom persiods"
648
  msgstr ""
649
 
650
- #: ../admin/includes/class-overview-widgets.php:163
651
  msgid "group stats by day, week or month"
652
  msgstr ""
653
 
654
- #: ../admin/includes/class-overview-widgets.php:165
655
  msgid "Get the Tracking add-on"
656
  msgstr ""
657
 
658
- #: ../admin/includes/class-overview-widgets.php:173
659
  msgid "Display ads based on the size of your visitor’s browser or device."
660
  msgstr ""
661
 
662
- #: ../admin/includes/class-overview-widgets.php:174
663
  msgid "set a range (from … to …) pixels for the browser size"
664
  msgstr ""
665
 
666
- #: ../admin/includes/class-overview-widgets.php:175
667
  msgid "set custom sizes for AdSense responsive ads"
668
  msgstr ""
669
 
670
- #: ../admin/includes/class-overview-widgets.php:176
671
  msgid "list all ads by their responsive settings"
672
  msgstr ""
673
 
674
- #: ../admin/includes/class-overview-widgets.php:178
675
  msgid "Get the Responsive add-on"
676
  msgstr ""
677
 
678
- #: ../admin/includes/class-overview-widgets.php:186
 
679
  msgid ""
680
  "Fix ads to the browser while users are scrolling and create best performing "
681
  "anchor ads."
682
  msgstr ""
683
 
684
- #: ../admin/includes/class-overview-widgets.php:187
685
  msgid "position ads that don’t scroll with the screen"
686
  msgstr ""
687
 
688
- #: ../admin/includes/class-overview-widgets.php:188
689
  msgid "build anchor ads not only on mobile devices"
690
  msgstr ""
691
 
692
- #: ../admin/includes/class-overview-widgets.php:190
 
693
  msgid "Get the Sticky add-on"
694
  msgstr ""
695
 
696
- #: ../admin/includes/class-overview-widgets.php:198
 
697
  msgid "Display content and ads in layers and popups on custom events."
698
  msgstr ""
699
 
700
- #: ../admin/includes/class-overview-widgets.php:199
701
  msgid "display a popup after a user interaction like scrolling"
702
  msgstr ""
703
 
704
- #: ../admin/includes/class-overview-widgets.php:200
705
  msgid "optional backgroup overlay"
706
  msgstr ""
707
 
708
- #: ../admin/includes/class-overview-widgets.php:201
709
  msgid "allow users to close the popup"
710
  msgstr ""
711
 
712
- #: ../admin/includes/class-overview-widgets.php:203
 
713
  msgid "Get the PopUp and Layer add-on"
714
  msgstr ""
715
 
 
 
 
 
 
 
 
 
716
  #: ../admin/includes/notices.php:14
717
  msgid ""
718
  "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
@@ -830,12 +846,12 @@ msgstr ""
830
  msgid "Number of ads to display in the block"
831
  msgstr ""
832
 
833
- #: ../admin/views/ad-group-list-form-row.php:27 ../public/class-advanced-ads.php:
834
  #: 540
835
  msgid "Ad"
836
  msgstr ""
837
 
838
- #: ../admin/views/ad-group-list-form-row.php:28
839
  msgid "weight"
840
  msgstr ""
841
 
@@ -848,12 +864,12 @@ msgid "Details"
848
  msgstr ""
849
 
850
  #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
851
- #: /admin/views/ad-info.php:6 ../admin/views/placements.php:22
852
  msgid "shortcode"
853
  msgstr ""
854
 
855
  #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
856
- #: /admin/views/ad-info.php:9 ../admin/views/placements.php:25
857
  msgid "template"
858
  msgstr ""
859
 
@@ -917,39 +933,101 @@ msgstr ""
917
  msgid "Update Groups"
918
  msgstr ""
919
 
920
- #: ../admin/views/ad-info.php:1
921
- #, php-format
922
- msgid "Ad Id: %s"
923
  msgstr ""
924
 
925
- #: ../admin/views/ad-info.php:2
926
- msgid "How to use this Ad?"
927
  msgstr ""
928
 
929
- #: ../admin/views/ad-info.php:5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
  #, php-format
931
  msgid ""
932
- "How to display the ad directly? Find more help and examples in the <a "
933
- "href=\"%s\" target=\"_blank\">manual</a>"
934
  msgstr ""
935
 
936
- #: ../admin/views/ad-info.php:7
937
- msgid "To display an ad in content fields"
 
 
 
 
 
938
  msgstr ""
939
 
940
- #: ../admin/views/ad-info.php:10
941
- msgid "To display an ad in template files"
 
942
  msgstr ""
943
 
944
- #: ../admin/views/ad-info.php:15
945
  msgid "click to change"
946
  msgstr ""
947
 
948
- #: ../admin/views/ad-info.php:19
949
  msgid "Add a description"
950
  msgstr ""
951
 
952
- #: ../admin/views/ad-info.php:22
953
  msgid "Internal description or your own notes about this ad."
954
  msgstr ""
955
 
@@ -1050,50 +1128,56 @@ msgid ""
1050
  "websites."
1051
  msgstr ""
1052
 
1053
- #: ../admin/views/ad-visitor-metabox.php:29
1054
- msgid "New condition"
 
 
1055
  msgstr ""
1056
 
1057
  #: ../admin/views/ad-visitor-metabox.php:32
 
 
 
 
1058
  msgctxt "visitor condition connector"
1059
  msgid "and"
1060
  msgstr ""
1061
 
1062
- #: ../admin/views/ad-visitor-metabox.php:33
1063
  msgctxt "visitor condition connector"
1064
  msgid "or"
1065
  msgstr ""
1066
 
1067
- #: ../admin/views/ad-visitor-metabox.php:36
1068
  msgid "-- choose a condition --"
1069
  msgstr ""
1070
 
1071
- #: ../admin/views/ad-visitor-metabox.php:41
1072
  msgid "add"
1073
  msgstr ""
1074
 
1075
- #: ../admin/views/ad-visitor-metabox.php:45
1076
  #, php-format
1077
  msgid ""
1078
  "Define the exact browser width for which an ad should be visible using the "
1079
  "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1080
  msgstr ""
1081
 
1082
- #: ../admin/views/ad-visitor-metabox.php:102
1083
  msgid ""
1084
  "The visitor conditions below are deprecated. Please use the new version of "
1085
  "visitor conditions to replace it."
1086
  msgstr ""
1087
 
1088
- #: ../admin/views/ad-visitor-metabox.php:108
1089
  msgid "Display on all devices"
1090
  msgstr ""
1091
 
1092
- #: ../admin/views/ad-visitor-metabox.php:112
1093
  msgid "only on mobile devices"
1094
  msgstr ""
1095
 
1096
- #: ../admin/views/ad-visitor-metabox.php:116
1097
  msgid "not on mobile devices"
1098
  msgstr ""
1099
 
@@ -1408,11 +1492,11 @@ msgid "equal"
1408
  msgstr ""
1409
 
1410
  #: ../classes/visitor-conditions.php:117
1411
- msgid "equal and higher"
1412
  msgstr ""
1413
 
1414
  #: ../classes/visitor-conditions.php:118
1415
- msgid "equal and lower"
1416
  msgstr ""
1417
 
1418
  #: ../classes/widget.php:19
5
  "Project-Id-Version: Advanved Ads\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
7
  "POT-Creation-Date: 2015-01-27 16:47+0100\n"
8
+ "POT-Revision-Date: Fri May 29 2015 09:30:03 GMT+0200 (CEST)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
10
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
11
  "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
24
  "X-Poedit-Basepath: ../\n"
25
  "X-Poedit-SearchPath-0: ."
26
 
27
+ #: ../admin/class-advanced-ads-admin.php:202
28
  msgid "Overview"
29
  msgstr ""
30
 
31
+ #: ../admin/class-advanced-ads-admin.php:202 ../classes/widget.php:21
32
  msgid "Advanced Ads"
33
  msgstr ""
34
 
35
+ #: ../admin/class-advanced-ads-admin.php:206 ../admin/class-advanced-ads-admin.
36
+ #: php:206 ../admin/views/ad-group-list-form-row.php:25 ../admin/views/ad-group-
37
  #: list-header.php:5 ../admin/views/placements.php:64 ../classes/widget.php:66 ..
38
  #: /public/class-advanced-ads.php:539
39
  msgid "Ads"
40
  msgstr ""
41
 
42
+ #: ../admin/class-advanced-ads-admin.php:210 ../admin/views/placements.php:57 ..
43
  #: /classes/widget.php:59
44
  msgid "Ad Groups"
45
  msgstr ""
46
 
47
+ #: ../admin/class-advanced-ads-admin.php:210 ../public/class-advanced-ads.php:513
48
  msgid "Groups"
49
  msgstr ""
50
 
51
+ #: ../admin/class-advanced-ads-admin.php:215 ../admin/views/debug.php:14
52
  msgid "Ad Placements"
53
  msgstr ""
54
 
55
+ #: ../admin/class-advanced-ads-admin.php:215 ../admin/views/placements.php:18
56
  msgid "Placements"
57
  msgstr ""
58
 
59
+ #: ../admin/class-advanced-ads-admin.php:219
60
  msgid "Advanced Ads Settings"
61
  msgstr ""
62
 
63
+ #: ../admin/class-advanced-ads-admin.php:219 ../admin/class-advanced-ads-admin.
64
+ #: php:389 ../admin/views/debug.php:11
65
  msgid "Settings"
66
  msgstr ""
67
 
68
+ #: ../admin/class-advanced-ads-admin.php:222
69
  msgid "Advanced Ads Debugging"
70
  msgstr ""
71
 
72
+ #: ../admin/class-advanced-ads-admin.php:222
73
  msgid "Debug"
74
  msgstr ""
75
 
76
+ #: ../admin/class-advanced-ads-admin.php:303 ../admin/class-advanced-ads-admin.
77
+ #: php:330
78
  msgid "Sorry, you are not allowed to access this feature."
79
  msgstr ""
80
 
81
+ #: ../admin/class-advanced-ads-admin.php:316
82
  msgid ""
83
  "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
84
  "deleted?"
85
  msgstr ""
86
 
87
+ #: ../admin/class-advanced-ads-admin.php:431
88
  msgid "Ad Type"
89
  msgstr ""
90
 
91
+ #: ../admin/class-advanced-ads-admin.php:434
92
  msgid "Ad Parameters"
93
  msgstr ""
94
 
95
+ #: ../admin/class-advanced-ads-admin.php:437
96
  msgid "Layout / Output"
97
  msgstr ""
98
 
99
+ #: ../admin/class-advanced-ads-admin.php:440
100
  msgid "Display Conditions"
101
  msgstr ""
102
 
103
+ #: ../admin/class-advanced-ads-admin.php:443
104
  msgid "Visitor Conditions"
105
  msgstr ""
106
 
107
+ #: ../admin/class-advanced-ads-admin.php:600 ../admin/class-advanced-ads-admin.
108
+ #: php:601
109
  msgid "Ad updated."
110
  msgstr ""
111
 
112
  #. translators: %s: date and time of the revision
113
+ #: ../admin/class-advanced-ads-admin.php:603
114
  #, php-format
115
  msgid "Ad restored to revision from %s"
116
  msgstr ""
117
 
118
+ #: ../admin/class-advanced-ads-admin.php:604
119
  msgid "Ad published."
120
  msgstr ""
121
 
122
+ #: ../admin/class-advanced-ads-admin.php:605
123
  msgid "Ad saved."
124
  msgstr ""
125
 
126
+ #: ../admin/class-advanced-ads-admin.php:606
127
  msgid "Ad submitted."
128
  msgstr ""
129
 
130
+ #: ../admin/class-advanced-ads-admin.php:608
131
  #, php-format
132
  msgid "Ad scheduled for: <strong>%1$s</strong>."
133
  msgstr ""
134
 
135
  #. translators: Publish box date format, see http://php.net/date
136
+ #: ../admin/class-advanced-ads-admin.php:610
137
  msgid "M j, Y @ G:i"
138
  msgstr ""
139
 
140
+ #: ../admin/class-advanced-ads-admin.php:612
141
  msgid "Ad draft updated."
142
  msgstr ""
143
 
144
+ #: ../admin/class-advanced-ads-admin.php:631
145
  #, php-format
146
  msgid "%s ad updated."
147
  msgid_plural "%s ads updated."
148
  msgstr[0] ""
149
  msgstr[1] ""
150
 
151
+ #: ../admin/class-advanced-ads-admin.php:632
152
  #, php-format
153
  msgid "%s ad not updated, somebody is editing it."
154
  msgid_plural "%s ads not updated, somebody is editing them."
155
  msgstr[0] ""
156
  msgstr[1] ""
157
 
158
+ #: ../admin/class-advanced-ads-admin.php:633
159
  #, php-format
160
  msgid "%s ad permanently deleted."
161
  msgid_plural "%s ads permanently deleted."
162
  msgstr[0] ""
163
  msgstr[1] ""
164
 
165
+ #: ../admin/class-advanced-ads-admin.php:634
166
  #, php-format
167
  msgid "%s ad moved to the Trash."
168
  msgid_plural "%s ads moved to the Trash."
169
  msgstr[0] ""
170
  msgstr[1] ""
171
 
172
+ #: ../admin/class-advanced-ads-admin.php:635
173
  #, php-format
174
  msgid "%s ad restored from the Trash."
175
  msgid_plural "%s ads restored from the Trash."
176
  msgstr[0] ""
177
  msgstr[1] ""
178
 
179
+ #: ../admin/class-advanced-ads-admin.php:672 ../admin/views/settings.php:12
180
  msgid "General"
181
  msgstr ""
182
 
183
+ #: ../admin/class-advanced-ads-admin.php:680 ../admin/views/settings.php:18
184
  msgid "Licenses"
185
  msgstr ""
186
 
187
+ #: ../admin/class-advanced-ads-admin.php:688
188
  msgid "Disable ads"
189
  msgstr ""
190
 
191
+ #: ../admin/class-advanced-ads-admin.php:696
192
  msgid "Hide ads for logged in users"
193
  msgstr ""
194
 
195
+ #: ../admin/class-advanced-ads-admin.php:704
196
  msgid "Use advanced JavaScript"
197
  msgstr ""
198
 
199
+ #: ../admin/class-advanced-ads-admin.php:712
200
  msgid "Priority of content injection filter"
201
  msgstr ""
202
 
203
+ #: ../admin/class-advanced-ads-admin.php:720
204
  msgid "Hide ads from bots"
205
  msgstr ""
206
 
207
+ #: ../admin/class-advanced-ads-admin.php:728
208
  msgid "Disable notices"
209
  msgstr ""
210
 
211
+ #: ../admin/class-advanced-ads-admin.php:784
212
  msgid "(display to all)"
213
  msgstr ""
214
 
215
+ #: ../admin/class-advanced-ads-admin.php:785
216
  msgid "Subscriber"
217
  msgstr ""
218
 
219
+ #: ../admin/class-advanced-ads-admin.php:786
220
  msgid "Contributor"
221
  msgstr ""
222
 
223
+ #: ../admin/class-advanced-ads-admin.php:787
224
  msgid "Author"
225
  msgstr ""
226
 
227
+ #: ../admin/class-advanced-ads-admin.php:788
228
  msgid "Editor"
229
  msgstr ""
230
 
231
+ #: ../admin/class-advanced-ads-admin.php:789
232
  msgid "Admin"
233
  msgstr ""
234
 
235
+ #: ../admin/class-advanced-ads-admin.php:797
236
  msgid "Choose the lowest role a user must have in order to not see any ads."
237
  msgstr ""
238
 
239
+ #: ../admin/class-advanced-ads-admin.php:810
240
  #, php-format
241
  msgid ""
242
  "Only enable this if you can and want to use the advanced JavaScript "
243
  "functions described <a href=\"%s\">here</a>."
244
  msgstr ""
245
 
246
+ #: ../admin/class-advanced-ads-admin.php:823
247
  msgid ""
248
  "Play with this value in order to change the priority of the injected ads "
249
  "compared to other auto injected elements in the post content."
250
  msgstr ""
251
 
252
+ #: ../admin/class-advanced-ads-admin.php:836
253
  #, php-format
254
  msgid ""
255
  "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
257
  "Add-On</a>."
258
  msgstr ""
259
 
260
+ #: ../admin/class-advanced-ads-admin.php:837
261
  msgid ""
262
  "Disabling this option only makes sense if your ads contain content you want "
263
  "to display to bots (like search engines) or your site is cached and bots "
264
  "could create a cached version without the ads."
265
  msgstr ""
266
 
267
+ #: ../admin/class-advanced-ads-admin.php:850
268
  msgid ""
269
  "Disable all internal notices like tips, tutorials and email newsletters but "
270
  "not critical update notices. Disabling notices is recommended if you run "
271
  "multiple blogs with Advanced Ads already.."
272
  msgstr ""
273
 
274
+ #: ../admin/class-advanced-ads-admin.php:879
275
  msgid "Ad Details"
276
  msgstr ""
277
 
278
+ #: ../admin/class-advanced-ads-admin.php:953
279
  msgid "Ad Settings"
280
  msgstr ""
281
 
282
+ #: ../admin/class-advanced-ads-admin.php:1028 ../admin/views/overview.php:23
283
  msgid "Ads Dashboard"
284
  msgstr ""
285
 
286
+ #: ../admin/class-advanced-ads-admin.php:1040
287
  msgid "From the ad optimization universe"
288
  msgstr ""
289
 
290
+ #: ../admin/class-advanced-ads-admin.php:1049
291
  msgid "Advanced Ads Tutorials"
292
  msgstr ""
293
 
294
+ #: ../admin/class-advanced-ads-admin.php:1060
295
  #, php-format
296
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
297
  msgstr ""
298
 
299
+ #: ../admin/class-advanced-ads-admin.php:1071
300
  msgid "plugin manual and homepage"
301
  msgstr ""
302
 
303
+ #: ../admin/class-advanced-ads-admin.php:1078
304
  msgid "Get the tutorial via email"
305
  msgstr ""
306
 
307
+ #: ../admin/class-advanced-ads-admin.php:1085
308
  msgid "Get AdSense tips via email"
309
  msgstr ""
310
 
334
  msgstr ""
335
 
336
  #: ../admin/includes/class-ad-groups-list.php:187 ../admin/views/ad-group-list-
337
+ #: form-row.php:34
338
  msgid "No ads assigned"
339
  msgstr ""
340
 
544
  msgid "PopUps and Layers"
545
  msgstr ""
546
 
547
+ #: ../admin/includes/class-overview-widgets.php:61
548
+ msgid "Ad Slider"
549
+ msgstr ""
550
+
551
+ #: ../admin/includes/class-overview-widgets.php:79 ../admin/includes/notices.php:20
552
  msgid ""
553
  "Learn more about how and <strong>how much you can earn with AdSense</strong> "
554
  "and Advanced Ads from my dedicated newsletter."
555
  msgstr ""
556
 
557
+ #: ../admin/includes/class-overview-widgets.php:80 ../admin/includes/notices.php:
558
  #: 21 ../admin/views/notices/inline.php:3 ../admin/views/notices/subscribe.php:3
559
  msgid "Subscribe me now"
560
  msgstr ""
561
 
562
+ #: ../admin/includes/class-overview-widgets.php:87
563
  msgid "Get the first steps and more tutorials to your inbox."
564
  msgstr ""
565
 
566
+ #: ../admin/includes/class-overview-widgets.php:88
567
  msgid "Send it now"
568
  msgstr ""
569
 
570
+ #: ../admin/includes/class-overview-widgets.php:111
571
  msgid "Create your first ad"
572
  msgstr ""
573
 
574
+ #: ../admin/includes/class-overview-widgets.php:114
575
  msgid ""
576
  "Ad Groups contain ads and are currently used to rotate multiple ads on a "
577
  "single spot."
578
  msgstr ""
579
 
580
+ #: ../admin/includes/class-overview-widgets.php:116
581
  msgid "Create your first group"
582
  msgstr ""
583
 
584
+ #: ../admin/includes/class-overview-widgets.php:119
585
  msgid "Ad Placements are the best way to manage where to display ads and groups."
586
  msgstr ""
587
 
588
+ #: ../admin/includes/class-overview-widgets.php:121
589
  msgid "Create your first placement"
590
  msgstr ""
591
 
592
+ #: ../admin/includes/class-overview-widgets.php:126
593
  msgid "Next steps"
594
  msgstr ""
595
 
596
+ #: ../admin/includes/class-overview-widgets.php:138
597
  #, php-format
598
  msgid "<a href=\"%s\" target=\"_blank\">Plugin Homepage</a>"
599
  msgstr ""
600
 
601
+ #: ../admin/includes/class-overview-widgets.php:139
602
  #, php-format
603
  msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
604
  msgstr ""
605
 
606
+ #: ../admin/includes/class-overview-widgets.php:140
607
  #, php-format
608
  msgid "Ask other users in the <a href=\"%s\" target=\"_blank\">wordpress.org forum</a>"
609
  msgstr ""
610
 
611
+ #: ../admin/includes/class-overview-widgets.php:141
612
  #, php-format
613
  msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
614
  msgstr ""
615
 
616
+ #: ../admin/includes/class-overview-widgets.php:142
617
  #, php-format
618
  msgid ""
619
  "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
620
  "href=\"%s\" target=\"_blank\">wordpress.org</a>"
621
  msgstr ""
622
 
623
+ #: ../admin/includes/class-overview-widgets.php:151
624
  msgid ""
625
  "Need help to set up and optimize your ads? Need custom coding on your site? "
626
  "Ask me for a quote."
627
  msgstr ""
628
 
629
+ #: ../admin/includes/class-overview-widgets.php:152
630
  #, php-format
631
  msgid "Help with ads on %s"
632
  msgstr ""
633
 
634
+ #: ../admin/includes/class-overview-widgets.php:153
635
  msgid "Get an offer"
636
  msgstr ""
637
 
638
+ #: ../admin/includes/class-overview-widgets.php:161
639
  msgid "Track the impressions of and clicks on your ads."
640
  msgstr ""
641
 
642
+ #: ../admin/includes/class-overview-widgets.php:162
643
  msgid "2 methods to count impressions"
644
  msgstr ""
645
 
646
+ #: ../admin/includes/class-overview-widgets.php:163
647
  msgid "beautiful stats for all or single ads"
648
  msgstr ""
649
 
650
+ #: ../admin/includes/class-overview-widgets.php:164
651
  msgid "get stats for predefined and custom persiods"
652
  msgstr ""
653
 
654
+ #: ../admin/includes/class-overview-widgets.php:165
655
  msgid "group stats by day, week or month"
656
  msgstr ""
657
 
658
+ #: ../admin/includes/class-overview-widgets.php:167
659
  msgid "Get the Tracking add-on"
660
  msgstr ""
661
 
662
+ #: ../admin/includes/class-overview-widgets.php:175
663
  msgid "Display ads based on the size of your visitor’s browser or device."
664
  msgstr ""
665
 
666
+ #: ../admin/includes/class-overview-widgets.php:176
667
  msgid "set a range (from … to …) pixels for the browser size"
668
  msgstr ""
669
 
670
+ #: ../admin/includes/class-overview-widgets.php:177
671
  msgid "set custom sizes for AdSense responsive ads"
672
  msgstr ""
673
 
674
+ #: ../admin/includes/class-overview-widgets.php:178
675
  msgid "list all ads by their responsive settings"
676
  msgstr ""
677
 
678
+ #: ../admin/includes/class-overview-widgets.php:180
679
  msgid "Get the Responsive add-on"
680
  msgstr ""
681
 
682
+ #: ../admin/includes/class-overview-widgets.php:188 ../admin/views/ad-info-top.
683
+ #: php:30
684
  msgid ""
685
  "Fix ads to the browser while users are scrolling and create best performing "
686
  "anchor ads."
687
  msgstr ""
688
 
689
+ #: ../admin/includes/class-overview-widgets.php:189
690
  msgid "position ads that don’t scroll with the screen"
691
  msgstr ""
692
 
693
+ #: ../admin/includes/class-overview-widgets.php:190
694
  msgid "build anchor ads not only on mobile devices"
695
  msgstr ""
696
 
697
+ #: ../admin/includes/class-overview-widgets.php:192 ../admin/views/ad-info-top.
698
+ #: php:32
699
  msgid "Get the Sticky add-on"
700
  msgstr ""
701
 
702
+ #: ../admin/includes/class-overview-widgets.php:200 ../admin/views/ad-info-top.
703
+ #: php:37
704
  msgid "Display content and ads in layers and popups on custom events."
705
  msgstr ""
706
 
707
+ #: ../admin/includes/class-overview-widgets.php:201
708
  msgid "display a popup after a user interaction like scrolling"
709
  msgstr ""
710
 
711
+ #: ../admin/includes/class-overview-widgets.php:202
712
  msgid "optional backgroup overlay"
713
  msgstr ""
714
 
715
+ #: ../admin/includes/class-overview-widgets.php:203
716
  msgid "allow users to close the popup"
717
  msgstr ""
718
 
719
+ #: ../admin/includes/class-overview-widgets.php:205 ../admin/views/ad-info-top.
720
+ #: php:39
721
  msgid "Get the PopUp and Layer add-on"
722
  msgstr ""
723
 
724
+ #: ../admin/includes/class-overview-widgets.php:213
725
+ msgid "Create a beautiful and simple slider from your ads."
726
+ msgstr ""
727
+
728
+ #: ../admin/includes/class-overview-widgets.php:215
729
+ msgid "Get the Slider add-on"
730
+ msgstr ""
731
+
732
  #: ../admin/includes/notices.php:14
733
  msgid ""
734
  "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
846
  msgid "Number of ads to display in the block"
847
  msgstr ""
848
 
849
+ #: ../admin/views/ad-group-list-form-row.php:28 ../public/class-advanced-ads.php:
850
  #: 540
851
  msgid "Ad"
852
  msgstr ""
853
 
854
+ #: ../admin/views/ad-group-list-form-row.php:29
855
  msgid "weight"
856
  msgstr ""
857
 
864
  msgstr ""
865
 
866
  #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
867
+ #: /admin/views/ad-info.php:3 ../admin/views/placements.php:22
868
  msgid "shortcode"
869
  msgstr ""
870
 
871
  #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
872
+ #: /admin/views/placements.php:25
873
  msgid "template"
874
  msgstr ""
875
 
933
  msgid "Update Groups"
934
  msgstr ""
935
 
936
+ #: ../admin/views/ad-info-top.php:4
937
+ msgid "Cool, you just published an ad. What now?"
 
938
  msgstr ""
939
 
940
+ #: ../admin/views/ad-info-top.php:5
941
+ msgid "Display the ad in "
942
  msgstr ""
943
 
944
+ #: ../admin/views/ad-info-top.php:7
945
+ msgid "… every post or page"
946
+ msgstr ""
947
+
948
+ #: ../admin/views/ad-info-top.php:9
949
+ msgid "Use placements to inject the ad automatically into posts and pages."
950
+ msgstr ""
951
+
952
+ #: ../admin/views/ad-info-top.php:10
953
+ msgid "Configure Placements"
954
+ msgstr ""
955
+
956
+ #: ../admin/views/ad-info-top.php:12
957
+ msgid "… Sidebar or Widget Area"
958
+ msgstr ""
959
+
960
+ #: ../admin/views/ad-info-top.php:14
961
+ msgid "Use the <em>Advanced Ads</em> Widget to display ads in your sidebars."
962
+ msgstr ""
963
+
964
+ #: ../admin/views/ad-info-top.php:15
965
+ msgid "Configure a Widget"
966
+ msgstr ""
967
+
968
+ #: ../admin/views/ad-info-top.php:17
969
+ msgid "… a few hand selected posts or pages"
970
+ msgstr ""
971
+
972
+ #: ../admin/views/ad-info-top.php:19
973
+ msgid ""
974
+ "Use the shortcode below to manually place the ad in the content editor of "
975
+ "posts and pages."
976
+ msgstr ""
977
+
978
+ #: ../admin/views/ad-info-top.php:22
979
+ msgid "… in a custom position in your theme"
980
+ msgstr ""
981
+
982
+ #: ../admin/views/ad-info-top.php:24
983
+ msgid ""
984
+ "Use the function below to manually place the ad into your template files. "
985
+ "This method is needed for more advanced placements like in the header of "
986
+ "your theme."
987
+ msgstr ""
988
+
989
+ #: ../admin/views/ad-info-top.php:27
990
+ msgid "… in an anchor ad or pop-up"
991
+ msgstr ""
992
+
993
+ #: ../admin/views/ad-info-top.php:34
994
+ msgid "You find the settings for the Sticky Ads below."
995
+ msgstr ""
996
+
997
+ #: ../admin/views/ad-info-top.php:41
998
+ msgid "You find the settings for the Layer and PopUp effects below."
999
+ msgstr ""
1000
+
1001
+ #: ../admin/views/ad-info-top.php:46
1002
  #, php-format
1003
  msgid ""
1004
+ "Learn more about your choices to display an ad in the <a href=\"%s\" "
1005
+ "target=\"_blank\">manual</a>"
1006
  msgstr ""
1007
 
1008
+ #: ../admin/views/ad-info.php:2
1009
+ #, php-format
1010
+ msgid "Ad Id: %s"
1011
+ msgstr ""
1012
+
1013
+ #: ../admin/views/ad-info.php:5
1014
+ msgid "theme function"
1015
  msgstr ""
1016
 
1017
+ #: ../admin/views/ad-info.php:7
1018
+ #, php-format
1019
+ msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
1020
  msgstr ""
1021
 
1022
+ #: ../admin/views/ad-info.php:12
1023
  msgid "click to change"
1024
  msgstr ""
1025
 
1026
+ #: ../admin/views/ad-info.php:16
1027
  msgid "Add a description"
1028
  msgstr ""
1029
 
1030
+ #: ../admin/views/ad-info.php:19
1031
  msgid "Internal description or your own notes about this ad."
1032
  msgstr ""
1033
 
1128
  "websites."
1129
  msgstr ""
1130
 
1131
+ #: ../admin/views/ad-visitor-metabox.php:28
1132
+ msgid ""
1133
+ "Visitor conditions limit the number of users who can see your ad. There is "
1134
+ "no need to set visitor conditions if you want all users to see the ad."
1135
  msgstr ""
1136
 
1137
  #: ../admin/views/ad-visitor-metabox.php:32
1138
+ msgid "New condition"
1139
+ msgstr ""
1140
+
1141
+ #: ../admin/views/ad-visitor-metabox.php:35
1142
  msgctxt "visitor condition connector"
1143
  msgid "and"
1144
  msgstr ""
1145
 
1146
+ #: ../admin/views/ad-visitor-metabox.php:36
1147
  msgctxt "visitor condition connector"
1148
  msgid "or"
1149
  msgstr ""
1150
 
1151
+ #: ../admin/views/ad-visitor-metabox.php:39
1152
  msgid "-- choose a condition --"
1153
  msgstr ""
1154
 
1155
+ #: ../admin/views/ad-visitor-metabox.php:44
1156
  msgid "add"
1157
  msgstr ""
1158
 
1159
+ #: ../admin/views/ad-visitor-metabox.php:48
1160
  #, php-format
1161
  msgid ""
1162
  "Define the exact browser width for which an ad should be visible using the "
1163
  "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1164
  msgstr ""
1165
 
1166
+ #: ../admin/views/ad-visitor-metabox.php:105
1167
  msgid ""
1168
  "The visitor conditions below are deprecated. Please use the new version of "
1169
  "visitor conditions to replace it."
1170
  msgstr ""
1171
 
1172
+ #: ../admin/views/ad-visitor-metabox.php:111
1173
  msgid "Display on all devices"
1174
  msgstr ""
1175
 
1176
+ #: ../admin/views/ad-visitor-metabox.php:115
1177
  msgid "only on mobile devices"
1178
  msgstr ""
1179
 
1180
+ #: ../admin/views/ad-visitor-metabox.php:119
1181
  msgid "not on mobile devices"
1182
  msgstr ""
1183
 
1492
  msgstr ""
1493
 
1494
  #: ../classes/visitor-conditions.php:117
1495
+ msgid "equal or higher"
1496
  msgstr ""
1497
 
1498
  #: ../classes/visitor-conditions.php:118
1499
+ msgid "equal or lower"
1500
  msgstr ""
1501
 
1502
  #: ../classes/widget.php:19
modules/display-by-query/config.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // module configuration
4
+
5
+ $path = dirname( __FILE__ );
6
+
7
+ return array(
8
+ 'classmap' => array(
9
+ 'Advanced_Ads_Module_Display_By_Query' => $path . '/display-by-query.class.php',
10
+ ),
11
+ 'textdomain' => null,
12
+ );
modules/display-by-query/display-by-query.class.php ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Advanced_Ads_Module_Display_By_Query {
4
+
5
+ protected $query_var_keys = array(
6
+ 'is_single',
7
+ 'is_archive',
8
+ 'is_search',
9
+ 'is_home',
10
+ 'is_404',
11
+ 'is_attachment',
12
+ 'is_singular',
13
+ 'is_front_page',
14
+ );
15
+
16
+ public function __construct() {
17
+ // register filter
18
+ add_filter( 'advanced-ads-ad-select-args', array( $this, 'ad_select_args_callback' ) );
19
+ add_filter( 'advanced-ads-can-display', array( $this, 'can_display' ), 10, 2 );
20
+ }
21
+
22
+ /**
23
+ * On demand provide current query arguments to ads.
24
+ *
25
+ * Existing arguments must not be overridden.
26
+ * Some arguments might be cachable.
27
+ *
28
+ * @param array $args
29
+ *
30
+ * @return array
31
+ */
32
+ public function ad_select_args_callback( $args ) {
33
+ global $post, $wp_the_query, $wp_query;
34
+
35
+ if ( isset( $post ) ) {
36
+ if ( ! isset( $args['post'] ) ) {
37
+ $args['post'] = array();
38
+ }
39
+ if ( ! isset( $args['post']['id'] ) ) {
40
+ $args['post']['id'] = $post->ID;
41
+ }
42
+ if ( ! isset( $args['post']['post_type'] ) ) {
43
+ $args['post']['post_type'] = $post->post_type;
44
+ }
45
+ }
46
+
47
+ // pass query arguments
48
+ if ( isset( $wp_the_query ) ) {
49
+ if ( ! isset( $args['wp_the_query'] ) ) {
50
+ $args['wp_the_query'] = array();
51
+ }
52
+ $query = $wp_the_query->get_queried_object();
53
+ if ( ! isset( $args['wp_the_query']['term_id'] ) && $query ) {
54
+ $args['wp_the_query']['term_id'] = $query->term_id;
55
+ }
56
+
57
+ // query type/ context
58
+ if ( ! isset( $args['wp_the_query']['is_main_query'] )) {
59
+ $args['wp_the_query']['is_main_query'] = $wp_query->is_main_query();
60
+ }
61
+
62
+ // query vars
63
+ foreach ($this->query_var_keys as $key) {
64
+ if ( ! isset( $args['wp_the_query'][ $key ] ) ) {
65
+ $args['wp_the_query'][ $key ] = $wp_the_query->$key();
66
+ }
67
+ }
68
+ }
69
+
70
+ return $args;
71
+ }
72
+
73
+ /**
74
+ *
75
+ * @param mixed $id scalar (key) or array of keys as needle
76
+ * @param array $ids haystack
77
+ *
78
+ * @return boolean void if either argument is empty
79
+ */
80
+ protected function in_array( $id, $ids ) {
81
+ // empty?
82
+ if ( ! isset( $id ) || $id === array() ) {
83
+ return ;
84
+ }
85
+
86
+ // need to explode?
87
+ if ( is_string( $ids) ) {
88
+ $ids = explode( ',', $ids );
89
+ }
90
+
91
+ // invalid?
92
+ if ( ! is_array( $ids ) ) {
93
+ return ;
94
+ }
95
+
96
+ return is_array( $id ) ? array_intersect( $id, $ids ) !== array() : in_array( $id, $ids );
97
+ }
98
+
99
+ protected function can_display_postids( $post, $_cond_value ) {
100
+ // this check is deprecated
101
+ if ( ! $this->can_display_ids( $post, $_cond_value ) ) {
102
+ return false;
103
+ }
104
+
105
+ // included posts
106
+ if ( isset( $_cond_value['method'] ) && is_array( $_cond_value['ids'] ) ) {
107
+ switch ( $_cond_value['method'] ) {
108
+ case 'include' :
109
+ if ( $this->in_array( $post, $_cond_value['ids'] ) === false ) {
110
+ return false;
111
+ }
112
+ break;
113
+
114
+ case 'exclude' :
115
+ if ( $this->in_array( $post, $_cond_value['ids'] ) === true ) {
116
+ return false;
117
+ }
118
+ break ;
119
+ }
120
+ }
121
+
122
+ return true;
123
+ }
124
+
125
+ protected function can_display_categoryids( $post, $post_type, $_cond_value ) {
126
+ // get all taxonomies of the post
127
+ $term_ids = $this->get_object_terms( $post, $post_type );
128
+
129
+ return $this->can_display_ids( $term_ids, $_cond_value );
130
+ }
131
+
132
+ /**
133
+ * get all terms of a specific post or post type
134
+ *
135
+ * @param int $post id of the post
136
+ * @param string $post_type name of the post type
137
+ *
138
+ * @return arr $out ids of terms this post belongs to
139
+ */
140
+ protected function get_object_terms( $post, $post_type ) {
141
+
142
+ $post = (int) $post;
143
+ if ( ! $post ) {
144
+ return array();
145
+ }
146
+
147
+ // get post type taxonomies
148
+ $taxonomies = get_object_taxonomies( $post_type, 'objects' );
149
+
150
+ $term_ids = array();
151
+ foreach ( array_keys( $taxonomies ) as $taxonomy_slug ){
152
+
153
+ // get the terms related to post
154
+ $terms = get_the_terms( $post, $taxonomy_slug );
155
+
156
+ if ( ! empty( $terms ) ) {
157
+ foreach ( $terms as $term ) {
158
+ $term_ids[] = $term->term_id;
159
+ }
160
+ }
161
+ }
162
+
163
+ return $term_ids;
164
+ }
165
+
166
+ protected function can_display_ids( $ids, $_cond_value ) {
167
+ if ( isset( $_cond_value['include'] ) && ! empty( $_cond_value['include'] ) && $this->in_array( $ids, $_cond_value['include'] ) === false ){
168
+ return false;
169
+ }
170
+
171
+ if ( isset( $_cond_value['exclude'] ) && ! empty( $_cond_value['exclude'] ) && $this->in_array( $ids, $_cond_value['exclude'] ) === true ){
172
+ return false;
173
+ }
174
+
175
+ return true;
176
+ }
177
+
178
+ /**
179
+ * check display conditions
180
+ *
181
+ * @since 1.1.0 moved here from can_display()
182
+ * @return bool $can_display true if can be displayed in frontend
183
+ */
184
+ public function can_display( $can_display, $ad ) {
185
+ if ( ! $can_display ) {
186
+ return false;
187
+ }
188
+
189
+ $options = $ad->options();
190
+ if (
191
+ // test if anything is to be limited at all
192
+ ! isset( $options['conditions'] )
193
+ || ! is_array( $options['conditions'] )
194
+ // query arguments required
195
+ || ! isset( $options['wp_the_query'] )
196
+ // display ad if conditions are explicitely disabled
197
+ || ( isset( $options['conditions']['enabled'] ) && ! $options['conditions']['enabled'] )
198
+ ) {
199
+ return true;
200
+ }
201
+ $conditions = $options['conditions'];
202
+ $query = $options['wp_the_query'];
203
+ $post = isset( $options['post'] ) ? $options['post'] : null;
204
+
205
+ foreach ( $conditions as $_cond_key => $_cond_value ) {
206
+ $is_not_cond_all = ! isset( $_cond_value['all'] ) || empty( $_cond_value['all'] );
207
+ switch ( $_cond_key ){
208
+ // check for post ids
209
+ case 'postids' :
210
+ if (
211
+ isset( $post ) && isset( $post['id'] ) && $is_not_cond_all
212
+ && isset( $query['is_singular'] ) && $query['is_singular']
213
+ && ! $this->can_display_postids( $post['id'], $_cond_value )
214
+ ) {
215
+ return false;
216
+ }
217
+ break;
218
+
219
+ // check for category ids
220
+ case 'categoryids' :
221
+ // included
222
+ if (
223
+ isset( $post ) && isset( $post['id'] ) && $is_not_cond_all
224
+ && isset( $query['is_singular'] ) && $query['is_singular']
225
+ && ! $this->can_display_categoryids( $post['id'], $post['post_type'], $_cond_value )
226
+ ) {
227
+ return false;
228
+ }
229
+ break;
230
+
231
+ // check for included category archive ids
232
+ // @link http://codex.wordpress.org/Conditional_Tags#A_Category_Page
233
+ case 'categoryarchiveids' :
234
+ if (
235
+ isset( $query['term_id'] ) && $is_not_cond_all
236
+ && isset( $query['is_archive'] ) && $query['is_archive']
237
+ && ! $this->can_display_ids( $query['term_id'], $_cond_value )
238
+ ) {
239
+ return false;
240
+ }
241
+ break;
242
+
243
+ // check for included post types
244
+ case 'posttypes' :
245
+ // display everywhere, if include not set (= all is checked)
246
+ $post_type = isset( $post['post_type'] ) ? $post['post_type'] : false;
247
+ // TODO remove condition check for string; deprecated since 1.2.2
248
+ if ( $is_not_cond_all && ! $this->can_display_ids( $post_type, $_cond_value ) ) {
249
+ return false;
250
+ }
251
+ break;
252
+
253
+ // check is_front_page
254
+ // @link https://codex.wordpress.org/Conditional_Tags#The_Front_Page
255
+ case 'is_front_page' :
256
+ // check is_singular
257
+ // @link https://codex.wordpress.org/Conditional_Tags#A_Post_Type
258
+ case 'is_singular' :
259
+ // check is_archive
260
+ // @link https://codex.wordpress.org/Conditional_Tags#Any_Archive_Page
261
+ case 'is_archive' :
262
+ // check is_search
263
+ // @link https://codex.wordpress.org/Conditional_Tags#A_Search_Result_Page
264
+ case 'is_search' :
265
+ // check is_404
266
+ // @link https://codex.wordpress.org/Conditional_Tags#A_404_Not_Found_Page
267
+ case 'is_404' :
268
+ // check is_attachment
269
+ // @link https://codex.wordpress.org/Conditional_Tags#An_Attachment
270
+ case 'is_attachment' :
271
+ // check !is_main_query
272
+ // @link https://codex.wordpress.org/Function_Reference/is_main_query
273
+ case 'is_main_query' :
274
+ if ( $_cond_value == 0 && isset( $query[ $_cond_key ] ) && $query[ $_cond_key ] ) {
275
+ return false;
276
+ }
277
+ break;
278
+ }
279
+ }
280
+
281
+ return true;
282
+ }
283
+ }
modules/display-by-query/main.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+
3
+ new Advanced_Ads_Module_Display_By_Query;
modules/gadsense/includes/class-ad-type-adsense.php CHANGED
@@ -189,7 +189,7 @@ class Advanced_Ads_Ad_Type_Adsense extends Advanced_Ads_Ad_Type_Abstract {
189
  $output .= 'data-ad-slot="' . $slot_id . '" ' . "\n";
190
  $output .= 'data-ad-format="auto"></ins>' . "\n";
191
  $output .= '<script> ' . "\n";
192
- $output .= '(adsbygoogle = window.adsbygoogle || []).push({}); ' . "\n";
193
  $output .= '</script>' . "\n";
194
  }
195
 
189
  $output .= 'data-ad-slot="' . $slot_id . '" ' . "\n";
190
  $output .= 'data-ad-format="auto"></ins>' . "\n";
191
  $output .= '<script> ' . "\n";
192
+ $output .= apply_filters( 'advanced-ads-gadsense-responsive-adsbygoogle', '(adsbygoogle = window.adsbygoogle || []).push({}); ' . "\n");
193
  $output .= '</script>' . "\n";
194
  }
195
 
public/class-advanced-ads.php CHANGED
@@ -25,7 +25,7 @@ class Advanced_Ads {
25
  * @var string
26
  */
27
 
28
- const VERSION = '1.5.5';
29
 
30
  /**
31
  * post type slug
@@ -114,8 +114,8 @@ class Advanced_Ads {
114
  // only when not doing ajax
115
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
116
  Advanced_Ads_Ajax::get_instance();
117
- }
118
- add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
119
  }
120
 
121
  /**
@@ -167,6 +167,9 @@ class Advanced_Ads {
167
 
168
  // register hooks and filters for auto ad injection
169
  $this->init_injection( $options );
 
 
 
170
  }
171
 
172
  /**
@@ -321,7 +324,8 @@ class Advanced_Ads {
321
  $placements = get_option( 'advads-ads-placements', array() );
322
  foreach ( $placements as $_placement_id => $_placement ){
323
  if ( isset($_placement['type']) && 'header' == $_placement['type'] ){
324
- echo Advanced_Ads_Placements::output( $_placement_id );
 
325
  }
326
  }
327
  }
@@ -335,7 +339,8 @@ class Advanced_Ads {
335
  $placements = get_option( 'advads-ads-placements', array() );
336
  foreach ( $placements as $_placement_id => $_placement ){
337
  if ( isset($_placement['type']) && 'footer' == $_placement['type'] ){
338
- echo Advanced_Ads_Placements::output( $_placement_id );
 
339
  }
340
  }
341
  }
@@ -348,24 +353,31 @@ class Advanced_Ads {
348
  * @param str $content post content
349
  */
350
  public function inject_content($content = ''){
351
- // run only on single pages of public post types
352
  $public_post_types = get_post_types( array( 'public' => true, 'publicly_queryable' => true ), 'names', 'or' );
353
 
354
- if ( ! is_singular( $public_post_types ) ) { return $content; }
 
 
 
 
 
355
 
356
  $placements = get_option( 'advads-ads-placements', array() );
357
  foreach ( $placements as $_placement_id => $_placement ){
358
  if ( empty($_placement['item']) || ! isset($_placement['type']) ) { continue; }
 
359
 
360
  switch ( $_placement['type'] ) {
361
  case 'post_top':
362
- $content = Advanced_Ads_Placements::output( $_placement_id ) . $content;
 
363
  break;
364
  case 'post_bottom':
365
- $content .= Advanced_Ads_Placements::output( $_placement_id );
366
  break;
367
  case 'post_content':
368
- $content = Advanced_Ads_Placements::inject_in_content( $_placement_id, $_placement['options'], $content );
369
  break;
370
  }
371
  }
@@ -406,7 +418,7 @@ class Advanced_Ads {
406
  * @return arr $ad_placements
407
  */
408
  static public function get_ad_placements_array(){
409
- return self::get_instance()->get_model()->get_ad_placements_array();
410
  }
411
 
412
  /**
25
  * @var string
26
  */
27
 
28
+ const VERSION = '1.6';
29
 
30
  /**
31
  * post type slug
114
  // only when not doing ajax
115
  if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
116
  Advanced_Ads_Ajax::get_instance();
117
+ }
118
+ add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
119
  }
120
 
121
  /**
167
 
168
  // register hooks and filters for auto ad injection
169
  $this->init_injection( $options );
170
+
171
+ // allow add-ons to hook
172
+ do_action( 'advanced-ads-plugin-loaded' );
173
  }
174
 
175
  /**
324
  $placements = get_option( 'advads-ads-placements', array() );
325
  foreach ( $placements as $_placement_id => $_placement ){
326
  if ( isset($_placement['type']) && 'header' == $_placement['type'] ){
327
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
328
+ echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
329
  }
330
  }
331
  }
339
  $placements = get_option( 'advads-ads-placements', array() );
340
  foreach ( $placements as $_placement_id => $_placement ){
341
  if ( isset($_placement['type']) && 'footer' == $_placement['type'] ){
342
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
343
+ echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
344
  }
345
  }
346
  }
353
  * @param str $content post content
354
  */
355
  public function inject_content($content = ''){
356
+ // run only within the loop on single pages of public post types
357
  $public_post_types = get_post_types( array( 'public' => true, 'publicly_queryable' => true ), 'names', 'or' );
358
 
359
+ // check if admin allows injection in all places
360
+ $options = $this->plugin->options();
361
+ if( ! isset( $options['content-injection-everywhere'] ) ){
362
+ // check if this is a singular page within the loop
363
+ if ( ! is_singular( $public_post_types ) || ! in_the_loop() ) { return $content; }
364
+ }
365
 
366
  $placements = get_option( 'advads-ads-placements', array() );
367
  foreach ( $placements as $_placement_id => $_placement ){
368
  if ( empty($_placement['item']) || ! isset($_placement['type']) ) { continue; }
369
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
370
 
371
  switch ( $_placement['type'] ) {
372
  case 'post_top':
373
+ // TODO broken: does not serve placement but serves ad directly
374
+ $content = Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options ) . $content;
375
  break;
376
  case 'post_bottom':
377
+ $content .= Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
378
  break;
379
  case 'post_content':
380
+ $content = Advanced_Ads_Placements::inject_in_content( $_placement_id, $_options, $content );
381
  break;
382
  }
383
  }
418
  * @return arr $ad_placements
419
  */
420
  static public function get_ad_placements_array(){
421
+ return self::get_instance()->get_model()->get_ad_placements_array();
422
  }
423
 
424
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
4
  Tags: ads, ad, adsense, display, banner, advertisements, adverts, advert, monetization
5
  Requires at least: WP 3.5, PHP 5.3
6
  Tested up to: 4.2.2
7
- Stable tag: 1.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -111,7 +111,8 @@ Localizations: English, German, Italien, Portuguese
111
  > * Tracking – ad tracking and statistics – [more](https://wpadvancedads.com/add-ons/tracking/)
112
  > * Responsive Ads – create mobile ads or ads for specific browser sizes - [Demo](https://wpadvancedads.com/add-ons/responsive-ads/)
113
  > * Sticky Ads – increase click rates with fixed, sticky, and anchor ads - [Demo](https://wpadvancedads.com/sticky-ads/demo/)
114
- > * PopUp and Layer Ads – display ads and other content in layers and popups - [Demo](https://wpadvancedads.com/add-ons/layer-ads/)
 
115
 
116
  == Installation ==
117
 
@@ -174,6 +175,42 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
174
 
175
  == Changelog ==
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  = 1.5.5 =
178
 
179
  * fixed outdated links to the manual and feature requests
4
  Tags: ads, ad, adsense, display, banner, advertisements, adverts, advert, monetization
5
  Requires at least: WP 3.5, PHP 5.3
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
111
  > * Tracking – ad tracking and statistics – [more](https://wpadvancedads.com/add-ons/tracking/)
112
  > * Responsive Ads – create mobile ads or ads for specific browser sizes - [Demo](https://wpadvancedads.com/add-ons/responsive-ads/)
113
  > * Sticky Ads – increase click rates with fixed, sticky, and anchor ads - [Demo](https://wpadvancedads.com/sticky-ads/demo/)
114
+ > * PopUp and Layer Ads – display ads and other content in layers and popups - [Demo](https://wpadvancedads.com/add-ons/popup-and-layer-ads/)
115
+ > * Slider – create a simple slider from your ads – [more](https://wpadvancedads.com/add-ons/slider/)
116
 
117
  == Installation ==
118
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.6 =
179
+
180
+ THIS IS A MAJOR UPDATE, PLEASE HELP ME WITH YOUR BUG REPORTS
181
+
182
+ [Update post](https://wpadvancedads.com/advanced-ads-1-6)
183
+
184
+ Changes you can test:
185
+
186
+ * fixed ordered ad groups displaying ads with 0 ad weight
187
+ * fixed order of ad groups to deliver ad with highest weight first
188
+ * added option to allow ad injections on archive pages and outside the loop
189
+ * minor layout fix for update button after selecting rich content ad type
190
+ * fixed timestamp issues using GMT only now (might shift old ad expiry timestamps by timezone offset)
191
+
192
+ Changes under the hood:
193
+
194
+ * allow to cache groups when persistend object cache is available
195
+ * pass placement options to underlying ad/ group
196
+ * allow to exchange loaded ad ids for ajax callback
197
+ * fix override option for ad select
198
+ * wp query is now prepared as ad argument on selection
199
+ * moved query based display conditions to own module
200
+ * fixed ajax request parser
201
+ * actually serve placement on injection (and allow to use placement arguments)
202
+ * `advanced-ads-ajax-ad-select-init` action when ad is going to be selected by ajax call
203
+ * provide action when plugin was loaded
204
+
205
+ = 1.5.6 =
206
+
207
+ * check out the new [Slider add-on](https://wpadvancedads.com/add-ons/slider/)
208
+ * please [vote for your preferred support channel](http://webgilde.com/en/how-would-you-like-to-get-help/)
209
+ * display usage help after an ad was published
210
+ * fixed AdSense ads counting when injected outside the loop
211
+ * added better explanation for visitor conditions
212
+ * updated German translation
213
+
214
  = 1.5.5 =
215
 
216
  * fixed outdated links to the manual and feature requests
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit65c2949eec61b8641be7ee0f5b4dcaa4::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit6af0e637fcbe1e12b3cef5423284d5e1::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -351,7 +351,7 @@ class ClassLoader
351
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
  if (0 === strpos($class, $prefix)) {
353
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
357
  }
@@ -361,7 +361,7 @@ class ClassLoader
361
 
362
  // PSR-4 fallback dirs
363
  foreach ($this->fallbackDirsPsr4 as $dir) {
364
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
  return $file;
366
  }
367
  }
@@ -380,7 +380,7 @@ class ClassLoader
380
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
  if (0 === strpos($class, $prefix)) {
382
  foreach ($dirs as $dir) {
383
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
  return $file;
385
  }
386
  }
@@ -390,7 +390,7 @@ class ClassLoader
390
 
391
  // PSR-0 fallback dirs
392
  foreach ($this->fallbackDirsPsr0 as $dir) {
393
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
  return $file;
395
  }
396
  }
351
  foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
  if (0 === strpos($class, $prefix)) {
353
  foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
  return $file;
356
  }
357
  }
361
 
362
  // PSR-4 fallback dirs
363
  foreach ($this->fallbackDirsPsr4 as $dir) {
364
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
  return $file;
366
  }
367
  }
380
  foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
  if (0 === strpos($class, $prefix)) {
382
  foreach ($dirs as $dir) {
383
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
  return $file;
385
  }
386
  }
390
 
391
  // PSR-0 fallback dirs
392
  foreach ($this->fallbackDirsPsr0 as $dir) {
393
+ if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
  return $file;
395
  }
396
  }
vendor/composer/autoload_classmap.php CHANGED
@@ -83,6 +83,7 @@ return array(
83
  'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
84
  'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
85
  'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
 
86
  'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
87
  'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
88
  );
83
  'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
84
  'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
85
  'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
86
+ 'EDD_SL_Plugin_Updater' => $baseDir . '/classes/EDD_SL_Plugin_Updater.php',
87
  'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
88
  'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
89
  );
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit65c2949eec61b8641be7ee0f5b4dcaa4 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit65c2949eec61b8641be7ee0f5b4dcaa4 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit65c2949eec61b8641be7ee0f5b4dcaa4', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit65c2949eec61b8641be7ee0f5b4dcaa4', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit6af0e637fcbe1e12b3cef5423284d5e1 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6af0e637fcbe1e12b3cef5423284d5e1', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6af0e637fcbe1e12b3cef5423284d5e1', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);