Version Description
Providing a downgrade path to the previous, non-AJAX version of the plugin.
Download this release
Release Info
Developer | manojtd |
Plugin | Easy Plugin for AdSense |
Version | 8.11 |
Comparing to | |
See all releases |
Code changes from version 8.10 to 8.11
- EzGA.php +6 -2
- admin/index.php +3 -33
- admin/no-ajax.php +56 -0
- easy-adsense.php +1 -1
- readme.txt +2 -1
- wp-google-adsense.php +16 -3
EzGA.php
CHANGED
@@ -36,8 +36,12 @@ if (!class_exists("EzGA")) {
|
|
36 |
}
|
37 |
|
38 |
static function isLoggedIn() {
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
global $wpdb; // used within $wpHeader later for multisite. Do not remove!
|
42 |
$isLoggedIn = false;
|
43 |
// check from admin and ajax
|
36 |
}
|
37 |
|
38 |
static function isLoggedIn() {
|
39 |
+
if (!defined('WP_USE_THEMES')) {
|
40 |
+
define('WP_USE_THEMES', false);
|
41 |
+
}
|
42 |
+
if (!defined('WP_INSTALLING')) {
|
43 |
+
define('WP_INSTALLING', true);
|
44 |
+
}
|
45 |
global $wpdb; // used within $wpHeader later for multisite. Do not remove!
|
46 |
$isLoggedIn = false;
|
47 |
// check from admin and ajax
|
admin/index.php
CHANGED
@@ -17,39 +17,9 @@ openCell("Introduction", "home", 8);
|
|
17 |
$plgName = EzGA::getPlgName();
|
18 |
$plgMode = EzGA::getPlgMode();
|
19 |
require_once "$plgMode-intro.php";
|
20 |
-
$
|
21 |
-
|
22 |
-
|
23 |
-
<div style='padding:5px;margin:0;background-color:#ffdbdb'>
|
24 |
-
<h3>Go Back to Non-AJAX Version<br>
|
25 |
-
<small>Don't like this fancy AJAX interface?</small>
|
26 |
-
</h3>
|
27 |
-
You can always go back to the non-AJAX version if you are not happy with this slick new admin page, or if the plugin doesn't work as expected (ads not appearing on home/front page/posts, or any other kind of strange behavior). The AJAX version stores its options completely independent of the non-AJAX version. Your non-AJAX options are intact and untouched.
|
28 |
-
<ul>
|
29 |
-
<li>
|
30 |
-
<a href='<?php echo $pluginURL; ?>' id='plugins' class='popup'>Deactivate and delete</a> this plugin.
|
31 |
-
</li>
|
32 |
-
<li>
|
33 |
-
<a href='https://downloads.wordpress.org/plugin/easy-adsense-lite.7.61.zip'>Download</a> the non-AJAX version of the plugin.
|
34 |
-
</li>
|
35 |
-
<li>
|
36 |
-
<a href='#' id='uploadHelp'>Upload and activate</a> the downloaded non-AJAX version.
|
37 |
-
</li>
|
38 |
-
<li>
|
39 |
-
Find and click on the the <strong>Easy AdSense Lite</strong> menu item under your <strong>Settings</strong> menu, and you should see the non-AJAX version.
|
40 |
-
</li>
|
41 |
-
</ul>
|
42 |
-
<strong class='red'>Please remember never to update the plugin if you are using the non-AJAX version, or it will get overwritten by the AJAX version. It's easy to recover though - just follow the above instructions again.</strong>
|
43 |
-
</div>
|
44 |
-
<script>
|
45 |
-
$(document).ready(function () {
|
46 |
-
$("#uploadHelp").click(function () {
|
47 |
-
bootbox.alert({title: 'How to Upload and Install a Plugin', message: '<p>To install follow steps 1 through 4 in the pictures below. Go to the admin page of your blog, click on "Plugins" on your sidebar menu, select "Add New" and click on "Upload". On some installations, you may be prompted to provide your FTP credentials.</p><br><img src="img/install.png" alt="Installation Help" style="max-width:80%;" class="center-block"/>'});
|
48 |
-
});
|
49 |
-
});
|
50 |
-
</script>
|
51 |
-
<?php
|
52 |
-
}
|
53 |
closeCell();
|
54 |
openCell("Contact Author", 'envelope', 4, "", 260);
|
55 |
require_once 'support.php';
|
17 |
$plgName = EzGA::getPlgName();
|
18 |
$plgMode = EzGA::getPlgMode();
|
19 |
require_once "$plgMode-intro.php";
|
20 |
+
$isPro = EzGA::$isPro;
|
21 |
+
$installImg = "img/install.png";
|
22 |
+
require 'no-ajax.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
closeCell();
|
24 |
openCell("Contact Author", 'envelope', 4, "", 260);
|
25 |
require_once 'support.php';
|
admin/no-ajax.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$plgMode = EZWP::getPlgMode();
|
3 |
+
$plgName = EZWP::getPlgName();
|
4 |
+
$pluginURL = admin_url('plugins.php');
|
5 |
+
$downloadURL = '';
|
6 |
+
if ($isPro) {
|
7 |
+
$downloadURL = "http://buy.thulasidas.com/update.php' class='popup";
|
8 |
+
}
|
9 |
+
else {
|
10 |
+
switch ($plgMode) {
|
11 |
+
case 'google-adsense':
|
12 |
+
case 'google-adsense-ultra':
|
13 |
+
$downloadURL = "https://downloads.wordpress.org/plugin/google-adsense-lite.1.81.zip";
|
14 |
+
break;
|
15 |
+
case 'adsense-now':
|
16 |
+
$downloadURL = "https://downloads.wordpress.org/plugin/adsense-now-lite.3.60.zip";
|
17 |
+
break;
|
18 |
+
case 'easy-adsense':
|
19 |
+
$downloadURL = "https://downloads.wordpress.org/plugin/easy-adsense-lite.7.61.zip";
|
20 |
+
break;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
if (empty($downloadURL)) {
|
24 |
+
return;
|
25 |
+
}
|
26 |
+
?>
|
27 |
+
<div style='padding:5px;margin:0;background-color:#ffdbdb' id="noAjax">
|
28 |
+
<h3>Go Back to Non-AJAX Version<br>
|
29 |
+
<small>Problems with the fancy AJAX interface?</small>
|
30 |
+
</h3>
|
31 |
+
You can always go back to the non-AJAX version if you are not happy with this slick new admin page, or if the plugin doesn't work as expected (ads not appearing on home/front page/posts, or any other kind of strange behavior). The AJAX version stores its options completely independent of the non-AJAX version. Your non-AJAX options are intact and untouched. Here are the steps to revert to the non-AJAX version:
|
32 |
+
<ul style="list-style: circle inside none">
|
33 |
+
<li>
|
34 |
+
<a href='<?php echo $pluginURL; ?>' id='plugins' class='popup' target="_blank">Deactivate and delete</a> this plugin.
|
35 |
+
</li>
|
36 |
+
<li>
|
37 |
+
<a href='<?php echo $downloadURL; ?>' target="_blank">Download</a> the non-AJAX version of the plugin.
|
38 |
+
</li>
|
39 |
+
<li>
|
40 |
+
<a href='<?php echo $installImg; ?>' id='uploadHelp' target="_blank">Upload and activate</a> the downloaded non-AJAX version.
|
41 |
+
</li>
|
42 |
+
<li>
|
43 |
+
Find and click on the the <strong><?php echo $plgName; ?></strong> menu item under your <strong>Settings</strong> menu, and you should see the non-AJAX version.
|
44 |
+
</li>
|
45 |
+
</ul>
|
46 |
+
<strong class='red'>Please remember never to update the plugin if you are using the non-AJAX version, or it will get overwritten by the AJAX version. It's easy to recover though - just follow the above instructions again.</strong>
|
47 |
+
</div>
|
48 |
+
<script>
|
49 |
+
jQuery("#uploadHelp").click(function (e) {
|
50 |
+
if (typeof bootbox !== "undefined") {
|
51 |
+
e.preventDefault();
|
52 |
+
bootbox.alert({title: 'How to Upload and Install a Plugin Zip file', message: '<p>To install follow steps 1 through 4 in the pictures below. Go to the admin page of your blog, click on "Plugins" on your sidebar menu, select "Add New" and click on "Upload". On some installations, you may be prompted to provide your FTP credentials.</p><br><img src="img/install.png" alt="Installation Help" style="max-width:80%;" class="center-block"/>'});
|
53 |
+
}
|
54 |
+
});
|
55 |
+
</script>
|
56 |
+
|
easy-adsense.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Easy Plugin for AdSense
|
5 |
Plugin URI: http://www.thulasidas.com/adsense
|
6 |
Description: <em>Lite Version</em>: Easiest way to show AdSense and make money from your blog. Configure it at <a href="options-general.php?page=wp-google-adsense.php">Settings → Easy AdSense Lite</a>.
|
7 |
-
Version: 8.
|
8 |
Author: Manoj Thulasidas
|
9 |
Author URI: http://www.thulasidas.com
|
10 |
*/
|
4 |
Plugin Name: Easy Plugin for AdSense
|
5 |
Plugin URI: http://www.thulasidas.com/adsense
|
6 |
Description: <em>Lite Version</em>: Easiest way to show AdSense and make money from your blog. Configure it at <a href="options-general.php?page=wp-google-adsense.php">Settings → Easy AdSense Lite</a>.
|
7 |
+
Version: 8.11
|
8 |
Author: Manoj Thulasidas
|
9 |
Author URI: http://www.thulasidas.com
|
10 |
*/
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://buy.thulasidas.com/easy-adsense
|
|
4 |
Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 8.
|
8 |
License: GPL2 or later
|
9 |
|
10 |
Easy Plugin for AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
|
@@ -148,6 +148,7 @@ A big "Thank You" to all my translators. Easy AdSense V2.6+ sports an *Easy Tran
|
|
148 |
|
149 |
== Change Log ==
|
150 |
|
|
|
151 |
* V8.10: Providing a downgrade path to the previous, non-AJAX version of the plugin. [Mar 16, 2015]
|
152 |
* V8.09: Documentation and usability enhancements. [Mar 13, 2015]
|
153 |
* V8.08: Documentation and usability enhancements. [Mar 11, 2015]
|
4 |
Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 8.11
|
8 |
License: GPL2 or later
|
9 |
|
10 |
Easy Plugin for AdSense manages all aspects of AdSense: insert ads into posts and sidebar, and add a Google Search box. Easiest and most complete AdSense Plugin!
|
148 |
|
149 |
== Change Log ==
|
150 |
|
151 |
+
* V8.11: Providing a downgrade path to the previous, non-AJAX version of the plugin. [Mar 19, 2015]
|
152 |
* V8.10: Providing a downgrade path to the previous, non-AJAX version of the plugin. [Mar 16, 2015]
|
153 |
* V8.09: Documentation and usability enhancements. [Mar 13, 2015]
|
154 |
* V8.08: Documentation and usability enhancements. [Mar 11, 2015]
|
wp-google-adsense.php
CHANGED
@@ -54,7 +54,16 @@ if (is_admin()) {
|
|
54 |
}
|
55 |
|
56 |
function printAdminPage() {
|
|
|
|
|
|
|
|
|
57 |
$src = plugins_url("admin/index.php", __FILE__);
|
|
|
|
|
|
|
|
|
|
|
58 |
?>
|
59 |
<script type="text/javascript">
|
60 |
function calcHeight() {
|
@@ -69,12 +78,16 @@ if (is_admin()) {
|
|
69 |
window.addEventListener('resize', calcHeight, false);
|
70 |
}
|
71 |
else if (window.attachEvent) {
|
72 |
-
window.attachEvent('onresize', calcHeight)
|
73 |
}
|
|
|
|
|
|
|
|
|
74 |
</script>
|
75 |
<?php
|
76 |
|
77 |
-
echo "<iframe src='$src' frameborder='0' style='overflow:hidden;overflow-x:hidden;overflow-y:hidden;width:100%;position:absolute;top:5px;left:-10px;right:0px;bottom:0px;' width='100%' height='900px' id='the_iframe' onLoad='calcHeight();'></iframe>";
|
78 |
}
|
79 |
|
80 |
static function switchTheme() {
|
@@ -141,7 +154,7 @@ if (is_admin()) {
|
|
141 |
}
|
142 |
add_action('admin_menu', array($gAd, 'addAdminPage'));
|
143 |
$gAd->addWidgets();
|
144 |
-
$file = dirname(__FILE__) .
|
145 |
register_activation_hook($file, array("GoogleAdSense", 'install'));
|
146 |
add_action('switch_theme', array("GoogleAdSense", 'switchTheme'));
|
147 |
}
|
54 |
}
|
55 |
|
56 |
function printAdminPage() {
|
57 |
+
$isPro = $this->isPro;
|
58 |
+
$installImg = $this->plgURL . "admin/img/install.png";
|
59 |
+
echo "<div class='error'>";
|
60 |
+
require $this->plgDir . '/admin/no-ajax.php';
|
61 |
$src = plugins_url("admin/index.php", __FILE__);
|
62 |
+
if (!@file_get_contents($src)) {
|
63 |
+
echo "<div style='padding:10px;margin:10px;font-size:1.3em;color:red;font-weight:500'>This plugin needs direct access to its files so that they can be loaded in an iFrame. Looks like you have some security setting denying the required access. Please allow access to the php files in <code>{$this->plgDir}/</code> or <em><strong>Go back to the Non-AJAX Version</strong></em> by following the directions above.</div>";
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
echo "</div>";
|
67 |
?>
|
68 |
<script type="text/javascript">
|
69 |
function calcHeight() {
|
78 |
window.addEventListener('resize', calcHeight, false);
|
79 |
}
|
80 |
else if (window.attachEvent) {
|
81 |
+
window.attachEvent('onresize', calcHeight);
|
82 |
}
|
83 |
+
jQuery(document).ready(function () {
|
84 |
+
jQuery("#the_iframe").show();
|
85 |
+
jQuery("#noAjax").hide();
|
86 |
+
});
|
87 |
</script>
|
88 |
<?php
|
89 |
|
90 |
+
echo "<iframe src='$src' frameborder='0' style='overflow:hidden;overflow-x:hidden;overflow-y:hidden;width:100%;position:absolute;top:5px;left:-10px;right:0px;bottom:0px;display:none;' width='100%' height='900px' id='the_iframe' onLoad='calcHeight();'></iframe>";
|
91 |
}
|
92 |
|
93 |
static function switchTheme() {
|
154 |
}
|
155 |
add_action('admin_menu', array($gAd, 'addAdminPage'));
|
156 |
$gAd->addWidgets();
|
157 |
+
$file = dirname(__FILE__) . "/{$gAd->slug}.php";
|
158 |
register_activation_hook($file, array("GoogleAdSense", 'install'));
|
159 |
add_action('switch_theme', array("GoogleAdSense", 'switchTheme'));
|
160 |
}
|