AdSense Plugin WP QUADS - Version 1.5.5

Version Description

  • Fix: No ad position visible after new installation
  • Fix: Show Add new Ad button only when wp quads pro is installed
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 AdSense Plugin WP QUADS
Version 1.5.5
Comparing to
See all releases

Code changes from version 1.5.4 to 1.5.5

includes/admin/settings/register-settings.php CHANGED
@@ -1419,8 +1419,21 @@ function quads_log_permissions() {
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,7 +1685,9 @@ function quads_count_normal_ads() {
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,8 +1803,8 @@ function quads_adsense_code_callback( $args ) {
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="&lt;?php echo do_shortcode('[quads id=<?php echo $args['id']; ?>]'); ?&gt;" 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>
1419
  function quads_get_ads() {
1420
  global $quads_options;
1421
 
1422
+ if (!isset($quads_options['ads']) || ( isset($quads_options['ads']) && count( $quads_options['ads'] ) === 0) ) {
1423
+ $ads = array(
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
  }
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
  </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="Optional: Copy and paste the shortcode into the post editor, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
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="&lt;?php echo do_shortcode('[quads id=<?php echo $args['id']; ?>]'); ?&gt;" title="Optional: Copy and paste the PHP code into your theme files, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
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>
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.4
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
@@ -35,8 +35,7 @@ if( !defined( 'ABSPATH' ) )
35
 
36
  // Plugin version
37
  if( !defined( 'QUADS_VERSION' ) ) {
38
- define( 'QUADS_VERSION', '1.5.4' );
39
- //define( 'QUADS_VERSION', '1.5.4' );
40
  }
41
 
42
  // Plugin name
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.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
 
36
  // Plugin version
37
  if( !defined( 'QUADS_VERSION' ) ) {
38
+ define( 'QUADS_VERSION', '1.5.5' );
 
39
  }
40
 
41
  // Plugin name
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.4
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,6 +129,10 @@ Alternative Installation:
129
 
130
  == Changelog ==
131
 
 
 
 
 
132
  = 1.5.4 =
133
  * Fix: Hide widget on homepage option not working
134
  * Tweak: Change default value of ad limitation to unlimited ads
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.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
 
130
  == Changelog ==
131
 
132
+ = 1.5.5 =
133
+ * Fix: No ad position visible after new installation
134
+ * Fix: Show Add new Ad button only when wp quads pro is installed
135
+
136
  = 1.5.4 =
137
  * Fix: Hide widget on homepage option not working
138
  * Tweak: Change default value of ad limitation to unlimited ads