Advanced Ads - Version 1.7.19

Version Description

  • check if local storage is supported by the browser, if needed
  • use flexbox layout for longer input fields in conditions
  • use advanced-ads-admin-max-terms filter also for limit in author condition
  • updated EDD Updater Class for add-on updates
  • fixed error message when all placements were removed
  • fixed adblock disguise folder not working correctly on https pages
Download this release

Release Info

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

Code changes from version 1.7.18 to 1.7.19

admin/assets/css/admin.css CHANGED
@@ -102,9 +102,11 @@ h2.hndle .advads-hndlelinks a + a { margin-left: 1em; }
102
  #advads-display-conditions-new select { text-transform: capitalize; }
103
  .advads-display-conditions-remove + h5 { display: inline-block; margin-top: 0; margin-left: 1em; }
104
  select + .advads-conditions-single { display: inline-block; }
105
- .advads-conditions-table { border-collapse: collapse; }
106
  .advads-conditions-table td, .advads-conditions-table td * { vertical-align: top; }
107
  .advads-conditions-table > tbody > tr { background: #eee; }
 
 
108
  .advads-conditions-table > tbody > tr > td:last-child { padding-right: 10px; }
109
  .advads-conditions-table select { vertical-align: inherit; margin: 0; }
110
  .advads-conditions-table tr:first-child.advads-conditions-connector { display: none; }
102
  #advads-display-conditions-new select { text-transform: capitalize; }
103
  .advads-display-conditions-remove + h5 { display: inline-block; margin-top: 0; margin-left: 1em; }
104
  select + .advads-conditions-single { display: inline-block; }
105
+ .advads-conditions-table { border-collapse: collapse; width: 100%; max-width: 850px; }
106
  .advads-conditions-table td, .advads-conditions-table td * { vertical-align: top; }
107
  .advads-conditions-table > tbody > tr { background: #eee; }
108
+ .advads-condition-line-wrap { display: flex; flex-wrap: wrap; }
109
+ .advads-condition-line-wrap > input { flex-grow: 1; }
110
  .advads-conditions-table > tbody > tr > td:last-child { padding-right: 10px; }
111
  .advads-conditions-table select { vertical-align: inherit; margin: 0; }
112
  .advads-conditions-table tr:first-child.advads-conditions-connector { display: none; }
advanced-ads.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.7.18
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
39
  // general and global slug, e.g. to store options in WP, textdomain
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.7.18' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.7.19
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
39
  // general and global slug, e.g. to store options in WP, textdomain
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
+ define( 'ADVADS_VERSION', '1.7.19' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
classes/EDD_SL_Plugin_Updater.php CHANGED
@@ -1,16 +1,13 @@
1
  <?php
2
 
3
- // uncomment this line for testing
4
- //set_site_transient( 'update_plugins', null );
5
-
6
  // Exit if accessed directly
7
  if ( ! defined( 'ABSPATH' ) ) exit;
8
 
9
  /**
10
  * Allows plugins to use their own update API.
11
  *
12
- * @author Pippin Williamson
13
- * @version 1.6.6
14
  */
15
  class EDD_SL_Plugin_Updater {
16
 
@@ -35,15 +32,15 @@ class EDD_SL_Plugin_Updater {
35
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
36
 
37
  global $edd_plugin_data;
38
-
39
  $this->api_url = trailingslashit( $_api_url );
40
  $this->api_data = $_api_data;
41
  $this->name = plugin_basename( $_plugin_file );
42
  $this->slug = basename( $_plugin_file, '.php' );
43
  $this->version = $_api_data['version'];
44
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
45
-
46
- $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] ) );
47
 
48
  $edd_plugin_data[ $this->slug ] = $this->api_data;
49
 
@@ -60,10 +57,10 @@ class EDD_SL_Plugin_Updater {
60
  * @return void
61
  */
62
  public function init() {
63
-
64
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
65
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
66
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
67
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
68
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
69
 
@@ -85,7 +82,7 @@ class EDD_SL_Plugin_Updater {
85
  public function check_update( $_transient_data ) {
86
 
87
  global $pagenow;
88
-
89
  if ( ! is_object( $_transient_data ) ) {
90
  $_transient_data = new stdClass;
91
  }
@@ -101,7 +98,7 @@ class EDD_SL_Plugin_Updater {
101
  $version_info = $this->get_cached_version_info();
102
 
103
  if ( false === $version_info ) {
104
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
105
 
106
  $this->set_version_info_cache( $version_info );
107
 
@@ -115,7 +112,7 @@ class EDD_SL_Plugin_Updater {
115
 
116
  }
117
 
118
- $_transient_data->last_checked = time();
119
  $_transient_data->checked[ $this->name ] = $this->version;
120
 
121
  }
@@ -130,7 +127,7 @@ class EDD_SL_Plugin_Updater {
130
  * @param array $plugin
131
  */
132
  public function show_update_notification( $file, $plugin ) {
133
-
134
  if ( is_network_admin() ) {
135
  return;
136
  }
@@ -159,7 +156,7 @@ class EDD_SL_Plugin_Updater {
159
  $version_info = $this->get_cached_version_info();
160
 
161
  if ( false === $version_info ) {
162
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
163
 
164
  $this->set_version_info_cache( $version_info );
165
  }
@@ -174,7 +171,7 @@ class EDD_SL_Plugin_Updater {
174
 
175
  }
176
 
177
- $update_cache->last_checked = time();
178
  $update_cache->checked[ $this->name ] = $this->version;
179
 
180
  set_site_transient( 'update_plugins', $update_cache );
@@ -236,7 +233,7 @@ class EDD_SL_Plugin_Updater {
236
  * @return object $_data
237
  */
238
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
239
-
240
  if ( $_action != 'plugin_information' ) {
241
 
242
  return $_data;
@@ -253,18 +250,18 @@ class EDD_SL_Plugin_Updater {
253
  'slug' => $this->slug,
254
  'is_ssl' => is_ssl(),
255
  'fields' => array(
256
- 'banners' => false, // These will be supported soon hopefully
257
  'reviews' => false
258
  )
259
  );
260
 
261
- $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] ) );
262
-
263
  // Get the transient where we store the api request for this plugin for 24 hours
264
  $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
265
 
266
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
267
- if ( empty( $edd_api_request_transient ) ){
268
 
269
  $api_response = $this->api_request( 'plugin_information', $to_send );
270
 
@@ -275,6 +272,28 @@ class EDD_SL_Plugin_Updater {
275
  $_data = $api_response;
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  }
279
 
280
  return $_data;
@@ -309,7 +328,7 @@ class EDD_SL_Plugin_Updater {
309
  private function api_request( $_action, $_data ) {
310
 
311
  global $wp_version;
312
-
313
  $data = array_merge( $this->api_data, $_data );
314
 
315
  if ( $data['slug'] != $this->slug ) {
@@ -325,10 +344,11 @@ class EDD_SL_Plugin_Updater {
325
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
326
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
327
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
 
328
  'slug' => $data['slug'],
329
  'author' => $data['author'],
330
  'url' => home_url(),
331
- 'beta' => isset( $data['beta'] ) ? $data['beta'] : false,
332
  );
333
 
334
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -343,11 +363,21 @@ class EDD_SL_Plugin_Updater {
343
  $request = false;
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
346
  return $request;
347
  }
348
 
349
  public function show_changelog() {
350
-
351
  global $edd_plugin_data;
352
 
353
  if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
@@ -363,11 +393,12 @@ class EDD_SL_Plugin_Updater {
363
  }
364
 
365
  if( ! current_user_can( 'update_plugins' ) ) {
366
- wp_die( __( 'You do not have permission to install plugin updates', 'advanced-ads' ), __( 'Error', 'advanced-ads' ), array( 'response' => 403 ) );
367
  }
368
 
369
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
370
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
 
371
  $version_info = $this->get_cached_version_info( $cache_key );
372
 
373
  if( false === $version_info ) {
@@ -378,7 +409,8 @@ class EDD_SL_Plugin_Updater {
378
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
379
  'slug' => $_REQUEST['slug'],
380
  'author' => $data['author'],
381
- 'url' => home_url()
 
382
  );
383
 
384
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -387,12 +419,19 @@ class EDD_SL_Plugin_Updater {
387
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
388
  }
389
 
 
390
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
391
  $version_info->sections = maybe_unserialize( $version_info->sections );
392
  } else {
393
  $version_info = false;
394
  }
395
 
 
 
 
 
 
 
396
  $this->set_version_info_cache( $version_info, $cache_key );
397
 
398
  }
@@ -405,7 +444,7 @@ class EDD_SL_Plugin_Updater {
405
  }
406
 
407
  public function get_cached_version_info( $cache_key = '' ) {
408
-
409
  if( empty( $cache_key ) ) {
410
  $cache_key = $this->cache_key;
411
  }
@@ -425,14 +464,14 @@ class EDD_SL_Plugin_Updater {
425
  if( empty( $cache_key ) ) {
426
  $cache_key = $this->cache_key;
427
  }
428
-
429
  $data = array(
430
  'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
431
  'value' => json_encode( $value )
432
  );
433
 
434
- update_option( $this->cache_key, $data );
435
 
436
  }
437
 
438
- }
1
  <?php
2
 
 
 
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) exit;
5
 
6
  /**
7
  * Allows plugins to use their own update API.
8
  *
9
+ * @author Easy Digital Downloads
10
+ * @version 1.6.11
11
  */
12
  class EDD_SL_Plugin_Updater {
13
 
32
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
33
 
34
  global $edd_plugin_data;
35
+
36
  $this->api_url = trailingslashit( $_api_url );
37
  $this->api_data = $_api_data;
38
  $this->name = plugin_basename( $_plugin_file );
39
  $this->slug = basename( $_plugin_file, '.php' );
40
  $this->version = $_api_data['version'];
41
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
+ $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
43
+ $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
44
 
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
57
  * @return void
58
  */
59
  public function init() {
60
+
61
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
+ remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
64
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
 
82
  public function check_update( $_transient_data ) {
83
 
84
  global $pagenow;
85
+
86
  if ( ! is_object( $_transient_data ) ) {
87
  $_transient_data = new stdClass;
88
  }
98
  $version_info = $this->get_cached_version_info();
99
 
100
  if ( false === $version_info ) {
101
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
102
 
103
  $this->set_version_info_cache( $version_info );
104
 
112
 
113
  }
114
 
115
+ $_transient_data->last_checked = current_time( 'timestamp' );
116
  $_transient_data->checked[ $this->name ] = $this->version;
117
 
118
  }
127
  * @param array $plugin
128
  */
129
  public function show_update_notification( $file, $plugin ) {
130
+
131
  if ( is_network_admin() ) {
132
  return;
133
  }
156
  $version_info = $this->get_cached_version_info();
157
 
158
  if ( false === $version_info ) {
159
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
160
 
161
  $this->set_version_info_cache( $version_info );
162
  }
171
 
172
  }
173
 
174
+ $update_cache->last_checked = current_time( 'timestamp' );
175
  $update_cache->checked[ $this->name ] = $this->version;
176
 
177
  set_site_transient( 'update_plugins', $update_cache );
233
  * @return object $_data
234
  */
235
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
236
+
237
  if ( $_action != 'plugin_information' ) {
238
 
239
  return $_data;
250
  'slug' => $this->slug,
251
  'is_ssl' => is_ssl(),
252
  'fields' => array(
253
+ 'banners' => array(),
254
  'reviews' => false
255
  )
256
  );
257
 
258
+ $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
259
+
260
  // Get the transient where we store the api request for this plugin for 24 hours
261
  $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
262
 
263
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
264
+ if ( empty( $edd_api_request_transient ) ) {
265
 
266
  $api_response = $this->api_request( 'plugin_information', $to_send );
267
 
272
  $_data = $api_response;
273
  }
274
 
275
+ } else {
276
+ $_data = $edd_api_request_transient;
277
+ }
278
+
279
+ // Convert sections into an associative array, since we're getting an object, but Core expects an array.
280
+ if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
281
+ $new_sections = array();
282
+ foreach ( $_data->sections as $key => $key ) {
283
+ $new_sections[ $key ] = $key;
284
+ }
285
+
286
+ $_data->sections = $new_sections;
287
+ }
288
+
289
+ // Convert banners into an associative array, since we're getting an object, but Core expects an array.
290
+ if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
291
+ $new_banners = array();
292
+ foreach ( $_data->banners as $key => $key ) {
293
+ $new_banners[ $key ] = $key;
294
+ }
295
+
296
+ $_data->banners = $new_banners;
297
  }
298
 
299
  return $_data;
328
  private function api_request( $_action, $_data ) {
329
 
330
  global $wp_version;
331
+
332
  $data = array_merge( $this->api_data, $_data );
333
 
334
  if ( $data['slug'] != $this->slug ) {
344
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
345
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
346
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
347
+ 'version' => isset( $data['version'] ) ? $data['version'] : false,
348
  'slug' => $data['slug'],
349
  'author' => $data['author'],
350
  'url' => home_url(),
351
+ 'beta' => ! empty( $data['beta'] ),
352
  );
353
 
354
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
363
  $request = false;
364
  }
365
 
366
+ if ( $request && isset( $request->banners ) ) {
367
+ $request->banners = maybe_unserialize( $request->banners );
368
+ }
369
+
370
+ if( ! empty( $request->sections ) ) {
371
+ foreach( $request->sections as $key => $section ) {
372
+ $request->$key = (array) $section;
373
+ }
374
+ }
375
+
376
  return $request;
377
  }
378
 
379
  public function show_changelog() {
380
+
381
  global $edd_plugin_data;
382
 
383
  if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
393
  }
394
 
395
  if( ! current_user_can( 'update_plugins' ) ) {
396
+ wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
397
  }
398
 
399
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
400
+ $beta = ! empty( $data['beta'] ) ? true : false;
401
+ $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
402
  $version_info = $this->get_cached_version_info( $cache_key );
403
 
404
  if( false === $version_info ) {
409
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
410
  'slug' => $_REQUEST['slug'],
411
  'author' => $data['author'],
412
+ 'url' => home_url(),
413
+ 'beta' => ! empty( $data['beta'] )
414
  );
415
 
416
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
419
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
420
  }
421
 
422
+
423
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
424
  $version_info->sections = maybe_unserialize( $version_info->sections );
425
  } else {
426
  $version_info = false;
427
  }
428
 
429
+ if( ! empty( $version_info ) ) {
430
+ foreach( $version_info->sections as $key => $section ) {
431
+ $version_info->$key = (array) $section;
432
+ }
433
+ }
434
+
435
  $this->set_version_info_cache( $version_info, $cache_key );
436
 
437
  }
444
  }
445
 
446
  public function get_cached_version_info( $cache_key = '' ) {
447
+
448
  if( empty( $cache_key ) ) {
449
  $cache_key = $this->cache_key;
450
  }
464
  if( empty( $cache_key ) ) {
465
  $cache_key = $this->cache_key;
466
  }
467
+
468
  $data = array(
469
  'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
470
  'value' => json_encode( $value )
471
  );
472
 
473
+ update_option( $cache_key, $data );
474
 
475
  }
476
 
477
+ }
classes/display-conditions.php CHANGED
@@ -257,8 +257,9 @@ class Advanced_Ads_Display_Conditions {
257
  <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
258
  <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads'); ?></option>
259
  </select><?php
260
- // set defaults
261
- $authors = get_users(array('who' => 'authors', 'orderby' => 'nicename', 'number' => 50));
 
262
  ?><div class="advads-conditions-single advads-buttonset"><?php
263
  foreach ($authors as $_author) {
264
  if ( in_array($_author->ID, $values ) ) {
@@ -269,7 +270,8 @@ class Advanced_Ads_Display_Conditions {
269
  ?><label class="button ui-button" for="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID;
270
  ?>"><?php echo $_author->display_name; ?></label><input type="checkbox" id="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID; ?>" name="<?php echo $name; ?>[value][]" <?php checked($_val, 1); ?> value="<?php echo $_author->ID; ?>"><?php
271
  }
272
- ?><p class="advads-conditions-not-selected advads-error-message"><?php _ex( 'Please select some items.', 'Error message shown when no display condition term is selected', 'advanced-ads' ); ?></p></div><?php
 
273
  }
274
 
275
  /**
257
  <option value="is" <?php selected('is', $operator); ?>><?php _e('is', 'advanced-ads'); ?></option>
258
  <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('is not', 'advanced-ads'); ?></option>
259
  </select><?php
260
+ // set defaults
261
+ $max_authors = absint( apply_filters( 'advanced-ads-admin-max-terms', 50 ) );
262
+ $authors = get_users(array('who' => 'authors', 'orderby' => 'nicename', 'number' => $max_authors ) );
263
  ?><div class="advads-conditions-single advads-buttonset"><?php
264
  foreach ($authors as $_author) {
265
  if ( in_array($_author->ID, $values ) ) {
270
  ?><label class="button ui-button" for="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID;
271
  ?>"><?php echo $_author->display_name; ?></label><input type="checkbox" id="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID; ?>" name="<?php echo $name; ?>[value][]" <?php checked($_val, 1); ?> value="<?php echo $_author->ID; ?>"><?php
272
  }
273
+ ?><p class="advads-conditions-not-selected advads-error-message"><?php _ex( 'Please select some items.', 'Error message shown when no display condition term is selected', 'advanced-ads' ); ?></p></div>
274
+ <?php if( count( $authors ) >= $max_authors ) : ?><p class="advads-error-message"><?php printf( __( 'Only %d elements are displayed above. Use the <code>advanced-ads-admin-max-terms</code> filter to change this limit according to <a href="%s" target="_blank">this page</a>.', 'advanced-ads' ), $max_authors, ADVADS_URL . 'codex/filter-hooks//#utm_source=advanced-ads&utm_medium=link&utm_campaign=author-term-limit' ); ?></p><?php endif;
275
  }
276
 
277
  /**
classes/visitor-conditions.php CHANGED
@@ -189,18 +189,20 @@ class Advanced_Ads_Visitor_Conditions {
189
  $operator = isset( $options['operator'] ) ? $options['operator'] : 'contains';
190
 
191
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
192
- <select name="<?php echo $name; ?>[operator]">
193
- <option value="contain" <?php selected( 'contain', $operator ); ?>><?php _e( 'contains', 'advanced-ads' ); ?></option>
194
- <option value="start" <?php selected( 'start', $operator ); ?>><?php _e( 'starts with', 'advanced-ads' ); ?></option>
195
- <option value="end" <?php selected( 'end', $operator ); ?>><?php _e( 'ends with', 'advanced-ads' ); ?></option>
196
- <option value="match" <?php selected( 'match', $operator ); ?>><?php _e( 'matches', 'advanced-ads' ); ?></option>
197
- <option value="regex" <?php selected( 'regex', $operator ); ?>><?php _e( 'matches regex', 'advanced-ads' ); ?></option>
198
- <option value="contain_not" <?php selected( 'contain_not', $operator ); ?>><?php _e( 'does not contain', 'advanced-ads' ); ?></option>
199
- <option value="start_not" <?php selected( 'start_not', $operator ); ?>><?php _e( 'does not start with', 'advanced-ads' ); ?></option>
200
- <option value="end_not" <?php selected( 'end_not', $operator ); ?>><?php _e( 'does not end with', 'advanced-ads' ); ?></option>
201
- <option value="match_not" <?php selected( 'match_not', $operator ); ?>><?php _e( 'does not match', 'advanced-ads' ); ?></option>
202
- <option value="regex_not" <?php selected( 'regex_not', $operator ); ?>><?php _e( 'does not match regex', 'advanced-ads' ); ?></option>
203
- </select><input type="text" name="<?php echo $name; ?>[value]" value="<?php echo $value; ?>"/>
 
 
204
  <p class="description"><?php echo $type_options[ $options['type'] ]['description']; ?></p><?php
205
  }
206
 
189
  $operator = isset( $options['operator'] ) ? $options['operator'] : 'contains';
190
 
191
  ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
192
+ <div class="advads-condition-line-wrap">
193
+ <select name="<?php echo $name; ?>[operator]">
194
+ <option value="contain" <?php selected( 'contain', $operator ); ?>><?php _e( 'contains', 'advanced-ads' ); ?></option>
195
+ <option value="start" <?php selected( 'start', $operator ); ?>><?php _e( 'starts with', 'advanced-ads' ); ?></option>
196
+ <option value="end" <?php selected( 'end', $operator ); ?>><?php _e( 'ends with', 'advanced-ads' ); ?></option>
197
+ <option value="match" <?php selected( 'match', $operator ); ?>><?php _e( 'matches', 'advanced-ads' ); ?></option>
198
+ <option value="regex" <?php selected( 'regex', $operator ); ?>><?php _e( 'matches regex', 'advanced-ads' ); ?></option>
199
+ <option value="contain_not" <?php selected( 'contain_not', $operator ); ?>><?php _e( 'does not contain', 'advanced-ads' ); ?></option>
200
+ <option value="start_not" <?php selected( 'start_not', $operator ); ?>><?php _e( 'does not start with', 'advanced-ads' ); ?></option>
201
+ <option value="end_not" <?php selected( 'end_not', $operator ); ?>><?php _e( 'does not end with', 'advanced-ads' ); ?></option>
202
+ <option value="match_not" <?php selected( 'match_not', $operator ); ?>><?php _e( 'does not match', 'advanced-ads' ); ?></option>
203
+ <option value="regex_not" <?php selected( 'regex_not', $operator ); ?>><?php _e( 'does not match regex', 'advanced-ads' ); ?></option>
204
+ </select><input type="text" name="<?php echo $name; ?>[value]" value="<?php echo $value; ?>"/>
205
+ </div>
206
  <p class="description"><?php echo $type_options[ $options['type'] ]['description']; ?></p><?php
207
  }
208
 
modules/ad-blocker/classes/plugin.php CHANGED
@@ -15,6 +15,13 @@ class Advanced_Ads_Ad_Blocker
15
  */
16
  protected $options;
17
 
 
 
 
 
 
 
 
18
  /**
19
  * Initialize the module
20
  */
@@ -25,6 +32,7 @@ class Advanced_Ads_Ad_Blocker
25
  ! empty ( $options['module_can_work'] ) &&
26
  $options['upload_dir']
27
  ) {
 
28
  add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
29
  }
30
  }
@@ -91,7 +99,8 @@ class Advanced_Ads_Ad_Blocker
91
  public function clean_up_filename( $file ) {
92
  $options = $this->options();
93
  $upload_dir = $options['upload_dir'];
94
- $url = str_replace( WP_PLUGIN_URL, '', $file );
 
95
  if ( isset( $options['lookup_table'][ $url ] ) && is_array( $options['lookup_table'][ $url ] ) && isset( $options['lookup_table'][ $url ]['path'] ) ) {
96
  return trailingslashit( $upload_dir['baseurl'] ) . trailingslashit( $options['folder_name'] ) . $options['lookup_table'][ $url ]['path'];
97
  } elseif ( isset( $options['lookup_table'][ $url ] ) ) {
@@ -130,6 +139,8 @@ class Advanced_Ads_Ad_Blocker
130
  if ( $upload_dir['error'] ) {
131
  $this->options['upload_dir'] = false;
132
  } else {
 
 
133
  // array, that has indices 'basedir' and 'baseurl'
134
  $this->options['upload_dir'] = $upload_dir;
135
  }
15
  */
16
  protected $options;
17
 
18
+ /**
19
+ * plugins directory URL
20
+ *
21
+ * @var string
22
+ */
23
+ protected $plugins_url;
24
+
25
  /**
26
  * Initialize the module
27
  */
32
  ! empty ( $options['module_can_work'] ) &&
33
  $options['upload_dir']
34
  ) {
35
+ $this->plugins_url = plugins_url();
36
  add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
37
  }
38
  }
99
  public function clean_up_filename( $file ) {
100
  $options = $this->options();
101
  $upload_dir = $options['upload_dir'];
102
+ $url = str_replace( $this->plugins_url, '', $file );
103
+
104
  if ( isset( $options['lookup_table'][ $url ] ) && is_array( $options['lookup_table'][ $url ] ) && isset( $options['lookup_table'][ $url ]['path'] ) ) {
105
  return trailingslashit( $upload_dir['baseurl'] ) . trailingslashit( $options['folder_name'] ) . $options['lookup_table'][ $url ]['path'];
106
  } elseif ( isset( $options['lookup_table'][ $url ] ) ) {
139
  if ( $upload_dir['error'] ) {
140
  $this->options['upload_dir'] = false;
141
  } else {
142
+ $upload_dir['url'] = set_url_scheme( $upload_dir['url'] );
143
+ $upload_dir['baseurl'] = set_url_scheme( $upload_dir['baseurl'] );
144
  // array, that has indices 'basedir' and 'baseurl'
145
  $this->options['upload_dir'] = $upload_dir;
146
  }
public/assets/js/advanced.js CHANGED
@@ -1 +1 @@
1
- advads={supports_localstorage:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(a){return!1}},max_per_session:function(a,b){var c=1;if(void 0!==b&&0!==parseInt(b)||(b=1),this.cookie_exists(a)){if(this.get_cookie(a)>=b)return!0;c+=parseInt(this.get_cookie(a))}return this.set_cookie(a,c),!1},count_up:function(a,b){var c=1;this.cookie_exists(a)&&(c+=parseInt(this.get_cookie(a))),this.set_cookie(a,c)},set_cookie_exists:function(a){return!!get_cookie(a)||(set_cookie(a,"",0),!1)},get_cookie:function(a){var b,c,d,e=document.cookie.split(";");for(b=0;b<e.length;b++)if(c=e[b].substr(0,e[b].indexOf("=")),d=e[b].substr(e[b].indexOf("=")+1),c=c.replace(/^\s+|\s+$/g,""),c===a)return unescape(d)},set_cookie:function(a,b,c,d,e,f){var g=24*c*60*60;this.set_cookie_sec(a,b,g,d,e,f)},set_cookie_sec:function(a,b,c,d,e,f){var g=new Date;g.setSeconds(g.getSeconds()+parseInt(c)),document.cookie=a+"="+escape(b)+(null==c?"":"; expires="+g.toUTCString())+(null==d?"; path=/":"; path="+d)+(null==e?"":"; domain="+e)+(null==f?"":"; secure")},cookie_exists:function(a){var b=this.get_cookie(a);return null!==b&&""!==b&&void 0!==b},move:function(a,b,c){var d=jQuery(a);if("undefined"==typeof c&&(c={}),"undefined"==typeof c.css&&(c.css={}),"undefined"==typeof c.method&&(c.method="prependTo"),""===b&&"undefined"!=typeof c.target)switch(c.target){case"wrapper":var e="left";"undefined"!=typeof c.offset&&(e=c.offset),b=this.find_wrapper(a,e)}switch("undefined"==typeof c.moveintohidden&&(b=jQuery(b).filter(":visible")),c.method){case"insertBefore":d.insertBefore(b);break;case"insertAfter":d.insertAfter(b);break;case"appendTo":d.appendTo(b);break;case"prependTo":d.prependTo(b);break;default:d.prependTo(b)}},fix_element:function(a,b){var c=jQuery(a),d=c.parent();"static"!==d.css("position")&&""!==d.css("position")||d.css("position","relative"),"undefined"!=typeof b&&b.is_invisible&&c.show();var e=parseInt(c.offset().top),f=parseInt(c.offset().left);"undefined"!=typeof b&&b.is_invisible&&c.hide(),c.css("position","fixed").css("top",e+"px").css("left",f+"px")},find_wrapper:function(a,b){var c;return jQuery("body").children().each(function(d,e){if(e.id!==a.substring(1)){var f=jQuery(e);if("right"===b&&f.offset().left+jQuery(f).width()<jQuery(window).width()||"left"===b&&f.offset().left>0)return"static"!==f.css("position")&&""!==f.css("position")||f.css("position","relative"),c=e,!1}}),c},center_fixed_element:function(a){var b=jQuery(a),c=jQuery(window).width()/2-parseInt(b.css("width"))/2;b.css("left",c+"px")},center_vertically:function(a){var b=jQuery(a),c=jQuery(window).height()/2-parseInt(b.css("height"))/2;b.css("top",c+"px")},close:function(a){var b=jQuery(a);b.remove()}},jQuery(document).ready(function(){if(advads.supports_localstorage()&&localStorage.getItem("advads_frontend_picker")){var a,b=jQuery("<div id='advads-picker-overlay'>"),c=[document.body,document.documentElement,document];b.css({position:"absolute",border:"solid 2px #428bca",backgroundColor:"rgba(66,139,202,0.5)",boxSizing:"border-box",zIndex:1e6,pointerEvents:"none"}).prependTo("body"),jQuery(document).mousemove(function(d){if(d.target!==a){if(~c.indexOf(d.target))return a=null,void b.hide();var e=jQuery(d.target),f=e.offset(),g=e.outerWidth(),h=e.outerHeight();a=d.target,b.css({top:f.top,left:f.left,width:g,height:h}).show(),console.log(jQuery(a).getPath())}}),jQuery(document).click(function(b){var c=jQuery(a).getPath();localStorage.setItem("advads_frontend_element",c),window.location=localStorage.getItem("advads_prev_url")})}}),jQuery.fn.extend({getPath:function(a,b){if("undefined"==typeof a&&(a=""),"undefined"==typeof b&&(b=0),this.is("html"))return"html > "+a;if(3===b)return a;var c=this.get(0).nodeName.toLowerCase(),d=this.attr("id"),e=this.attr("class");return b+=1,"undefined"==typeof d||/\d/.test(d)?"undefined"!=typeof e&&(e=e.split(/[\s\n]+/),e=jQuery.grep(e,function(a,b){return!/\d/.test(a)}),e.length&&(c+="."+e.slice(0,2).join("."))):c+="#"+d,this.siblings(c).length&&(c+=":eq("+this.siblings(c).addBack().not("#advads-picker-overlay").index(this)+")"),""===a?this.parent().getPath(c,b):this.parent().getPath(c+" > "+a,b)}});
1
+ advads={supports_localstorage:function(){"use strict";try{return window&&window.hasOwnProperty("localStorage")&&null!==window.localStorage}catch(a){return!1}},max_per_session:function(a,b){var c=1;if(void 0!==b&&0!==parseInt(b)||(b=1),this.cookie_exists(a)){if(this.get_cookie(a)>=b)return!0;c+=parseInt(this.get_cookie(a))}return this.set_cookie(a,c),!1},count_up:function(a,b){var c=1;this.cookie_exists(a)&&(c+=parseInt(this.get_cookie(a))),this.set_cookie(a,c)},set_cookie_exists:function(a){return!!get_cookie(a)||(set_cookie(a,"",0),!1)},get_cookie:function(a){var b,c,d,e=document.cookie.split(";");for(b=0;b<e.length;b++)if(c=e[b].substr(0,e[b].indexOf("=")),d=e[b].substr(e[b].indexOf("=")+1),c=c.replace(/^\s+|\s+$/g,""),c===a)return unescape(d)},set_cookie:function(a,b,c,d,e,f){var g=24*c*60*60;this.set_cookie_sec(a,b,g,d,e,f)},set_cookie_sec:function(a,b,c,d,e,f){var g=new Date;g.setSeconds(g.getSeconds()+parseInt(c)),document.cookie=a+"="+escape(b)+(null==c?"":"; expires="+g.toUTCString())+(null==d?"; path=/":"; path="+d)+(null==e?"":"; domain="+e)+(null==f?"":"; secure")},cookie_exists:function(a){var b=this.get_cookie(a);return null!==b&&""!==b&&void 0!==b},move:function(a,b,c){var d=jQuery(a);if("undefined"==typeof c&&(c={}),"undefined"==typeof c.css&&(c.css={}),"undefined"==typeof c.method&&(c.method="prependTo"),""===b&&"undefined"!=typeof c.target)switch(c.target){case"wrapper":var e="left";"undefined"!=typeof c.offset&&(e=c.offset),b=this.find_wrapper(a,e)}switch("undefined"==typeof c.moveintohidden&&(b=jQuery(b).filter(":visible")),c.method){case"insertBefore":d.insertBefore(b);break;case"insertAfter":d.insertAfter(b);break;case"appendTo":d.appendTo(b);break;case"prependTo":d.prependTo(b);break;default:d.prependTo(b)}},fix_element:function(a,b){var c=jQuery(a),d=c.parent();"static"!==d.css("position")&&""!==d.css("position")||d.css("position","relative"),"undefined"!=typeof b&&b.is_invisible&&c.show();var e=parseInt(c.offset().top),f=parseInt(c.offset().left);"undefined"!=typeof b&&b.is_invisible&&c.hide(),c.css("position","fixed").css("top",e+"px").css("left",f+"px")},find_wrapper:function(a,b){var c;return jQuery("body").children().each(function(d,e){if(e.id!==a.substring(1)){var f=jQuery(e);if("right"===b&&f.offset().left+jQuery(f).width()<jQuery(window).width()||"left"===b&&f.offset().left>0)return"static"!==f.css("position")&&""!==f.css("position")||f.css("position","relative"),c=e,!1}}),c},center_fixed_element:function(a){var b=jQuery(a),c=jQuery(window).width()/2-parseInt(b.css("width"))/2;b.css("left",c+"px")},center_vertically:function(a){var b=jQuery(a),c=jQuery(window).height()/2-parseInt(b.css("height"))/2;b.css("top",c+"px")},close:function(a){var b=jQuery(a);b.remove()}},jQuery(document).ready(function(){if(advads.supports_localstorage()&&localStorage.getItem("advads_frontend_picker")){var a,b=jQuery("<div id='advads-picker-overlay'>"),c=[document.body,document.documentElement,document];b.css({position:"absolute",border:"solid 2px #428bca",backgroundColor:"rgba(66,139,202,0.5)",boxSizing:"border-box",zIndex:1e6,pointerEvents:"none"}).prependTo("body"),jQuery(document).mousemove(function(d){if(d.target!==a){if(~c.indexOf(d.target))return a=null,void b.hide();var e=jQuery(d.target),f=e.offset(),g=e.outerWidth(),h=e.outerHeight();a=d.target,b.css({top:f.top,left:f.left,width:g,height:h}).show(),console.log(jQuery(a).getPath())}}),jQuery(document).click(function(b){var c=jQuery(a).getPath();localStorage.setItem("advads_frontend_element",c),window.location=localStorage.getItem("advads_prev_url")})}}),jQuery.fn.extend({getPath:function(a,b){if("undefined"==typeof a&&(a=""),"undefined"==typeof b&&(b=0),this.is("html"))return"html > "+a;if(3===b)return a;var c=this.get(0).nodeName.toLowerCase(),d=this.attr("id"),e=this.attr("class");return b+=1,"undefined"==typeof d||/\d/.test(d)?"undefined"!=typeof e&&(e=e.split(/[\s\n]+/),e=jQuery.grep(e,function(a,b){return!/\d/.test(a)}),e.length&&(c+="."+e.slice(0,2).join("."))):c+="#"+d,this.siblings(c).length&&(c+=":eq("+this.siblings(c).addBack().not("#advads-picker-overlay").index(this)+")"),""===a?this.parent().getPath(c,b):this.parent().getPath(c+" > "+a,b)}});
public/assets/js/advanced.orig.js CHANGED
@@ -7,10 +7,11 @@ advads = {
7
  * check if localstorage is supported/enabled by client
8
  */
9
  supports_localstorage: function() {
 
10
  try {
11
- return "localStorage" in window && null !== window.localStorage
12
- } catch (e) {
13
- return !1
14
  }
15
  },
16
  /**
7
  * check if localstorage is supported/enabled by client
8
  */
9
  supports_localstorage: function() {
10
+ "use strict";
11
  try {
12
+ return window && window.hasOwnProperty("localStorage") && window.localStorage !== null;
13
+ } catch(e) {
14
+ return false;
15
  }
16
  },
17
  /**
public/class-advanced-ads.php CHANGED
@@ -339,10 +339,12 @@ class Advanced_Ads {
339
  */
340
  public function inject_header(){
341
  $placements = get_option( 'advads-ads-placements', array() );
342
- foreach ( $placements as $_placement_id => $_placement ){
343
- if ( isset($_placement['type']) && 'header' == $_placement['type'] ){
344
- $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
345
- echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
 
 
346
  }
347
  }
348
  }
@@ -354,10 +356,12 @@ class Advanced_Ads {
354
  */
355
  public function inject_footer(){
356
  $placements = get_option( 'advads-ads-placements', array() );
357
- foreach ( $placements as $_placement_id => $_placement ){
358
- if ( isset($_placement['type']) && 'footer' == $_placement['type'] ){
359
- $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
360
- echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
 
 
361
  }
362
  }
363
  }
@@ -403,26 +407,28 @@ class Advanced_Ads {
403
  return $content;
404
  }
405
 
406
- foreach ( $placements as $_placement_id => $_placement ){
407
- if ( empty($_placement['item']) || ! isset($_placement['type']) ) { continue; }
408
- $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
409
-
410
- // check if injection is ok for a specific placement id
411
- if( ! apply_filters( 'advanced-ads-can-inject-into-content-' . $_placement_id, true, $content, $_placement_id )){
412
- continue;
413
- }
414
 
415
- switch ( $_placement['type'] ) {
416
- case 'post_top':
417
- // TODO broken: does not serve placement but serves ad directly
418
- $content = Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options ) . $content;
419
- break;
420
- case 'post_bottom':
421
- $content .= Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
422
- break;
423
- case 'post_content':
424
- $content = Advanced_Ads_Placements::inject_in_content( $_placement_id, $_options, $content );
425
- break;
 
 
 
 
 
 
426
  }
427
  }
428
 
339
  */
340
  public function inject_header(){
341
  $placements = get_option( 'advads-ads-placements', array() );
342
+ if( is_array( $placements ) ){
343
+ foreach ( $placements as $_placement_id => $_placement ){
344
+ if ( isset($_placement['type']) && 'header' == $_placement['type'] ){
345
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
346
+ echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
347
+ }
348
  }
349
  }
350
  }
356
  */
357
  public function inject_footer(){
358
  $placements = get_option( 'advads-ads-placements', array() );
359
+ if( is_array( $placements ) ){
360
+ foreach ( $placements as $_placement_id => $_placement ){
361
+ if ( isset($_placement['type']) && 'footer' == $_placement['type'] ){
362
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
363
+ echo Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
364
+ }
365
  }
366
  }
367
  }
407
  return $content;
408
  }
409
 
410
+ if( is_array( $placements ) ){
411
+ foreach ( $placements as $_placement_id => $_placement ){
412
+ if ( empty($_placement['item']) || ! isset($_placement['type']) ) { continue; }
413
+ $_options = isset( $_placement['options'] ) ? $_placement['options'] : array();
 
 
 
 
414
 
415
+ // check if injection is ok for a specific placement id
416
+ if( ! apply_filters( 'advanced-ads-can-inject-into-content-' . $_placement_id, true, $content, $_placement_id )){
417
+ continue;
418
+ }
419
+
420
+ switch ( $_placement['type'] ) {
421
+ case 'post_top':
422
+ // TODO broken: does not serve placement but serves ad directly
423
+ $content = Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options ) . $content;
424
+ break;
425
+ case 'post_bottom':
426
+ $content .= Advanced_Ads_Select::get_instance()->get_ad_by_method( $_placement_id, Advanced_Ads_Select::PLACEMENT, $_options );
427
+ break;
428
+ case 'post_content':
429
+ $content = Advanced_Ads_Placements::inject_in_content( $_placement_id, $_options, $content );
430
+ break;
431
+ }
432
  }
433
  }
434
 
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, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
5
  Requires at least: WP 4.2, PHP 5.3
6
  Tested up to: 4.7.2
7
- Stable tag: 1.7.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -202,13 +202,23 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
202
 
203
  == Screenshots ==
204
 
205
- 1. Create an ad almost like you would create an article or page.
206
- 2. Align the ad and set a margin to other elements
207
- 3. Choose from various conditions where and where not to display your ad.
208
- 4. Placements that let you inject ads anywhere into your site without coding (6 in Advanced Ads + 9 through add-ons)
 
209
 
210
  == Changelog ==
211
 
 
 
 
 
 
 
 
 
 
212
  = 1.7.18 =
213
 
214
  * use the same ad block disguise settings for all sites in a multisite
4
  Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, adrotate, adsense, advertise, advertisements, advertising, adverts, advert, amazon, banner, banners, buysellads, chitika, clickbank, dfp, doubleclick, geotarget, geolocation, geo location, google dfp, monetization, widget
5
  Requires at least: WP 4.2, PHP 5.3
6
  Tested up to: 4.7.2
7
+ Stable tag: 1.7.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
202
 
203
  == Screenshots ==
204
 
205
+ 1. Placements that let you inject ads anywhere into your site without coding (7 in Advanced Ads + 14 through add-ons).
206
+ 2. Support for all kinds of ad types, including dedicated AdSense type. AMP is included in the Responsive add-on.
207
+ 3. Flexible ad input with the Plain Text ad type.
208
+ 4. Align your ads within the content.
209
+ 5. Choose from various conditions where and to whom to display your ads.
210
 
211
  == Changelog ==
212
 
213
+ = 1.7.19 =
214
+
215
+ * check if local storage is supported by the browser, if needed
216
+ * use flexbox layout for longer input fields in conditions
217
+ * use `advanced-ads-admin-max-terms` filter also for limit in author condition
218
+ * updated EDD Updater Class for add-on updates
219
+ * fixed error message when all placements were removed
220
+ * fixed adblock disguise folder not working correctly on https pages
221
+
222
  = 1.7.18 =
223
 
224
  * use the same ad block disguise settings for all sites in a multisite