Version Description
- Fix: Hide widget on homepage option not working
- Tweak: Clean up code
Download this release
Release Info
Developer | ReneHermi |
Plugin | AdSense Plugin WP QUADS |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.6 to 1.5.3
- includes/admin/admin-notices.php +5 -5
- includes/admin/settings/register-settings.php +8 -23
- includes/admin/upgrades/upgrade-functions.php +11 -14
- includes/conditions.php +1 -2
- includes/scripts.php +1 -1
- includes/shortcodes.php +1 -1
- includes/template-functions.php +4 -7
- quick-adsense-reloaded.php +5 -2
- readme.txt +2 -12
includes/admin/admin-notices.php
CHANGED
@@ -265,7 +265,7 @@ function quads_update_notice() {
|
|
265 |
function quads_update_notice_v2(){
|
266 |
|
267 |
if( quads_is_pro_active() && (version_compare( QUADS_PRO_VERSION, '1.3.6', '<' ) ) ) {
|
268 |
-
$message = sprintf( __( 'You need to update <strong>WP QUADS PRO to version 1.3.6</strong> or higher. Your version of <strong>WP QUADS Pro</strong> is '.QUADS_PRO_VERSION. '.<br>WP QUADS Pro '.QUADS_PRO_VERSION.'
|
269 |
?>
|
270 |
<div class="notice notice-error">
|
271 |
<p><?php echo $message; ?></p>
|
@@ -274,7 +274,7 @@ function quads_update_notice_v2(){
|
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
-
* Show upgrade notice after updating from 1.5.2 to 1.5.3
|
278 |
* @return boolean
|
279 |
*/
|
280 |
function quads_update_notice_1_5_3(){
|
@@ -288,10 +288,10 @@ function quads_update_notice_1_5_3(){
|
|
288 |
|
289 |
//wp_die(QUADS_VERSION);
|
290 |
|
291 |
-
|
292 |
-
if( !empty($previous_version) &&
|
293 |
|
294 |
-
$message = sprintf( __( 'This is a huge update! The data structure of WP QUADS has been modified and improved for better performance and great new features. <br> For the case you\'d experience issues, we made a <a href="%1s" target="_self">backup of previous WP QUADS data</a>. So you can <a href="%2s" target="_new">switch back to the previous version</a> anytime. <br><br>Please <a href="%3s" target="_new">open first a support ticket</a> if you experience any issue.', 'quick-adsense-reloaded' ), admin_url() . '?page=quads-settings&tab=help', 'https://wpquads.com/docs/install-older-plugin-version/?utm_source=plugin_notice&utm_medium=admin&utm_campaign=install_older_version', 'https://wordpress.org/support/plugin/quick-adsense-reloaded' );
|
295 |
?>
|
296 |
<div class="notice notice-error">
|
297 |
<p><?php echo $message; ?></p>
|
265 |
function quads_update_notice_v2(){
|
266 |
|
267 |
if( quads_is_pro_active() && (version_compare( QUADS_PRO_VERSION, '1.3.6', '<' ) ) ) {
|
268 |
+
$message = sprintf( __( 'You need to update <strong>WP QUADS PRO to version 1.3.6</strong> or higher. Your version of <strong>WP QUADS Pro</strong> is '.QUADS_PRO_VERSION. '.<br>WP QUADS Pro '.QUADS_PRO_VERSION.' allows unlimited amount of ads. <br>Updating requires a valid <a href="%s" target="_new">license key</a>.', 'quick-adsense-reloaded' ), 'https://wpquads.com/#buy-wpquads?utm_source=plugin_notice&utm_medium=admin&utm_campaign=activate_license' );
|
269 |
?>
|
270 |
<div class="notice notice-error">
|
271 |
<p><?php echo $message; ?></p>
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
+
* Show upgrade notice after updating from 1.5.2 to 1.5.3
|
278 |
* @return boolean
|
279 |
*/
|
280 |
function quads_update_notice_1_5_3(){
|
288 |
|
289 |
//wp_die(QUADS_VERSION);
|
290 |
|
291 |
+
|
292 |
+
if( !empty($previous_version) && QUADS_VERSION == '1.5.3' ) {
|
293 |
|
294 |
+
$message = sprintf( __( 'This is a huge update! The data structure of WP QUADS has been modified and improved for better performance and great new features. <br> For the case you\'d experience any issues, we made a <a href="%1s" target="_self">backup of previous WP QUADS data</a>. So you can <a href="%2s" target="_new">switch back to the previous version</a> anytime. <br><br>Please <a href="%3s" target="_new">open first a support ticket</a> if you experience any issue.', 'quick-adsense-reloaded' ), admin_url() . '?page=quads-settings&tab=help', 'https://wpquads.com/docs/install-older-plugin-version/?utm_source=plugin_notice&utm_medium=admin&utm_campaign=install_older_version', 'https://wordpress.org/support/plugin/quick-adsense-reloaded' );
|
295 |
?>
|
296 |
<div class="notice notice-error">
|
297 |
<p><?php echo $message; ?></p>
|
includes/admin/settings/register-settings.php
CHANGED
@@ -130,9 +130,9 @@ function quads_get_registered_settings() {
|
|
130 |
'id' => 'maxads',
|
131 |
'name' => __( 'Limit Amount of ads:', 'quick-adsense-reloaded' ),
|
132 |
'desc' => __( ' ads on a page.', 'quick-adsense-reloaded' ),
|
133 |
-
'desc2' => sprintf( __( '<a href="%s" target="_blank">Read here</a> to learn how many AdSense ads are allowed. If you are unsure
|
134 |
'type' => 'select',
|
135 |
-
'std' =>
|
136 |
'options' => array(
|
137 |
1 => '1',
|
138 |
2 => '2',
|
@@ -196,7 +196,7 @@ function quads_get_registered_settings() {
|
|
196 |
'desc' => '<div class="adsense_admin_header">' . sprintf( __( 'Enter your ad codes below:</div>'
|
197 |
. '<ul style="margin-top:10px;">'
|
198 |
. '<li style="font-weight:600;">Select <i>AdSense</i> if you are using AdSense!</li>'
|
199 |
-
. '<li style="font-weight:600;">Use <i>Plain Text / HTML / JS</i> for all other ads! <br><strong>Caution:</strong> Adding AdSense code into
|
200 |
. '</ul>'
|
201 |
. '<div style="clear:both;">' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve this issue.', 'quick-adsense-reloaded' ), 'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=toplink' ) . ''
|
202 |
. '<br><a href="%s" target="_blank">Read here</a> to find out the most effective AdSense banner sizes. </div>'
|
@@ -576,7 +576,7 @@ function quads_get_settings_tabs() {
|
|
576 |
}
|
577 |
|
578 |
|
579 |
-
if( !empty( $settings['licenses'] ) && quads_is_extra()
|
580 |
$tabs['licenses'] = __( 'Licenses', 'quick-adsense-reloaded' );
|
581 |
}
|
582 |
|
@@ -1419,21 +1419,8 @@ function quads_log_permissions() {
|
|
1419 |
function quads_get_ads() {
|
1420 |
global $quads_options;
|
1421 |
|
1422 |
-
if (!isset($quads_options['ads'])
|
1423 |
-
|
1424 |
-
0 => __( 'Random Ads', 'quick-adsense-reloaded' ),
|
1425 |
-
1 => isset( $quads_options['ads']['ad1']['label'] ) ? $quads_options['ads']['ad1']['label'] : 'ad1',
|
1426 |
-
2 => isset( $quads_options['ads']['ad2']['label'] ) ? $quads_options['ads']['ad2']['label'] : 'ad2',
|
1427 |
-
3 => isset( $quads_options['ads']['ad3']['label'] ) ? $quads_options['ads']['ad3']['label'] : 'ad3',
|
1428 |
-
4 => isset( $quads_options['ads']['ad4']['label'] ) ? $quads_options['ads']['ad4']['label'] : 'ad4',
|
1429 |
-
5 => isset( $quads_options['ads']['ad5']['label'] ) ? $quads_options['ads']['ad5']['label'] : 'ad5',
|
1430 |
-
6 => isset( $quads_options['ads']['ad6']['label'] ) ? $quads_options['ads']['ad6']['label'] : 'ad6',
|
1431 |
-
7 => isset( $quads_options['ads']['ad7']['label'] ) ? $quads_options['ads']['ad7']['label'] : 'ad7',
|
1432 |
-
8 => isset( $quads_options['ads']['ad8']['label'] ) ? $quads_options['ads']['ad8']['label'] : 'ad8',
|
1433 |
-
9 => isset( $quads_options['ads']['ad9']['label'] ) ? $quads_options['ads']['ad9']['label'] : 'ad9',
|
1434 |
-
10 => isset( $quads_option['ads']['ad10']['label'] ) ? $quads_options['ads']['ad10']['label'] : 'ad10',
|
1435 |
-
);
|
1436 |
-
return $ads;
|
1437 |
}
|
1438 |
|
1439 |
// Start array with
|
@@ -1685,9 +1672,7 @@ function quads_count_normal_ads() {
|
|
1685 |
}
|
1686 |
|
1687 |
function quads_new_ad_callback(){
|
1688 |
-
if (quads_is_extra()) {
|
1689 |
echo '<a href="#" id="quads-add-new-ad">' . __('Add New Ad','quick-adsense-reloaded') . '</a>';
|
1690 |
-
}
|
1691 |
}
|
1692 |
|
1693 |
/**
|
@@ -1803,8 +1788,8 @@ function quads_adsense_code_callback( $args ) {
|
|
1803 |
</div>
|
1804 |
<textarea style="vertical-align:top;margin-right:20px;" class="large-text quads-textarea" cols="50" rows="10" id="quads_settings[ads][<?php echo $id; ?>][code]" name="quads_settings[ads][<?php echo $id; ?>][code]"><?php echo esc_textarea( stripslashes( $code ) ); ?></textarea>
|
1805 |
<!--<label for="quads_settings[ads][ <?php //echo $id; ?> ][code]"> <?php //echo $args['desc']; ?></label><br>//-->
|
1806 |
-
<label for="quads_shortcode_<?php echo $args['id'];?>">Post Shortcode:</label><input readonly id="quads_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" value='[quads id=<?php echo $args['id'];?>]' title="
|
1807 |
-
<label for="quads_php_shortcode_<?php echo $args['id'];?>">PHP:</label><input readonly id="quads_php_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" style="width:290px;" value="<?php echo do_shortcode('[quads id=<?php echo $args['id']; ?>]'); ?>" title="
|
1808 |
<br>
|
1809 |
<div class="quads_adsense_code">
|
1810 |
<input type="button" style="vertical-align:inherit;" class="button button-primary quads-add-adsense" value="Copy / Paste AdSense Code"> <span>or add Ad Slot ID & Publisher ID manually below:</span>
|
130 |
'id' => 'maxads',
|
131 |
'name' => __( 'Limit Amount of ads:', 'quick-adsense-reloaded' ),
|
132 |
'desc' => __( ' ads on a page.', 'quick-adsense-reloaded' ),
|
133 |
+
'desc2' => sprintf( __( '<a href="%s" target="_blank">Read here</a> to learn how many AdSense ads are allowed. If you are unsure select 3 ads.', 'quick-adsense-reloaded' ), 'http://wpquads.com/google-adsense-allowed-number-ads/' ),
|
134 |
'type' => 'select',
|
135 |
+
'std' => 3,
|
136 |
'options' => array(
|
137 |
1 => '1',
|
138 |
2 => '2',
|
196 |
'desc' => '<div class="adsense_admin_header">' . sprintf( __( 'Enter your ad codes below:</div>'
|
197 |
. '<ul style="margin-top:10px;">'
|
198 |
. '<li style="font-weight:600;">Select <i>AdSense</i> if you are using AdSense!</li>'
|
199 |
+
. '<li style="font-weight:600;">Use <i>Plain Text / HTML / JS</i> for all other ads! <br><strong>Caution:</strong> Adding AdSense code into Plain text field can result in non visible ads!</li></ul>', 'quick-adsense-reloaded' ), 'http://wpquads.com/effective-adsense-banner-size-formats/?utm_campaign=plugin&utm_source=general_tab&utm_medium=admin&utm_content=best_banner_sizes' )
|
200 |
. '</ul>'
|
201 |
. '<div style="clear:both;">' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve this issue.', 'quick-adsense-reloaded' ), 'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=toplink' ) . ''
|
202 |
. '<br><a href="%s" target="_blank">Read here</a> to find out the most effective AdSense banner sizes. </div>'
|
576 |
}
|
577 |
|
578 |
|
579 |
+
if( !empty( $settings['licenses'] ) && quads_is_extra() ) {
|
580 |
$tabs['licenses'] = __( 'Licenses', 'quick-adsense-reloaded' );
|
581 |
}
|
582 |
|
1419 |
function quads_get_ads() {
|
1420 |
global $quads_options;
|
1421 |
|
1422 |
+
if (!isset($quads_options['ads']) && 0 === count( $quads_options['ads'] ) ) {
|
1423 |
+
return array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1424 |
}
|
1425 |
|
1426 |
// Start array with
|
1672 |
}
|
1673 |
|
1674 |
function quads_new_ad_callback(){
|
|
|
1675 |
echo '<a href="#" id="quads-add-new-ad">' . __('Add New Ad','quick-adsense-reloaded') . '</a>';
|
|
|
1676 |
}
|
1677 |
|
1678 |
/**
|
1788 |
</div>
|
1789 |
<textarea style="vertical-align:top;margin-right:20px;" class="large-text quads-textarea" cols="50" rows="10" id="quads_settings[ads][<?php echo $id; ?>][code]" name="quads_settings[ads][<?php echo $id; ?>][code]"><?php echo esc_textarea( stripslashes( $code ) ); ?></textarea>
|
1790 |
<!--<label for="quads_settings[ads][ <?php //echo $id; ?> ][code]"> <?php //echo $args['desc']; ?></label><br>//-->
|
1791 |
+
<label for="quads_shortcode_<?php echo $args['id'];?>">Post Shortcode:</label><input readonly id="quads_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" value='[quads id=<?php echo $args['id'];?>]' title="Copy and paste the shortcode into the post editor, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
|
1792 |
+
<label for="quads_php_shortcode_<?php echo $args['id'];?>">PHP:</label><input readonly id="quads_php_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" style="width:290px;" value="<?php echo do_shortcode('[quads id=<?php echo $args['id']; ?>]'); ?>" title="Copy and paste the PHP code into your theme files, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
|
1793 |
<br>
|
1794 |
<div class="quads_adsense_code">
|
1795 |
<input type="button" style="vertical-align:inherit;" class="button button-primary quads-add-adsense" value="Copy / Paste AdSense Code"> <span>or add Ad Slot ID & Publisher ID manually below:</span>
|
includes/admin/upgrades/upgrade-functions.php
CHANGED
@@ -24,10 +24,6 @@ function quads_do_automatic_upgrades() {
|
|
24 |
$did_upgrade = false;
|
25 |
// Get current installed version
|
26 |
$quads_version = preg_replace( '/[^0-9.].*/', '', get_option( 'quads_version' ) );
|
27 |
-
|
28 |
-
// Previous version
|
29 |
-
$previous_version = get_option( 'quads_version_upgraded_from' );
|
30 |
-
|
31 |
|
32 |
// if( version_compare( $quads_version, '1.2.5', '<' ) ) {
|
33 |
// quads_store_adsense_args();
|
@@ -40,10 +36,10 @@ function quads_do_automatic_upgrades() {
|
|
40 |
quads_is_commercial_theme();
|
41 |
}
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
}
|
48 |
|
49 |
|
@@ -53,25 +49,26 @@ function quads_do_automatic_upgrades() {
|
|
53 |
$did_upgrade = true;
|
54 |
}
|
55 |
|
56 |
-
|
57 |
-
if( $did_upgrade ) {
|
58 |
-
|
59 |
}
|
60 |
}
|
61 |
add_action( 'admin_init', 'quads_do_automatic_upgrades' );
|
62 |
|
63 |
/**
|
64 |
-
* Update Settings for version 1.5.3
|
65 |
* Add new index $settings['ads']
|
66 |
*/
|
67 |
-
function
|
68 |
$settings = get_option( 'quads_settings' );
|
69 |
|
70 |
// Do not update - we already did it
|
71 |
if (isset($settings['ads'])){
|
72 |
-
//wp_die('
|
73 |
return false;
|
74 |
}
|
|
|
75 |
|
76 |
foreach ( $settings as $key => $value ) {
|
77 |
|
24 |
$did_upgrade = false;
|
25 |
// Get current installed version
|
26 |
$quads_version = preg_replace( '/[^0-9.].*/', '', get_option( 'quads_version' ) );
|
|
|
|
|
|
|
|
|
27 |
|
28 |
// if( version_compare( $quads_version, '1.2.5', '<' ) ) {
|
29 |
// quads_store_adsense_args();
|
36 |
quads_is_commercial_theme();
|
37 |
}
|
38 |
|
39 |
+
if( version_compare( $quads_version, '1.5.3', '<' ) ) {
|
40 |
+
quads_update_settings();
|
41 |
+
//quads_store_adsense_args();
|
42 |
+
quads_is_commercial_theme();
|
43 |
}
|
44 |
|
45 |
|
49 |
$did_upgrade = true;
|
50 |
}
|
51 |
|
52 |
+
// Update Version number
|
53 |
+
if( $did_upgrade ) {
|
54 |
+
update_option( 'quads_version', preg_replace( '/[^0-9.].*/', '', QUADS_VERSION ) );
|
55 |
}
|
56 |
}
|
57 |
add_action( 'admin_init', 'quads_do_automatic_upgrades' );
|
58 |
|
59 |
/**
|
60 |
+
* Update Settings for version 1.5.3
|
61 |
* Add new index $settings['ads']
|
62 |
*/
|
63 |
+
function quads_update_settings(){
|
64 |
$settings = get_option( 'quads_settings' );
|
65 |
|
66 |
// Do not update - we already did it
|
67 |
if (isset($settings['ads'])){
|
68 |
+
//wp_die('already updated');
|
69 |
return false;
|
70 |
}
|
71 |
+
//wp_die('update it');
|
72 |
|
73 |
foreach ( $settings as $key => $value ) {
|
74 |
|
includes/conditions.php
CHANGED
@@ -31,7 +31,7 @@ function quads_ad_is_allowed( $content = null ) {
|
|
31 |
}
|
32 |
|
33 |
// Frontpage check
|
34 |
-
if (is_front_page() &&
|
35 |
return true;
|
36 |
}
|
37 |
|
@@ -41,7 +41,6 @@ function quads_ad_is_allowed( $content = null ) {
|
|
41 |
(is_404() ) ||
|
42 |
(strpos( $content, '<!--NoAds-->' ) !== false) ||
|
43 |
(strpos( $content, '<!--OffAds-->' ) !== false) ||
|
44 |
-
(is_front_page() && !isset( $quads_options['visibility']['AppHome'] ) ) ||
|
45 |
(is_category() && !(isset( $quads_options['visibility']['AppCate'] ) ) ) ||
|
46 |
(is_archive() && !( isset( $quads_options['visibility']['AppArch'] ) ) ) ||
|
47 |
(is_tag() && !( isset( $quads_options['visibility']['AppTags'] ) ) ) ||
|
31 |
}
|
32 |
|
33 |
// Frontpage check
|
34 |
+
if (is_front_page() && isset( $quads_options['visibility']['AppHome'] ) ){
|
35 |
return true;
|
36 |
}
|
37 |
|
41 |
(is_404() ) ||
|
42 |
(strpos( $content, '<!--NoAds-->' ) !== false) ||
|
43 |
(strpos( $content, '<!--OffAds-->' ) !== false) ||
|
|
|
44 |
(is_category() && !(isset( $quads_options['visibility']['AppCate'] ) ) ) ||
|
45 |
(is_archive() && !( isset( $quads_options['visibility']['AppArch'] ) ) ) ||
|
46 |
(is_tag() && !( isset( $quads_options['visibility']['AppTags'] ) ) ) ||
|
includes/scripts.php
CHANGED
@@ -213,7 +213,7 @@ function quads_ads_head_script() {
|
|
213 |
if(typeof(edButtons)!='undefined') {
|
214 |
edadd = edButtons.length;
|
215 |
var dynads={"all":[
|
216 |
-
<?php for ($i=1;$i<=count( quads_get_ads() )-1;$i++) { if( isset($quads_options['
|
217 |
"0"]};
|
218 |
for(i=1;i<=<?php echo count( quads_get_ads() ) -1; ?>;i++) {
|
219 |
if(dynads.all[i-1]=="1") {
|
213 |
if(typeof(edButtons)!='undefined') {
|
214 |
edadd = edButtons.length;
|
215 |
var dynads={"all":[
|
216 |
+
<?php for ($i=1;$i<=count( quads_get_ads() )-1;$i++) { if( isset($quads_options['ad'.$i]['code']) && $quads_options['ad'.$i]['code'] !='' ){echo('"1",');}else{echo('"0",');}; } ?>
|
217 |
"0"]};
|
218 |
for(i=1;i<=<?php echo count( quads_get_ads() ) -1; ?>;i++) {
|
219 |
if(dynads.all[i-1]=="1") {
|
includes/shortcodes.php
CHANGED
@@ -44,7 +44,7 @@ function quads_shortcode_display_ad( $atts ) {
|
|
44 |
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
45 |
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
46 |
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
47 |
-
'float:none;margin
|
48 |
|
49 |
$adsalign = isset($quads_options['ads']['ad' . $id]['align']) ? $quads_options['ads']['ad' . $id]['align'] : 3; // default
|
50 |
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default
|
44 |
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
45 |
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
46 |
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
47 |
+
'float:none;margin:0px;');
|
48 |
|
49 |
$adsalign = isset($quads_options['ads']['ad' . $id]['align']) ? $quads_options['ads']['ad' . $id]['align'] : 3; // default
|
50 |
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default
|
includes/template-functions.php
CHANGED
@@ -721,17 +721,14 @@ function quads_get_inline_ad_style( $id ) {
|
|
721 |
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
722 |
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
723 |
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
724 |
-
'float:none;margin
|
725 |
|
726 |
// Alignment
|
727 |
-
$adsalign =
|
728 |
|
729 |
// Margin
|
730 |
-
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default
|
731 |
-
$margin = sprintf( $styleArray[$adsalign], $adsmargin );
|
732 |
-
|
733 |
-
//wp_die($quads_options['ads']['ad' . $id]['margin']);
|
734 |
-
//wp_die('ad'.$id);
|
735 |
|
736 |
// Do not create any inline style on AMP site
|
737 |
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
721 |
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
722 |
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
723 |
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
724 |
+
'float:none;margin:0px;');
|
725 |
|
726 |
// Alignment
|
727 |
+
$adsalign = $quads_options['ads']['ad' . $id]['align'];
|
728 |
|
729 |
// Margin
|
730 |
+
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default optin = 3
|
731 |
+
$margin = sprintf( $styleArray[( int ) $adsalign], $adsmargin );
|
|
|
|
|
|
|
732 |
|
733 |
// Do not create any inline style on AMP site
|
734 |
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
quick-adsense-reloaded.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
|
7 |
* Author: Rene Hermenau, WP-Staging
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
-
* Version: 1.5.
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
@@ -35,7 +35,7 @@ if( !defined( 'ABSPATH' ) )
|
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'QUADS_VERSION' ) ) {
|
38 |
-
define( 'QUADS_VERSION', '1.5.
|
39 |
}
|
40 |
|
41 |
// Plugin name
|
@@ -61,6 +61,9 @@ $ad_count_custom = 0; // Number of active custom ads which are shown on the site
|
|
61 |
$ad_count_widget = 0; // Number of active ads in widgets
|
62 |
$AdsId = array(); // Array of active ad id's
|
63 |
$maxWidgets = 10; // number of widgets
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
if( !class_exists( 'QuickAdsenseReloaded' ) ) :
|
6 |
* Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
|
7 |
* Author: Rene Hermenau, WP-Staging
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
+
* Version: 1.5.3
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'QUADS_VERSION' ) ) {
|
38 |
+
define( 'QUADS_VERSION', '1.5.3' );
|
39 |
}
|
40 |
|
41 |
// Plugin name
|
61 |
$ad_count_widget = 0; // Number of active ads in widgets
|
62 |
$AdsId = array(); // Array of active ad id's
|
63 |
$maxWidgets = 10; // number of widgets
|
64 |
+
//$maxAds = 10; // number of regular ads
|
65 |
+
//$AdsWidName = 'AdsWidget%d (WP QUADS)';
|
66 |
+
//$AdsWidName = 'AdsWidget%d (Quick Adsense Reloaded)';
|
67 |
|
68 |
|
69 |
if( !class_exists( 'QuickAdsenseReloaded' ) ) :
|
readme.txt
CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
9 |
Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.8
|
12 |
-
Stable tag: 1.5.
|
13 |
|
14 |
Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
|
15 |
|
@@ -129,18 +129,8 @@ Alternative Installation:
|
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
-
= 1.5.
|
133 |
-
* Fix: License tab not shown after update of WP QUADS to version 1.5.5 and WP QUADS PRO is lower than version 1.3.3
|
134 |
-
* Fix: Quicktags button in editor not shown
|
135 |
-
* Fix: Margin option not working when ad layout floating option is default
|
136 |
-
|
137 |
-
= 1.5.5 =
|
138 |
-
* Fix: No ad position visible after new installation
|
139 |
-
* Fix: Show Add new Ad button only when wp quads pro is installed
|
140 |
-
|
141 |
-
= 1.5.4 =
|
142 |
* Fix: Hide widget on homepage option not working
|
143 |
-
* Tweak: Change default value of ad limitation to unlimited ads
|
144 |
* Tweak: Clean up code
|
145 |
|
146 |
= 1.5.3 =
|
9 |
Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.8
|
12 |
+
Stable tag: 1.5.3
|
13 |
|
14 |
Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
|
15 |
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
+
= 1.5.3 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
* Fix: Hide widget on homepage option not working
|
|
|
134 |
* Tweak: Clean up code
|
135 |
|
136 |
= 1.5.3 =
|