Version Description
Try to make sure ads don't appear on archive pages, 404s or search results, in case theme is working in a non-standard way. Reduce dependency on files.
Download this release
Release Info
Developer | reviewmylife |
Plugin | Ad Injection |
Version | 0.8.8 |
Comparing to | |
See all releases |
Code changes from version 0.8.7 to 0.8.8
- ad-injection-admin.php +3 -3
- ad-injection.php +5 -4
- readme.txt +7 -1
ad-injection-admin.php
CHANGED
@@ -239,7 +239,7 @@ function adinj_options_page(){
|
|
239 |
|
240 |
<table border="0" cellspacing="5">
|
241 |
<tr><td style="vertical-align: top">
|
242 |
-
<textarea name="ad_code_random_1" rows="10" cols="60"><?php echo
|
243 |
</td><td style="vertical-align: top">
|
244 |
<?php adinj_add_alignment_options('rnd_'); ?>
|
245 |
</td></tr>
|
@@ -372,7 +372,7 @@ function adinj_options_page(){
|
|
372 |
|
373 |
<table border="0">
|
374 |
<tr><td>
|
375 |
-
<textarea name="ad_code_top_1" rows="10" cols="60"><?php echo
|
376 |
</td><td style="vertical-align: top">
|
377 |
<?php adinj_add_alignment_options('top_'); ?>
|
378 |
</td></tr>
|
@@ -397,7 +397,7 @@ function adinj_options_page(){
|
|
397 |
|
398 |
<table border="0">
|
399 |
<tr><td>
|
400 |
-
<textarea name="ad_code_bottom_1" rows="10" cols="60"><?php echo
|
401 |
</td><td style="vertical-align: top">
|
402 |
<?php adinj_add_alignment_options('bottom_'); ?>
|
403 |
</td></tr>
|
239 |
|
240 |
<table border="0" cellspacing="5">
|
241 |
<tr><td style="vertical-align: top">
|
242 |
+
<textarea name="ad_code_random_1" rows="10" cols="60"><?php echo $options['ad_code_random_1']; ?></textarea>
|
243 |
</td><td style="vertical-align: top">
|
244 |
<?php adinj_add_alignment_options('rnd_'); ?>
|
245 |
</td></tr>
|
372 |
|
373 |
<table border="0">
|
374 |
<tr><td>
|
375 |
+
<textarea name="ad_code_top_1" rows="10" cols="60"><?php echo $options['ad_code_top_1']; ?></textarea>
|
376 |
</td><td style="vertical-align: top">
|
377 |
<?php adinj_add_alignment_options('top_'); ?>
|
378 |
</td></tr>
|
397 |
|
398 |
<table border="0">
|
399 |
<tr><td>
|
400 |
+
<textarea name="ad_code_bottom_1" rows="10" cols="60"><?php echo $options['ad_code_bottom_1']; ?></textarea>
|
401 |
</td><td style="vertical-align: top">
|
402 |
<?php adinj_add_alignment_options('bottom_'); ?>
|
403 |
</td></tr>
|
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: Inserts any advert into your blog. Options to exclude by post age, visitor IP, and visitor referrer. Works with WP Super Cache.
|
6 |
-
Version: 0.8.
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
@@ -338,8 +338,9 @@ function adinj_ads_completely_disabled_from_page($content=NULL){
|
|
338 |
// check for ads on certain page types being disabled
|
339 |
if ((is_home() && adinj_ticked('exclude_home')) ||
|
340 |
(is_page() && adinj_ticked('exclude_page')) ||
|
341 |
-
(is_single() && adinj_ticked('exclude_single'))
|
342 |
-
|
|
|
343 |
}
|
344 |
|
345 |
// if disable_adverts==1
|
@@ -535,7 +536,7 @@ function adinj_num_rand_ads_to_insert($content_length){
|
|
535 |
$max_num_rand_ads_to_insert = $options['max_num_of_ads_home_page'] - $adinj_total_rand_ads_used;
|
536 |
} else {
|
537 |
return 0;
|
538 |
-
//TODO
|
539 |
}
|
540 |
if ($max_num_rand_ads_to_insert <= 0) {
|
541 |
return 0;
|
3 |
Plugin Name: Ad Injection
|
4 |
Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
|
5 |
Description: Inserts any advert into your blog. Options to exclude by post age, visitor IP, and visitor referrer. Works with WP Super Cache.
|
6 |
+
Version: 0.8.8
|
7 |
Author: reviewmylife
|
8 |
Author URI: http://www.reviewmylife.co.uk/
|
9 |
License: GPLv2
|
338 |
// check for ads on certain page types being disabled
|
339 |
if ((is_home() && adinj_ticked('exclude_home')) ||
|
340 |
(is_page() && adinj_ticked('exclude_page')) ||
|
341 |
+
(is_single() && adinj_ticked('exclude_single')) ||
|
342 |
+
(is_archive() || is_search() || is_404())){
|
343 |
+
return "NOADS: excluded from this post type-".get_post_type();
|
344 |
}
|
345 |
|
346 |
// if disable_adverts==1
|
536 |
$max_num_rand_ads_to_insert = $options['max_num_of_ads_home_page'] - $adinj_total_rand_ads_used;
|
537 |
} else {
|
538 |
return 0;
|
539 |
+
//TODO Allow ads in other page types later
|
540 |
}
|
541 |
if ($max_num_rand_ads_to_insert <= 0) {
|
542 |
return 0;
|
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, advert injection, advert, ad, injection, adsense, advertising, affiliate, inject, injection, insert, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, free
|
5 |
Requires at least: 3.0.0
|
6 |
Tested up to: 3.0.2
|
7 |
-
Stable tag: 0.8.
|
8 |
|
9 |
Injects any kind of advert into existing WordPress posts. Can restrict who sees the ads by post age, visitor referrer, IP address. Cache compatible.
|
10 |
|
@@ -157,6 +157,9 @@ For more information visit [reviewmylife](http://www.reviewmylife.co.uk/blog/201
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
160 |
= 0.8.7 =
|
161 |
More fault tolerant mfunc support.
|
162 |
|
@@ -177,6 +180,9 @@ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on pag
|
|
177 |
|
178 |
== Upgrade Notice ==
|
179 |
|
|
|
|
|
|
|
180 |
= 0.8.7 =
|
181 |
More fault tolerant mfunc support.
|
182 |
|
4 |
Tags: ad injection, advert injection, advert, ad, injection, adsense, advertising, affiliate, inject, injection, insert, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, free
|
5 |
Requires at least: 3.0.0
|
6 |
Tested up to: 3.0.2
|
7 |
+
Stable tag: 0.8.8
|
8 |
|
9 |
Injects any kind of advert into existing WordPress posts. Can restrict who sees the ads by post age, visitor referrer, IP address. Cache compatible.
|
10 |
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 0.8.8 =
|
161 |
+
Try to make sure ads don't appear on archive pages, 404s or search results, in case theme is working in a non-standard way. Reduce dependency on files.
|
162 |
+
|
163 |
= 0.8.7 =
|
164 |
More fault tolerant mfunc support.
|
165 |
|
180 |
|
181 |
== Upgrade Notice ==
|
182 |
|
183 |
+
= 0.8.8 =
|
184 |
+
Try to make sure ads don't appear on archive pages, 404s or search results, in case theme is working in a non-standard way. Reduce dependency on files.
|
185 |
+
|
186 |
= 0.8.7 =
|
187 |
More fault tolerant mfunc support.
|
188 |
|