Version Description
- Bug fix for page/post exceptions list
Download this release
Release Info
Developer | spacetime |
Plugin | Ad Inserter – WordPress Ads Management with AdSense Header Integration |
Version | 2.0.12 |
Comparing to | |
See all releases |
Code changes from version 2.0.11 to 2.0.12
- ad-inserter.php +4 -1
- constants.php +1 -1
- css/ad-inserter.css +1 -1
- js/ad-inserter.js +1 -1
- readme.txt +7 -1
- settings.php +33 -21
ad-inserter.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
-
Version: 2.0.
|
5 |
Description: Insert any ad or code into Wordpress. Perfect for all kinds of ads. Simply enter any ad or HTML/Javascript/PHP code and select where and how you want to display it.
|
6 |
Author: Igor Funa
|
7 |
Author URI: http://igorfuna.com/
|
@@ -11,6 +11,9 @@ Plugin URI: http://adinserter.pro/documentation
|
|
11 |
/*
|
12 |
Change Log
|
13 |
|
|
|
|
|
|
|
14 |
Ad Inserter 2.0.11 - 29 January 2017
|
15 |
- Bug fix for settings page not loading
|
16 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Ad Inserter
|
4 |
+
Version: 2.0.12
|
5 |
Description: Insert any ad or code into Wordpress. Perfect for all kinds of ads. Simply enter any ad or HTML/Javascript/PHP code and select where and how you want to display it.
|
6 |
Author: Igor Funa
|
7 |
Author URI: http://igorfuna.com/
|
11 |
/*
|
12 |
Change Log
|
13 |
|
14 |
+
Ad Inserter 2.0.12 - 29 January 2017
|
15 |
+
- Bug fix for page/post exceptions list
|
16 |
+
|
17 |
Ad Inserter 2.0.11 - 29 January 2017
|
18 |
- Bug fix for settings page not loading
|
19 |
|
constants.php
CHANGED
@@ -11,7 +11,7 @@ if (!defined( 'AD_INSERTER_NAME'))
|
|
11 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
12 |
|
13 |
if (!defined( 'AD_INSERTER_VERSION'))
|
14 |
-
define ('AD_INSERTER_VERSION', '2.0.
|
15 |
|
16 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
17 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
11 |
define ('AD_INSERTER_NAME', 'Ad Inserter');
|
12 |
|
13 |
if (!defined( 'AD_INSERTER_VERSION'))
|
14 |
+
define ('AD_INSERTER_VERSION', '2.0.12');
|
15 |
|
16 |
if (!defined ('AD_INSERTER_PLUGIN_BASENAME'))
|
17 |
define ('AD_INSERTER_PLUGIN_BASENAME', plugin_basename (__FILE__));
|
css/ad-inserter.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#data {
|
2 |
-
font-family: "2.0.
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
1 |
#data {
|
2 |
+
font-family: "2.0.12"; /* Used for version number of the file */
|
3 |
}
|
4 |
|
5 |
#blocked-warning {
|
js/ad-inserter.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var javascript_version = "2.0.
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
1 |
+
var javascript_version = "2.0.12";
|
2 |
var ignore_key = true;
|
3 |
var start = 1;
|
4 |
var end = 16;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: adsense, amazon, advertising, ad, advert, html, javascript, php, code, widget, sidebar, responsive, viewport, rotating, banner, ad rotation, geo targeting, multisite, contextual, shortcodes, widgets, header, footer, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, caching support
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7.2
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv3
|
9 |
|
10 |
Insert any advert or code into Wordpress. Perfect for all kinds of banners and ads including AdSense and Amazon. Powerful features, simple use.
|
@@ -655,6 +655,9 @@ AD CODE RIGHT
|
|
655 |
|
656 |
== Changelog ==
|
657 |
|
|
|
|
|
|
|
658 |
= 2.0.11 =
|
659 |
- Bug fix for settings page not loading
|
660 |
|
@@ -954,6 +957,9 @@ AD CODE RIGHT
|
|
954 |
|
955 |
== Upgrade Notice ==
|
956 |
|
|
|
|
|
|
|
957 |
= 2.0.11 =
|
958 |
Bug fix for settings page not loading
|
959 |
|
4 |
Tags: adsense, amazon, advertising, ad, advert, html, javascript, php, code, widget, sidebar, responsive, viewport, rotating, banner, ad rotation, geo targeting, multisite, contextual, shortcodes, widgets, header, footer, mobile, desktop, phone, tablet, custom css, category, tag, filter, url, caching support
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.7.2
|
7 |
+
Stable tag: 2.0.11
|
8 |
License: GPLv3
|
9 |
|
10 |
Insert any advert or code into Wordpress. Perfect for all kinds of banners and ads including AdSense and Amazon. Powerful features, simple use.
|
655 |
|
656 |
== Changelog ==
|
657 |
|
658 |
+
= 2.0.12 =
|
659 |
+
- Bug fix for page/post exceptions list
|
660 |
+
|
661 |
= 2.0.11 =
|
662 |
- Bug fix for settings page not loading
|
663 |
|
957 |
|
958 |
== Upgrade Notice ==
|
959 |
|
960 |
+
= 2.0.12 =
|
961 |
+
Bug fix for page/post exceptions list
|
962 |
+
|
963 |
= 2.0.11 =
|
964 |
Bug fix for settings page not loading
|
965 |
|
settings.php
CHANGED
@@ -34,26 +34,38 @@ function generate_settings_form (){
|
|
34 |
|
35 |
$default = $block_object [0];
|
36 |
|
37 |
-
$
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
$exceptions = array ();
|
44 |
-
foreach ($posts_pages as $
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
$block_exceptions [$selected_block][$page->ID] = array ('post' => $type == 'posts', 'title' => $page->post_title);
|
53 |
-
}
|
54 |
}
|
55 |
}
|
56 |
-
ksort ($exceptions);
|
57 |
?>
|
58 |
|
59 |
<div id="data" style="display: none;" version="<?php echo AD_INSERTER_VERSION; ?>" theme="<?php echo $syntax_highlighter_theme; ?>" javascript_debugging="<?php echo get_javascript_debugging () ? '1' : '0'; ?>" ></div>
|
@@ -444,11 +456,10 @@ function generate_settings_form (){
|
|
444 |
<?php
|
445 |
|
446 |
if (!empty ($block_exceptions [$ad_number])) {
|
447 |
-
ksort ($block_exceptions [$ad_number])
|
448 |
?>
|
449 |
<table class="exceptions" cellspacing=0 cellpadding=0><tbody>
|
450 |
<tr>
|
451 |
-
<th class="id">ID</th><th class="page page-only"> Page / Post</th><th>
|
452 |
<input id="clear-block-exceptions-<?php echo $ad_number; ?>"
|
453 |
onclick="if (confirm('Are you sure you want to clear all exceptions for block <?php echo $ad_number; ?>?')) {document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').style.visibility = 'hidden'; document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').style.fontSize = '1px'; document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').value = '<?php echo $ad_number; ?>'; return true;} return false"
|
454 |
title="Clear all exceptions for block <?php echo $ad_number; ?>"
|
@@ -462,9 +473,10 @@ function generate_settings_form (){
|
|
462 |
?>
|
463 |
<tr>
|
464 |
<td class="id"><a href="<?php
|
465 |
-
get_permalink ($id); ?>" target="_blank" title="View" style="color: #222;"><?php
|
466 |
-
echo $id; ?></a></td><td
|
467 |
-
|
|
|
468 |
echo $exception ['title']; ?></a></td><td></td>
|
469 |
</tr>
|
470 |
<?php
|
34 |
|
35 |
$default = $block_object [0];
|
36 |
|
37 |
+
$args = array (
|
38 |
+
'posts_per_page' => - 1,
|
39 |
+
'offset' => 0,
|
40 |
+
'category' => '',
|
41 |
+
'category_name' => '',
|
42 |
+
'orderby' => 'type',
|
43 |
+
'order' => 'ASC',
|
44 |
+
'include' => '',
|
45 |
+
'exclude' => '',
|
46 |
+
'meta_key' => '_adinserter_block_exceptions',
|
47 |
+
'meta_value' => '',
|
48 |
+
'post_type' => array ('post', 'page'),
|
49 |
+
'post_mime_type' => '',
|
50 |
+
'post_parent' => '',
|
51 |
+
'author' => '',
|
52 |
+
'author_name' => '',
|
53 |
+
'post_status' => '',
|
54 |
+
'suppress_filters' => true
|
55 |
+
);
|
56 |
+
$posts_pages = get_posts ($args);
|
57 |
|
58 |
$exceptions = array ();
|
59 |
+
foreach ($posts_pages as $page) {
|
60 |
+
$post_meta = get_post_meta ($page->ID, '_adinserter_block_exceptions', true);
|
61 |
+
if ($post_meta == '') continue;
|
62 |
+
$exceptions [$page->ID] = array ('type' => $page->post_type, 'title' => $page->post_title, 'blocks' => $post_meta);
|
63 |
+
|
64 |
+
$selected_blocks = explode (",", $post_meta);
|
65 |
+
foreach ($selected_blocks as $selected_block) {
|
66 |
+
$block_exceptions [$selected_block][$page->ID] = array ('type' => $page->post_type, 'title' => $page->post_title);
|
|
|
|
|
67 |
}
|
68 |
}
|
|
|
69 |
?>
|
70 |
|
71 |
<div id="data" style="display: none;" version="<?php echo AD_INSERTER_VERSION; ?>" theme="<?php echo $syntax_highlighter_theme; ?>" javascript_debugging="<?php echo get_javascript_debugging () ? '1' : '0'; ?>" ></div>
|
456 |
<?php
|
457 |
|
458 |
if (!empty ($block_exceptions [$ad_number])) {
|
|
|
459 |
?>
|
460 |
<table class="exceptions" cellspacing=0 cellpadding=0><tbody>
|
461 |
<tr>
|
462 |
+
<th class="id">ID</th><th class="id">Type</th><th class="page page-only"> Page / Post</th><th>
|
463 |
<input id="clear-block-exceptions-<?php echo $ad_number; ?>"
|
464 |
onclick="if (confirm('Are you sure you want to clear all exceptions for block <?php echo $ad_number; ?>?')) {document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').style.visibility = 'hidden'; document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').style.fontSize = '1px'; document.getElementById ('clear-block-exceptions-<?php echo $ad_number; ?>').value = '<?php echo $ad_number; ?>'; return true;} return false"
|
465 |
title="Clear all exceptions for block <?php echo $ad_number; ?>"
|
473 |
?>
|
474 |
<tr>
|
475 |
<td class="id"><a href="<?php
|
476 |
+
echo get_permalink ($id); ?>" target="_blank" title="View" style="color: #222;"><?php
|
477 |
+
echo $id; ?></a></td><td><?php
|
478 |
+
echo ucfirst ($exception ['type']); ?></td><td class="page page-only"><a href="<?php
|
479 |
+
echo get_edit_post_link ($id); ?>" target="_blank" title="Edit" style="margin-left: 2px; color: #222;"><?php
|
480 |
echo $exception ['title']; ?></a></td><td></td>
|
481 |
</tr>
|
482 |
<?php
|