Version Description
(September 29, 2022) =
- Fix: centering for dummy and image ads
- Fix: positioning migration if ads are centered
- Fix: remove additional clearfix
br
if ad is centered
Download this release
Release Info
Developer | advancedads |
Plugin | Advanced Ads |
Version | 1.36.1 |
Comparing to | |
See all releases |
Code changes from version 1.36.0 to 1.36.1
- advanced-ads.php +2 -2
- changelog.txt +6 -0
- classes/ad.php +2 -1
- classes/ad_type_dummy.php +1 -1
- classes/ad_type_image.php +1 -1
- languages/advanced-ads.pot +12 -12
- lib/yoast/i18n-module/CHANGELOG.md +0 -57
- modules/ad-positioning/classes/ad-positioning.php +17 -3
- readme.txt +7 -1
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.
|
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.
|
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.1
|
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.1' );
|
43 |
|
44 |
// Autoloading, modules and functions.
|
45 |
|
changelog.txt
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.36.0 (September 27, 2022) =
|
4 |
|
5 |
- Feature: add a Usage box to the ad edit screen with notes, shortcode and PHP function information
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.36.1 (September 29, 2022) =
|
4 |
+
|
5 |
+
- Fix: centering for dummy and image ads
|
6 |
+
- Fix: positioning migration if ads are centered
|
7 |
+
- Fix: remove additional clearfix `br` if ad is centered
|
8 |
+
|
9 |
= 1.36.0 (September 27, 2022) =
|
10 |
|
11 |
- Feature: add a Usage box to the ad edit screen with notes, shortcode and PHP function information
|
classes/ad.php
CHANGED
@@ -693,7 +693,7 @@ class Advanced_Ads_Ad {
|
|
693 |
// add a clearfix, if set.
|
694 |
if (
|
695 |
( ! empty( $this->args['is_top_level'] ) && ! empty( $this->args['placement_clearfix'] ) )
|
696 |
-
||
|
697 |
) {
|
698 |
$output .= '<br style="clear: both; display: block; float: none;"/>';
|
699 |
}
|
@@ -849,6 +849,7 @@ class Advanced_Ads_Ad {
|
|
849 |
break;
|
850 |
case 'center':
|
851 |
case 'center_nofloat':
|
|
|
852 |
$wrapper['style']['margin-left'] = 'auto';
|
853 |
$wrapper['style']['margin-right'] = 'auto';
|
854 |
|
693 |
// add a clearfix, if set.
|
694 |
if (
|
695 |
( ! empty( $this->args['is_top_level'] ) && ! empty( $this->args['placement_clearfix'] ) )
|
696 |
+
|| $this->options( 'output.clearfix' )
|
697 |
) {
|
698 |
$output .= '<br style="clear: both; display: block; float: none;"/>';
|
699 |
}
|
849 |
break;
|
850 |
case 'center':
|
851 |
case 'center_nofloat':
|
852 |
+
case 'center_float':
|
853 |
$wrapper['style']['margin-left'] = 'auto';
|
854 |
$wrapper['style']['margin-right'] = 'auto';
|
855 |
|
classes/ad_type_dummy.php
CHANGED
@@ -61,7 +61,7 @@ class Advanced_Ads_Ad_Type_Dummy extends Advanced_Ads_Ad_Type_Abstract{
|
|
61 |
*/
|
62 |
public function prepare_output( $ad ) {
|
63 |
$style = '';
|
64 |
-
if ( isset( $ad->output['position'] ) &&
|
65 |
$style .= 'display: inline-block;';
|
66 |
}
|
67 |
$style = '' !== $style ? 'style="' . $style . '"' : '';
|
61 |
*/
|
62 |
public function prepare_output( $ad ) {
|
63 |
$style = '';
|
64 |
+
if ( isset( $ad->output['position'] ) && strpos( $ad->output['position'], 'center' ) === 0 ) {
|
65 |
$style .= 'display: inline-block;';
|
66 |
}
|
67 |
$style = '' !== $style ? 'style="' . $style . '"' : '';
|
classes/ad_type_image.php
CHANGED
@@ -138,7 +138,7 @@ class Advanced_Ads_Ad_Type_Image extends Advanced_Ads_Ad_Type_Abstract {
|
|
138 |
}
|
139 |
|
140 |
// add css rule to be able to center the ad.
|
141 |
-
if ( isset( $ad->output['position'] ) &&
|
142 |
$style .= 'display: inline-block;';
|
143 |
}
|
144 |
|
138 |
}
|
139 |
|
140 |
// add css rule to be able to center the ad.
|
141 |
+
if ( isset( $ad->output['position'] ) && strpos( $ad->output['position'], 'center' ) === 0 ) {
|
142 |
$style .= 'display: inline-block;';
|
143 |
}
|
144 |
|
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.
|
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-
|
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"
|
@@ -3371,48 +3371,48 @@ msgstr ""
|
|
3371 |
msgid "Learn how to display alternative content to ad block users <a href=\"%s\" target=\"_blank\">in the manual</a>."
|
3372 |
msgstr ""
|
3373 |
|
3374 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3375 |
msgid "Theme’s Default"
|
3376 |
msgstr ""
|
3377 |
|
3378 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3379 |
msgid "The ad will behave as predefined by the theme."
|
3380 |
msgstr ""
|
3381 |
|
3382 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3383 |
msgctxt "Layout options \"Text Flow\" heading"
|
3384 |
msgid "Float"
|
3385 |
msgstr ""
|
3386 |
|
3387 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3388 |
msgid "Text will wrap around the ad and its margin."
|
3389 |
msgstr ""
|
3390 |
|
3391 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3392 |
msgctxt "Layout options \"Text Flow\" heading"
|
3393 |
msgid "Block"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3397 |
msgid "Text will continue after the ad and its margin."
|
3398 |
msgstr ""
|
3399 |
|
3400 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3401 |
msgctxt "Ad positioning spacing label"
|
3402 |
msgid "Top"
|
3403 |
msgstr ""
|
3404 |
|
3405 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3406 |
msgctxt "Ad positioning spacing label"
|
3407 |
msgid "Right"
|
3408 |
msgstr ""
|
3409 |
|
3410 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3411 |
msgctxt "Ad positioning spacing label"
|
3412 |
msgid "Bottom"
|
3413 |
msgstr ""
|
3414 |
|
3415 |
-
#: modules/ad-positioning/classes/ad-positioning.php:
|
3416 |
msgctxt "Ad positioning spacing label"
|
3417 |
msgid "Left"
|
3418 |
msgstr ""
|
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"
|
3371 |
msgid "Learn how to display alternative content to ad block users <a href=\"%s\" target=\"_blank\">in the manual</a>."
|
3372 |
msgstr ""
|
3373 |
|
3374 |
+
#: modules/ad-positioning/classes/ad-positioning.php:112
|
3375 |
msgid "Theme’s Default"
|
3376 |
msgstr ""
|
3377 |
|
3378 |
+
#: modules/ad-positioning/classes/ad-positioning.php:113
|
3379 |
msgid "The ad will behave as predefined by the theme."
|
3380 |
msgstr ""
|
3381 |
|
3382 |
+
#: modules/ad-positioning/classes/ad-positioning.php:119
|
3383 |
msgctxt "Layout options \"Text Flow\" heading"
|
3384 |
msgid "Float"
|
3385 |
msgstr ""
|
3386 |
|
3387 |
+
#: modules/ad-positioning/classes/ad-positioning.php:120
|
3388 |
msgid "Text will wrap around the ad and its margin."
|
3389 |
msgstr ""
|
3390 |
|
3391 |
+
#: modules/ad-positioning/classes/ad-positioning.php:127
|
3392 |
msgctxt "Layout options \"Text Flow\" heading"
|
3393 |
msgid "Block"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
+
#: modules/ad-positioning/classes/ad-positioning.php:128
|
3397 |
msgid "Text will continue after the ad and its margin."
|
3398 |
msgstr ""
|
3399 |
|
3400 |
+
#: modules/ad-positioning/classes/ad-positioning.php:177
|
3401 |
msgctxt "Ad positioning spacing label"
|
3402 |
msgid "Top"
|
3403 |
msgstr ""
|
3404 |
|
3405 |
+
#: modules/ad-positioning/classes/ad-positioning.php:180
|
3406 |
msgctxt "Ad positioning spacing label"
|
3407 |
msgid "Right"
|
3408 |
msgstr ""
|
3409 |
|
3410 |
+
#: modules/ad-positioning/classes/ad-positioning.php:183
|
3411 |
msgctxt "Ad positioning spacing label"
|
3412 |
msgid "Bottom"
|
3413 |
msgstr ""
|
3414 |
|
3415 |
+
#: modules/ad-positioning/classes/ad-positioning.php:186
|
3416 |
msgctxt "Ad positioning spacing label"
|
3417 |
msgid "Left"
|
3418 |
msgstr ""
|
lib/yoast/i18n-module/CHANGELOG.md
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
# Change Log
|
2 |
-
All notable changes to this project will be documented in this file.
|
3 |
-
|
4 |
-
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5 |
-
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6 |
-
|
7 |
-
## 3.1.1
|
8 |
-
|
9 |
-
### Fixed
|
10 |
-
- Reverts the capitalization of the class names.
|
11 |
-
|
12 |
-
## 3.1.0
|
13 |
-
|
14 |
-
### Fixed
|
15 |
-
- Fixes a bug where a 'You're using WordPress in a language we don't support yet.' notice would be shown for formal and informal locales when the locale actually was supported.
|
16 |
-
|
17 |
-
## 3.0.0
|
18 |
-
|
19 |
-
### Added
|
20 |
-
- Added functionality to handle how the i18n-promobox notification is displayed.
|
21 |
-
|
22 |
-
### Changed
|
23 |
-
- [DEPRECATION] Postfix all classes with _v3. This prevents autoload collisions with 2.0 versions.
|
24 |
-
|
25 |
-
## 2.0.0
|
26 |
-
|
27 |
-
### Added
|
28 |
-
- Add native support for WordPress.org
|
29 |
-
|
30 |
-
### Changed
|
31 |
-
- [DEPRECATION] Postfix all classes with _v2. This prevents autoload collisions with 1.0 versions.
|
32 |
-
|
33 |
-
## 1.2.1
|
34 |
-
|
35 |
-
### Removed
|
36 |
-
- Remove backwards incompatible changes. These are only backwards incompatible in a WordPress context, but this is the target audience.
|
37 |
-
|
38 |
-
## 1.2.0
|
39 |
-
|
40 |
-
### Added
|
41 |
-
- Add native support for WordPress.org
|
42 |
-
|
43 |
-
## 1.1.0
|
44 |
-
|
45 |
-
### Changed
|
46 |
-
- Use the user locale for deciding whether to display the message to the user.
|
47 |
-
|
48 |
-
## 1.0.1
|
49 |
-
|
50 |
-
### Fixed
|
51 |
-
- Fix issue where a notice would be shown if the API response had no wp_locale.
|
52 |
-
|
53 |
-
## 1.0.0
|
54 |
-
|
55 |
-
### Added
|
56 |
-
- Initial release of the i18n module to show the user a notice about their
|
57 |
-
language not having been translated to 100%.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modules/ad-positioning/classes/ad-positioning.php
CHANGED
@@ -44,12 +44,14 @@ class Advanced_Ads_Ad_Positioning {
|
|
44 |
* @return void
|
45 |
*/
|
46 |
private function migrate_values() {
|
|
|
|
|
47 |
$this->positioning['margin'] = array_merge(
|
48 |
$this->positioning['margin'],
|
49 |
-
array_map( 'intval', $
|
50 |
);
|
51 |
|
52 |
-
$this->positioning['position'] = $
|
53 |
// instead of having an empty value, set an explicit default.
|
54 |
if ( empty( $this->positioning['position'] ) ) {
|
55 |
$this->positioning['position'] = 'none';
|
@@ -58,10 +60,22 @@ class Advanced_Ads_Ad_Positioning {
|
|
58 |
|
59 |
// left, center, right are the old values, if it's none of these we've already migrated.
|
60 |
if ( ! in_array( $this->positioning['position'], array( 'left', 'center', 'right' ), true ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
return;
|
62 |
}
|
63 |
|
64 |
-
$this->positioning['clearfix'] = $
|
65 |
$this->positioning['position'] .= $this->positioning['clearfix'] ? '_nofloat' : '_float';
|
66 |
}
|
67 |
|
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'],
|
51 |
+
array_map( 'intval', $options['margin'] )
|
52 |
);
|
53 |
|
54 |
+
$this->positioning['position'] = $options['position'];
|
55 |
// instead of having an empty value, set an explicit default.
|
56 |
if ( empty( $this->positioning['position'] ) ) {
|
57 |
$this->positioning['position'] = 'none';
|
60 |
|
61 |
// left, center, right are the old values, if it's none of these we've already migrated.
|
62 |
if ( ! in_array( $this->positioning['position'], array( 'left', 'center', 'right' ), true ) ) {
|
63 |
+
// ensure we get an array with min two elements.
|
64 |
+
$position = explode( '_', $this->positioning['position'] . '_' );
|
65 |
+
|
66 |
+
// explicitly set clearfix option.
|
67 |
+
$this->positioning['clearfix'] = $position[0] !== 'center' && $position[1] === 'nofloat';
|
68 |
+
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( $this->positioning['position'] === 'center' ) {
|
73 |
+
$this->positioning['position'] = 'center_nofloat';
|
74 |
+
|
75 |
return;
|
76 |
}
|
77 |
|
78 |
+
$this->positioning['clearfix'] = ! empty( $options['clearfix'] );
|
79 |
$this->positioning['position'] .= $this->positioning['clearfix'] ? '_nofloat' : '_float';
|
80 |
}
|
81 |
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -337,6 +337,12 @@ Yes. You can use plenty of [hooks](https://wpadvancedads.com/codex/) to customiz
|
|
337 |
|
338 |
== Changelog ==
|
339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
= 1.36.0 (September 27, 2022) =
|
341 |
|
342 |
- Feature: add a Usage box to the ad edit screen with notes, shortcode and PHP function information
|
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 |
|
338 |
== Changelog ==
|
339 |
|
340 |
+
= 1.36.1 (September 29, 2022) =
|
341 |
+
|
342 |
+
- Fix: centering for dummy and image ads
|
343 |
+
- Fix: positioning migration if ads are centered
|
344 |
+
- Fix: remove additional clearfix `br` if ad is centered
|
345 |
+
|
346 |
= 1.36.0 (September 27, 2022) =
|
347 |
|
348 |
- Feature: add a Usage box to the ad edit screen with notes, shortcode and PHP function information
|