Advanced Ads - Version 1.36.2

Version Description

(September 29, 2022) =

  • Fix: ensure well formed positioning array
Download this release

Release Info

Developer advancedads
Plugin Icon 128x128 Advanced Ads
Version 1.36.2
Comparing to
See all releases

Code changes from version 1.36.1 to 1.36.2

advanced-ads.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.36.1
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.com
18
  * Text Domain: advanced-ads
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
39
  // general and global slug, e.g. to store options in WP.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.36.1' );
43
 
44
  // Autoloading, modules and functions.
45
 
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.36.2
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.com
18
  * Text Domain: advanced-ads
39
  // general and global slug, e.g. to store options in WP.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
+ define( 'ADVADS_VERSION', '1.36.2' );
43
 
44
  // Autoloading, modules and functions.
45
 
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 1.36.1 (September 29, 2022) =
4
 
5
  - Fix: centering for dummy and image ads
1
  == Changelog ==
2
 
3
+ = 1.36.2 (September 29, 2022) =
4
+
5
+ - Fix: ensure well formed positioning array
6
+
7
  = 1.36.1 (September 29, 2022) =
8
 
9
  - Fix: centering for dummy and image ads
languages/advanced-ads.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Advanced Ads 1.36.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: webgilde <support@wpadvancedads.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-09-29T08:18:35+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: advanced-ads\n"
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Advanced Ads 1.36.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/advanced-ads/\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: webgilde <support@wpadvancedads.com>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-09-29T12:16:26+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: advanced-ads\n"
modules/ad-positioning/classes/ad-positioning.php CHANGED
@@ -44,7 +44,7 @@ class Advanced_Ads_Ad_Positioning {
44
  * @return void
45
  */
46
  private function migrate_values() {
47
- $options = $this->ad->options()['output'];
48
 
49
  $this->positioning['margin'] = array_merge(
50
  $this->positioning['margin'],
@@ -195,4 +195,18 @@ class Advanced_Ads_Ad_Positioning {
195
 
196
  return ob_get_clean();
197
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  }
44
  * @return void
45
  */
46
  private function migrate_values() {
47
+ $options = $this->get_options();
48
 
49
  $this->positioning['margin'] = array_merge(
50
  $this->positioning['margin'],
195
 
196
  return ob_get_clean();
197
  }
198
+
199
+ /**
200
+ * Get a well-formed array to work with.
201
+ *
202
+ * @return array
203
+ */
204
+ private function get_options() {
205
+ $options = $this->ad->options();
206
+ if ( empty( $options['output'] ) ) {
207
+ return $this->positioning;
208
+ }
209
+
210
+ return wp_parse_args( $options['output'], $this->positioning );
211
+ }
212
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ads, adsense, amp, ads.txt, ad rotations, ad blocker, amazon, banner, clic
4
  Requires at least: 4.9
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
- Stable tag: 1.36.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -337,6 +337,10 @@ Yes. You can use plenty of [hooks](https://wpadvancedads.com/codex/) to customiz
337
 
338
  == Changelog ==
339
 
 
 
 
 
340
  = 1.36.1 (September 29, 2022) =
341
 
342
  - Fix: centering for dummy and image ads
4
  Requires at least: 4.9
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
+ Stable tag: 1.36.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
337
 
338
  == Changelog ==
339
 
340
+ = 1.36.2 (September 29, 2022) =
341
+
342
+ - Fix: ensure well formed positioning array
343
+
344
  = 1.36.1 (September 29, 2022) =
345
 
346
  - Fix: centering for dummy and image ads