Version Description
- minor changes for better extendability for the sticky ads addon
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- admin/assets/js/admin.js +27 -0
- advanced-ads.php +1 -1
- public/class-advanced-ads.php +12 -1
- readme.txt +5 -1
admin/assets/js/admin.js
CHANGED
@@ -52,6 +52,33 @@ function advads_toggle(selector) {
|
|
52 |
jQuery(selector).slideToggle();
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* toggle display conditions
|
57 |
* @param {bool} value
|
52 |
jQuery(selector).slideToggle();
|
53 |
}
|
54 |
|
55 |
+
/**
|
56 |
+
* toggle content elements with a checkbox (hide/show)
|
57 |
+
*
|
58 |
+
* @param selector jquery selector
|
59 |
+
*/
|
60 |
+
function advads_toggle_box(e, selector) {
|
61 |
+
if(jQuery(e).is(':checked')){
|
62 |
+
jQuery(selector).slideDown();
|
63 |
+
} else {
|
64 |
+
jQuery(selector).slideUp();
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* disable content of one box when selecting another
|
70 |
+
* only grey/disable it, don’t hide it
|
71 |
+
*
|
72 |
+
* @param selector jquery selector
|
73 |
+
*/
|
74 |
+
function advads_toggle_box_enable(e, selector) {
|
75 |
+
if(jQuery(e).is(':checked')){
|
76 |
+
jQuery(selector).find('input').removeAttr('disabled', '');
|
77 |
+
} else {
|
78 |
+
jQuery(selector).find('input').attr('disabled', 'disabled');
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
/**
|
83 |
* toggle display conditions
|
84 |
* @param {bool} value
|
advanced-ads.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: http://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
-
* Version: 1.1.
|
16 |
* Author: Thomas Maier
|
17 |
* Author URI: http://webgilde.com
|
18 |
* Text Domain: advanced-ads
|
12 |
* Plugin Name: Advanced Ads
|
13 |
* Plugin URI: http://wpadvancedads.com
|
14 |
* Description: Manage and optimize your ads in WordPress
|
15 |
+
* Version: 1.1.3
|
16 |
* Author: Thomas Maier
|
17 |
* Author URI: http://webgilde.com
|
18 |
* Text Domain: advanced-ads
|
public/class-advanced-ads.php
CHANGED
@@ -25,7 +25,7 @@ class Advanced_Ads {
|
|
25 |
* @var string
|
26 |
*/
|
27 |
|
28 |
-
const VERSION = '1.1.
|
29 |
|
30 |
/**
|
31 |
* post type slug
|
@@ -116,6 +116,9 @@ class Advanced_Ads {
|
|
116 |
// setup default ad types
|
117 |
add_filter('advanced-ads-ad-types', array($this, 'setup_default_ad_types'));
|
118 |
|
|
|
|
|
|
|
119 |
// register hooks and filters for auto ad injection
|
120 |
add_action('wp_head', array($this, 'inject_header'), 20);
|
121 |
add_action('wp_footer', array($this, 'inject_footer'), 20);
|
@@ -655,6 +658,14 @@ class Advanced_Ads {
|
|
655 |
}
|
656 |
}
|
657 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
/**
|
659 |
* injected ad into content (before and after)
|
660 |
* displays ALL ads
|
25 |
* @var string
|
26 |
*/
|
27 |
|
28 |
+
const VERSION = '1.1.3';
|
29 |
|
30 |
/**
|
31 |
* post type slug
|
116 |
// setup default ad types
|
117 |
add_filter('advanced-ads-ad-types', array($this, 'setup_default_ad_types'));
|
118 |
|
119 |
+
// frontend output
|
120 |
+
add_action('wp_head', array($this, 'header_output'));
|
121 |
+
|
122 |
// register hooks and filters for auto ad injection
|
123 |
add_action('wp_head', array($this, 'inject_header'), 20);
|
124 |
add_action('wp_footer', array($this, 'inject_footer'), 20);
|
658 |
}
|
659 |
}
|
660 |
|
661 |
+
/**
|
662 |
+
* content output in the header
|
663 |
+
*/
|
664 |
+
public function header_output(){
|
665 |
+
// inject js array for banner conditions
|
666 |
+
echo '<script>advads_item_conditions = {};</script>';
|
667 |
+
}
|
668 |
+
|
669 |
/**
|
670 |
* injected ad into content (before and after)
|
671 |
* displays ALL ads
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webzunft
|
|
3 |
Tags: ads, ad, adsense
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.2
|
6 |
-
Stable tag: 1.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -118,6 +118,10 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
121 |
= 1.1.2 =
|
122 |
|
123 |
* composer bugfix
|
3 |
Tags: ads, ad, adsense
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 3.9.2
|
6 |
+
Stable tag: 1.1.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.1.3 =
|
122 |
+
|
123 |
+
* minor changes for better extendability for the [sticky ads addon](http://wpadvancedads.com/sticky-ads/)
|
124 |
+
|
125 |
= 1.1.2 =
|
126 |
|
127 |
* composer bugfix
|