Advanced Ads - Version 1.8.10

Version Description

  • added Ad Health warning if ads are disabled in the frontend
  • fix for Wizard navigation
Download this release

Release Info

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

Code changes from version 1.8.9 to 1.8.10

admin/assets/js/wizard.js CHANGED
@@ -13,6 +13,7 @@ var advads_wizard = {
13
  ],
14
  current_box: '#post-body-content, #ad-main-box', // current active box
15
  one_column: false, // whether the edit screen is in one-column mode
 
16
  init: function( status ){ // status can be "start" to start wizard or nothing to not start it
17
  var _this = this;
18
  jQuery('#advads-wizard-controls-next').click( function( ){ _this.next(); } );
@@ -38,7 +39,7 @@ var advads_wizard = {
38
  },
39
  start: function(){ // do stuff when wizard is started
40
  // show page in 1-column stype
41
- var _this = this;
42
  if( jQuery( '#post-body').hasClass('columns-1') ){
43
  this.one_column = true;
44
  } else {
@@ -63,11 +64,14 @@ var advads_wizard = {
63
  this.save_hide_wizard( false );
64
  },
65
  close: function(){ // close the wizard by showing all elements again
 
66
  jQuery('*').removeClass('advads-hide');
67
  jQuery('#advads-stop-wizard, #advads-wizard-controls').addClass('hidden');
68
  if( this.one_column !== true ){
69
  jQuery( '#post-body').addClass( 'columns-2' ).removeClass( 'columns-1' );
70
  }
 
 
71
  jQuery('#advads-wizard-welcome').remove();// close wizard welcome message
72
  // show all elements with 'advads-hide-for-wizard' class
73
  jQuery( '.advads-hide-in-wizard').show();
@@ -94,6 +98,7 @@ var advads_wizard = {
94
  }
95
  },
96
  next: function(){ // show next box
 
97
  // get index of current item in box-array
98
  var i = this.box_order.indexOf( this.current_box );
99
  // check if there is a next index
13
  ],
14
  current_box: '#post-body-content, #ad-main-box', // current active box
15
  one_column: false, // whether the edit screen is in one-column mode
16
+ status: false, // what is the current status? true if running, else false
17
  init: function( status ){ // status can be "start" to start wizard or nothing to not start it
18
  var _this = this;
19
  jQuery('#advads-wizard-controls-next').click( function( ){ _this.next(); } );
39
  },
40
  start: function(){ // do stuff when wizard is started
41
  // show page in 1-column stype
42
+ this.status = true;
43
  if( jQuery( '#post-body').hasClass('columns-1') ){
44
  this.one_column = true;
45
  } else {
64
  this.save_hide_wizard( false );
65
  },
66
  close: function(){ // close the wizard by showing all elements again
67
+ this.status = false;
68
  jQuery('*').removeClass('advads-hide');
69
  jQuery('#advads-stop-wizard, #advads-wizard-controls').addClass('hidden');
70
  if( this.one_column !== true ){
71
  jQuery( '#post-body').addClass( 'columns-2' ).removeClass( 'columns-1' );
72
  }
73
+ // reset current box
74
+ this.current_box = this.box_order[0];
75
  jQuery('#advads-wizard-welcome').remove();// close wizard welcome message
76
  // show all elements with 'advads-hide-for-wizard' class
77
  jQuery( '.advads-hide-in-wizard').show();
98
  }
99
  },
100
  next: function(){ // show next box
101
+ if( ! this.status ){ return }
102
  // get index of current item in box-array
103
  var i = this.box_order.indexOf( this.current_box );
104
  // check if there is a next index
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.8.9
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.8.9' );
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.8.10
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.8.10' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
classes/frontend_checks.php CHANGED
@@ -164,6 +164,20 @@ class Advanced_Ads_Frontend_Checks {
164
  }
165
  }
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  if ( $wp_the_query->is_404() && ! empty( $options['disabled-ads']['404'] ) ) {
168
  $wp_admin_bar->add_node( array(
169
  'parent' => 'advanced_ads_ad_health',
164
  }
165
  }
166
 
167
+ if ( ! empty( $options['disabled-ads']['all'] ) ) {
168
+ $wp_admin_bar->add_node( array(
169
+ 'parent' => 'advanced_ads_ad_health',
170
+ 'id' => 'advanced_ads_ad_health_no_all',
171
+ 'title' => __( 'Ads are disabled on all pages', 'advanced-ads' ),
172
+ 'href' => admin_url( 'admin.php?page=advanced-ads-settings' ),
173
+ 'meta' => array(
174
+ 'class' => 'advanced_ads_ad_health_warning',
175
+ 'target' => '_blank'
176
+ )
177
+ ) );
178
+ $display_fine = false;
179
+ }
180
+
181
  if ( $wp_the_query->is_404() && ! empty( $options['disabled-ads']['404'] ) ) {
182
  $wp_admin_bar->add_node( array(
183
  'parent' => 'advanced_ads_ad_health',
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: ads, ad, ad inserter, ad injection, ad manager, ads manager, ad widget, ad
5
  Requires at least: 4.6
6
  Tested up to: 4.8
7
  Requires PHP: 5.2
8
- Stable tag: 1.8.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -220,6 +220,11 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
220
 
221
  == Changelog ==
222
 
 
 
 
 
 
223
  = 1.8.9 =
224
 
225
  * added option to disable AdSense-related Ad-Health warnings
5
  Requires at least: 4.6
6
  Tested up to: 4.8
7
  Requires PHP: 5.2
8
+ Stable tag: 1.8.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
220
 
221
  == Changelog ==
222
 
223
+ = 1.8.10 =
224
+
225
+ * added Ad Health warning if ads are disabled in the frontend
226
+ * fix for Wizard navigation
227
+
228
  = 1.8.9 =
229
 
230
  * added option to disable AdSense-related Ad-Health warnings