Advanced Ads - Version 1.7.21

Version Description

  • fixed jumping "more terms" button in taxonomy conditions
  • fixed advanced JavaScript for frontend picker in Pro
Download this release

Release Info

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

Code changes from version 1.7.20 to 1.7.21

admin/assets/css/admin.css CHANGED
@@ -136,8 +136,6 @@ select + .advads-conditions-single { display: inline-block; }
136
  .advads-buttonset .ui-button.ui-state-active { border-color: #0074a2 !important; background: #2ea2cc !important; color: #fff !important; box-shadow: none; }
137
 
138
  #ad-display-box .advads-conditions-terms-show-search { height: 22px; line-height: 22px; font-weight: bold; font-size: 1.5em; }
139
- .advads-conditions-terms-show-search + .description { display: none; }
140
- .advads-conditions-terms-show-search:hover + .description { display: inline-block; margin-left: .5em; color: #666; }
141
  .advads-conditions-terms-search { display: none; }
142
  .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; }
143
  .post-type-advanced_ads #advanced-ads-ad-parameters-size label + label { margin-left: 1em; }
136
  .advads-buttonset .ui-button.ui-state-active { border-color: #0074a2 !important; background: #2ea2cc !important; color: #fff !important; box-shadow: none; }
137
 
138
  #ad-display-box .advads-conditions-terms-show-search { height: 22px; line-height: 22px; font-weight: bold; font-size: 1.5em; }
 
 
139
  .advads-conditions-terms-search { display: none; }
140
  .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; }
141
  .post-type-advanced_ads #advanced-ads-ad-parameters-size label + label { margin-left: 1em; }
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.20
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.20' );
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.21
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.21' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
classes/display-conditions.php CHANGED
@@ -350,8 +350,7 @@ class Advanced_Ads_Display_Conditions {
350
  }
351
  ?><span class="advads-conditions-terms-show-search button" title="<?php
352
  _ex('add more terms', 'display the terms search field on ad edit page', 'advanced-ads');
353
- ?>">+</span><span class="description"><?php _e('add more terms', 'advanced-ads');
354
- ?></span><br/><input type="text" class="advads-conditions-terms-search" data-tag-name="<?php echo $taxonomy->name;
355
  ?>" data-input-name="<?php echo $inputname; ?>" placeholder="<?php _e('term name or id', 'advanced-ads'); ?>"/><?php
356
  else :
357
  ?><div class="advads-conditions-terms-buttons advads-buttonset"><?php
350
  }
351
  ?><span class="advads-conditions-terms-show-search button" title="<?php
352
  _ex('add more terms', 'display the terms search field on ad edit page', 'advanced-ads');
353
+ ?>">+</span><br/><input type="text" class="advads-conditions-terms-search" data-tag-name="<?php echo $taxonomy->name;
 
354
  ?>" data-input-name="<?php echo $inputname; ?>" placeholder="<?php _e('term name or id', 'advanced-ads'); ?>"/><?php
355
  else :
356
  ?><div class="advads-conditions-terms-buttons advads-buttonset"><?php
public/assets/js/advanced.js CHANGED
@@ -1 +1 @@
1
- advads={supports_localstorage:function(){"use strict";try{if(!window||void 0===window.localStorage)return!1;window.localStorage.setItem("x","x"),window.localStorage.removeItem("x")}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||void 0===window.localStorage)&&(window.localStorage.setItem("x","x"),window.localStorage.removeItem("x"),!0)}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
@@ -15,6 +15,7 @@ advads = {
15
  // storage might be full or disabled
16
  window.localStorage.setItem("x", "x");
17
  window.localStorage.removeItem("x");
 
18
  } catch(e) {
19
  return false;
20
  }
15
  // storage might be full or disabled
16
  window.localStorage.setItem("x", "x");
17
  window.localStorage.removeItem("x");
18
+ return true;
19
  } catch(e) {
20
  return false;
21
  }
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.3
7
- Stable tag: 1.7.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -210,6 +210,11 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
210
 
211
  == Changelog ==
212
 
 
 
 
 
 
213
  = 1.7.20 =
214
 
215
  * updated local storage script
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.3
7
+ Stable tag: 1.7.21
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
210
 
211
  == Changelog ==
212
 
213
+ = 1.7.21 =
214
+
215
+ * fixed jumping "more terms" button in taxonomy conditions
216
+ * fixed advanced JavaScript for frontend picker in Pro
217
+
218
  = 1.7.20 =
219
 
220
  * updated local storage script