Version Description
- Fix: Bottom ad moved can potentially move up a paragraph if theme doesn't put closing paragraph at end of post.
Download this release
Release Info
Developer | reviewmylife |
Plugin | Ad Injection |
Version | 1.2.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0.0 to 1.2.0.1
- ad-injection.php +6 -2
- readme.txt +7 -1
ad-injection.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ad Injection
|
4 |
Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
|
5 |
Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
|
6 |
-
Version: 1.2.0.
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
@@ -764,7 +764,7 @@ function adinj_content_hook($content){
|
|
764 |
# Insert the adverts into the content. Scan through the paragraph list in reverse order.
|
765 |
$adpos = count($random_ad_paragraphs);
|
766 |
for ($i=$paracount; $i>0; --$i){
|
767 |
-
if ($i === $bottom_ad_paragraph){
|
768 |
$content = substr_replace($content, $bottomad, $original_paragraph_positions[$i-1], 0);
|
769 |
++$adinj_total_bottom_ads_used;
|
770 |
}
|
@@ -790,6 +790,10 @@ function adinj_content_hook($content){
|
|
790 |
$content = $topad.$content;
|
791 |
++$adinj_total_top_ads_used;
|
792 |
}
|
|
|
|
|
|
|
|
|
793 |
if ($bottom_ad_paragraph !== -1 && $adinj_total_bottom_ads_used == 0){
|
794 |
$content = $content.$bottomad;
|
795 |
++$adinj_total_bottom_ads_used;
|
3 |
Plugin Name: Ad Injection
|
4 |
Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
|
5 |
Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
|
6 |
+
Version: 1.2.0.1
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
764 |
# Insert the adverts into the content. Scan through the paragraph list in reverse order.
|
765 |
$adpos = count($random_ad_paragraphs);
|
766 |
for ($i=$paracount; $i>0; --$i){
|
767 |
+
if ($i === $bottom_ad_paragraph && $ops['bottom_ad_position'] != 0){
|
768 |
$content = substr_replace($content, $bottomad, $original_paragraph_positions[$i-1], 0);
|
769 |
++$adinj_total_bottom_ads_used;
|
770 |
}
|
790 |
$content = $topad.$content;
|
791 |
++$adinj_total_top_ads_used;
|
792 |
}
|
793 |
+
if ($ops['bottom_ad_position'] == 0){ // default is special case
|
794 |
+
$content = $content.$bottomad;
|
795 |
+
++$adinj_total_bottom_ads_used;
|
796 |
+
}
|
797 |
if ($bottom_ad_paragraph !== -1 && $adinj_total_bottom_ads_used == 0){
|
798 |
$content = $content.$bottomad;
|
799 |
++$adinj_total_bottom_ads_used;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-w
|
|
4 |
Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
|
5 |
Requires at least: 2.8.6
|
6 |
Tested up to: 3.2.1
|
7 |
-
Stable tag: 1.2.0.
|
8 |
|
9 |
Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
|
10 |
|
@@ -579,6 +579,9 @@ If you do get any errors please use the 'Report a bug or give feedback' link on
|
|
579 |
|
580 |
== Changelog ==
|
581 |
|
|
|
|
|
|
|
582 |
= 1.2.0.0 =
|
583 |
* Set the position of the top and bottom advert by paragraph or character.
|
584 |
* Position the random ads to start or stop in the middle of the post.
|
@@ -783,6 +786,9 @@ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on pag
|
|
783 |
|
784 |
== Upgrade Notice ==
|
785 |
|
|
|
|
|
|
|
786 |
= 1.2.0.0 =
|
787 |
* New top, random and bottom positioning options. UI updates. Debug message improvements.
|
788 |
|
4 |
Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, widgets, sidebar, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free, blog, ad rotation, A:B testing, split testing, WP Super Cache, W3 Total Cache, WP Cache
|
5 |
Requires at least: 2.8.6
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 1.2.0.1
|
8 |
|
9 |
Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
|
10 |
|
579 |
|
580 |
== Changelog ==
|
581 |
|
582 |
+
= 1.2.0.1 =
|
583 |
+
* Fix: Bottom ad moved can potentially move up a paragraph if theme doesn't put closing paragraph at end of post.
|
584 |
+
|
585 |
= 1.2.0.0 =
|
586 |
* Set the position of the top and bottom advert by paragraph or character.
|
587 |
* Position the random ads to start or stop in the middle of the post.
|
786 |
|
787 |
== Upgrade Notice ==
|
788 |
|
789 |
+
= 1.2.0.1 =
|
790 |
+
* Fix: Bottom ad moved can potentially move up a paragraph if theme doesn't put closing paragraph at end of post.
|
791 |
+
|
792 |
= 1.2.0.0 =
|
793 |
* New top, random and bottom positioning options. UI updates. Debug message improvements.
|
794 |
|