Advanced Ads - Version 1.31.1

Version Description

  • Fix: show ad edit button when Advanced Ads block is used
  • Fix: revert regression from expired view when filtering by weekday
Download this release

Release Info

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

Code changes from version 1.31.0 to 1.31.1

admin/includes/class-list-filters.php CHANGED
@@ -86,6 +86,7 @@ class Advanced_Ads_Ad_List_Filters {
86
  $all_filters = array(
87
  'all_sizes' => array(),
88
  'all_types' => array(),
 
89
  'all_groups' => array(),
90
  );
91
 
@@ -465,7 +466,10 @@ class Advanced_Ads_Ad_List_Filters {
465
  }
466
 
467
  if ( isset( $request['addate'] ) ) {
468
- $posts = $this->filter_expired_ads( urldecode( $request['addate'] ), $using_original ? $this->all_ads : $posts );
 
 
 
469
  }
470
 
471
  $posts = apply_filters( 'advanced-ads-ad-list-filter', $posts, $this->all_ads_options );
86
  $all_filters = array(
87
  'all_sizes' => array(),
88
  'all_types' => array(),
89
+ 'all_dates' => array(),
90
  'all_groups' => array(),
91
  );
92
 
466
  }
467
 
468
  if ( isset( $request['addate'] ) ) {
469
+ $filter_value = urldecode( $request['addate'] );
470
+ if ( in_array( $filter_value, array( 'advads-filter-expired', 'advads-filter-expiring' ), true ) ) {
471
+ $posts = $this->filter_expired_ads( $filter_value, $using_original ? $this->all_ads : $posts );
472
+ }
473
  }
474
 
475
  $posts = apply_filters( 'advanced-ads-ad-list-filter', $posts, $this->all_ads_options );
admin/views/ad-list-filters.php CHANGED
@@ -29,6 +29,14 @@ if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] )
29
  <?php endforeach; ?>
30
  </select>
31
  <?php endif; ?>
 
 
 
 
 
 
 
 
32
  <?php if ( ! empty( $all_filters['all_groups'] ) ) : ?>
33
  <select id="advads-filter-group" name="adgroup">
34
  <option value="">- <?php esc_html_e( 'all ad groups', 'advanced-ads' ); ?> -</option>
29
  <?php endforeach; ?>
30
  </select>
31
  <?php endif; ?>
32
+ <?php if ( ! empty( $all_filters['all_dates'] ) ) : ?>
33
+ <select id="advads-filter-date" name="addate">
34
+ <option value="">- <?php esc_html_e( 'all ad dates', 'advanced-ads' ); ?> -</option>
35
+ <?php foreach ( $all_filters['all_dates'] as $key => $value ) : ?>
36
+ <option <?php selected( $ad_date, $key ); ?> value="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $value ); ?></option>
37
+ <?php endforeach; ?>
38
+ </select>
39
+ <?php endif; ?>
40
  <?php if ( ! empty( $all_filters['all_groups'] ) ) : ?>
41
  <select id="advads-filter-group" name="adgroup">
42
  <option value="">- <?php esc_html_e( 'all ad groups', 'advanced-ads' ); ?> -</option>
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.31.0
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.31.0' );
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.31.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.31.1' );
43
 
44
  // Autoloading, modules and functions.
45
 
classes/utils.php CHANGED
@@ -58,7 +58,7 @@ class Advanced_Ads_Utils {
58
  $_style_values_string = '';
59
  foreach ( $_values as $_style_attr => $_style_values ) {
60
  if ( is_array( $_style_values ) ) {
61
- $_style_values_string .= $_style_attr . ': ' . implode( ' ', $_style_values ) . '; ';
62
  } else {
63
  $_style_values_string .= $_style_attr . ': ' . $_style_values . '; ';
64
  }
@@ -66,11 +66,13 @@ class Advanced_Ads_Utils {
66
  $result .= " style=\"$_style_values_string\"";
67
  } else {
68
  if ( is_array( $_values ) ) {
69
- $_values_string = esc_attr( implode( ' ', $_values ) ); } else {
70
- $_values_string = esc_attr( $_values ); }
71
- if ( $_values_string !== '' ) {
72
- $result .= " $_html_attr=\"$_values_string\"";
73
- }
 
 
74
  }
75
  }
76
  return $result;
58
  $_style_values_string = '';
59
  foreach ( $_values as $_style_attr => $_style_values ) {
60
  if ( is_array( $_style_values ) ) {
61
+ $_style_values_string .= $_style_attr . ': ' . implode( ' ', array_filter( $_style_values ) ) . '; ';
62
  } else {
63
  $_style_values_string .= $_style_attr . ': ' . $_style_values . '; ';
64
  }
66
  $result .= " style=\"$_style_values_string\"";
67
  } else {
68
  if ( is_array( $_values ) ) {
69
+ $_values_string = esc_attr( implode( ' ', array_filter( $_values ) ) );
70
+ } else {
71
+ $_values_string = esc_attr( $_values );
72
+ }
73
+ if ( $_values_string !== '' ) {
74
+ $result .= " $_html_attr=\"$_values_string\"";
75
+ }
76
  }
77
  }
78
  return $result;
languages/advanced-ads.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Advanced Ads plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Advanced Ads 1.31.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-01-25T07:06:36-06:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: advanced-ads\n"
@@ -537,18 +537,18 @@ msgstr ""
537
  msgid "Download failed. <a href=\"%s\" target=\"_blank\">Click here to learn why</a>."
538
  msgstr ""
539
 
540
- #: admin/includes/class-list-filters.php:140
541
  #: modules/gadsense/admin/admin.php:73
542
  #: modules/gadsense/admin/views/adsense-ad-parameters.php:109
543
  msgid "Responsive"
544
  msgstr ""
545
 
546
- #: admin/includes/class-list-filters.php:512
547
  msgctxt "Post list header for expired ads."
548
  msgid "Expired"
549
  msgstr ""
550
 
551
- #: admin/includes/class-list-filters.php:552
552
  msgctxt "Post list header for ads expiring in the future."
553
  msgid "Expiring"
554
  msgstr ""
@@ -1360,6 +1360,10 @@ msgid "all ad sizes"
1360
  msgstr ""
1361
 
1362
  #: admin/views/ad-list-filters.php:34
 
 
 
 
1363
  msgid "all ad groups"
1364
  msgstr ""
1365
 
@@ -3167,7 +3171,7 @@ msgid "Set <em>%s</em> to show more ads"
3167
  msgstr ""
3168
 
3169
  #. translators: time zone name.
3170
- #: classes/utils.php:277
3171
  msgid "time of %s"
3172
  msgstr ""
3173
 
2
  # This file is distributed under the same license as the Advanced Ads plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Advanced Ads 1.31.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-02-02T08:51:23-06:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: advanced-ads\n"
537
  msgid "Download failed. <a href=\"%s\" target=\"_blank\">Click here to learn why</a>."
538
  msgstr ""
539
 
540
+ #: admin/includes/class-list-filters.php:141
541
  #: modules/gadsense/admin/admin.php:73
542
  #: modules/gadsense/admin/views/adsense-ad-parameters.php:109
543
  msgid "Responsive"
544
  msgstr ""
545
 
546
+ #: admin/includes/class-list-filters.php:516
547
  msgctxt "Post list header for expired ads."
548
  msgid "Expired"
549
  msgstr ""
550
 
551
+ #: admin/includes/class-list-filters.php:556
552
  msgctxt "Post list header for ads expiring in the future."
553
  msgid "Expiring"
554
  msgstr ""
1360
  msgstr ""
1361
 
1362
  #: admin/views/ad-list-filters.php:34
1363
+ msgid "all ad dates"
1364
+ msgstr ""
1365
+
1366
+ #: admin/views/ad-list-filters.php:42
1367
  msgid "all ad groups"
1368
  msgstr ""
1369
 
3171
  msgstr ""
3172
 
3173
  #. translators: time zone name.
3174
+ #: classes/utils.php:279
3175
  msgid "time of %s"
3176
  msgstr ""
3177
 
modules/gutenberg/includes/class-gutenberg.php CHANGED
@@ -122,7 +122,7 @@ class Advanced_Ads_Gutenberg {
122
 
123
  $output = array(
124
  'output' => array(
125
- 'class' => explode( ' ', isset( $attr['className'] ) ? $attr['className'] : '' ),
126
  'wrapper_attrs' => array( 'data-fixed_widget' => isset( $attr['fixed_widget'] ) ? $attr['fixed_widget'] : '' ),
127
  ),
128
  );
122
 
123
  $output = array(
124
  'output' => array(
125
+ 'class' => ! empty( $attr['className'] ) ? array_filter( explode( ' ', $attr['className'] ) ) : array(),
126
  'wrapper_attrs' => array( 'data-fixed_widget' => isset( $attr['fixed_widget'] ) ? $attr['fixed_widget'] : '' ),
127
  ),
128
  );
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Advanced Ads – Ad Manager & AdSense ===
2
  Contributors: webzunft, advancedads
3
- Tags: ads, ad manager, ad rotation, adsense, banner
4
  Requires at least: 4.9
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
- Stable tag: 1.31.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -38,7 +38,7 @@ Advanced Ads allowed us to grow from 0 to 100 MM monthly ad impressions. Benefit
38
  = ad management =
39
 
40
  * create and display **unlimited** ad units
41
- * rotate ads
42
  * schedule ads and set start time and expiration date
43
  * target ads by content and user groups
44
  * inject ads into posts and pages automatically without coding
@@ -67,12 +67,13 @@ choose between different ad types that enable you to:
67
 
68
  = display conditions =
69
 
70
- show ads based on conditions like:
71
 
72
  * individual posts, pages, and other post types
73
  * posts by category, tags, taxonomies, author, and age
74
  * archive pages by category, tags, taxonomies
75
  * special page types like 404, attachment and front page
 
76
  * hide ads on secondary queries (e.g., posts in sidebars)
77
  * display or hide banners within the post feed
78
  * hide all ads from specific page types, e.g., 404 pages, feed
@@ -84,7 +85,7 @@ serve ads by conditions based on the visitor. [List of all visitor conditions](h
84
 
85
  * display or hide a banner by device: mobile and tablet or desktop
86
  * display or hide a banner by role and for logged-in visitors
87
- * advanced visitor conditions: previously visited URL (referrer), user capability, browser language, browser and device, URL parameters included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
88
  * display ads by geolocation with the [Geo Targeting add-on](https://wpadvancedads.com/add-ons/geo-targeting/)
89
  * display ads by browser width with the [Responsive add-on](https://wpadvancedads.com/add-ons/responsive-ads/)
90
 
@@ -102,7 +103,7 @@ Placements to insert ads in pre-defined positions in your theme and content. [Li
102
  * ads in the footer
103
  * create [split tests and A/B testing](https://wpadvancedads.com/ab-testing-wordpress/)
104
  * many more ad positions with [add-ons](https://wpadvancedads.com/add-ons/)
105
- * automatic insertion of any kind of code into header or footer, not only advertising
106
 
107
  = mobile devices =
108
 
@@ -155,7 +156,7 @@ Learn more on the [plugin homepage](https://wpadvancedads.com).
155
 
156
  Thank you for motivating us with your [positive review](https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post).
157
 
158
- Localizations: Arabic, Chinese, Czech, Danish, Dutch, English, French, German, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Slovak, Spanish, Turkish, Vietnamese
159
 
160
  > <strong>Add-Ons</strong>
161
  >
@@ -178,16 +179,17 @@ If you have problems with Advanced Ads, please reach out to [our support](https:
178
 
179
  Advanced Ads integrates with plenty of other plugins:
180
 
181
- - MailPoet - [How to integrate Advanced Ads in MailPoet Newsletters](https://wpadvancedads.com/mailpoet-newsletters/)
182
- - WPML – [Showing different ads per language with WPML](https://wpadvancedads.com/translating-ads-wpml/)
183
- - WPBakery Page Builder – [Displaying Ads with WPBakery Page Builder (formerly Visual Composer)](https://wpadvancedads.com/visual-composer-ads/)
184
- - Genesis – [Genesis Ads add-on](https://wpadvancedads.com/add-ons/genesis-ads/)
185
  - BuddyBoss – [How to integrate ads into BuddyBoss](https://wpadvancedads.com/manual/buddyboss-ads/)
186
  - BuddyPress – [How to add ads on BuddyPress pages](https://wpadvancedads.com/ads-on-buddypress-pages/)
187
  - bbPress – [How to show ads on bbPress pages?](https://wpadvancedads.com/ads-in-bbpress/)
188
  - Cookie Consent, Borlabs Cookies, Complianz, GDPR Cookie Consent, and other content manager – [How to show ads based on visitors’ consent](https://wpadvancedads.com/manual/ad-cookie-consent/)
 
 
 
189
  - Paid Memberships Pro – [How to manage ads on membership sites running Paid Memberships Pro](https://wpadvancedads.com/paid-memberships-pro/)
190
  - [IAB TCF 2.0 consent](https://wpadvancedads.com/manual/tcf-consent-wordpress/) – hide ads until users give their consent. Integrating with any CMP, Quantcast Choices, iubenda, Google Funding Choices, cookiebot, etc.
 
 
191
 
192
  == Installation ==
193
 
@@ -322,6 +324,11 @@ Yes. You can use plenty of [hooks](https://wpadvancedads.com/codex/) to customiz
322
 
323
  == Changelog ==
324
 
 
 
 
 
 
325
  = 1.31.0 =
326
 
327
  - Feature: add "Expired" and "Expiring" views to the ad overview list replacing the expiry date filter
1
  === Advanced Ads – Ad Manager & AdSense ===
2
  Contributors: webzunft, advancedads
3
+ Tags: ads, adsense, amp, ads.txt, ad rotations, ad blocker, amazon, banner, click fraud protection, google ad manager, header code, lazy loading,
4
  Requires at least: 4.9
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
+ Stable tag: 1.31.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
38
  = ad management =
39
 
40
  * create and display **unlimited** ad units
41
+ * ad rotation
42
  * schedule ads and set start time and expiration date
43
  * target ads by content and user groups
44
  * inject ads into posts and pages automatically without coding
67
 
68
  = display conditions =
69
 
70
+ show ads based on content. [List of all display conditions](https://wpadvancedads.com/manual/display-conditions/)
71
 
72
  * individual posts, pages, and other post types
73
  * posts by category, tags, taxonomies, author, and age
74
  * archive pages by category, tags, taxonomies
75
  * special page types like 404, attachment and front page
76
+ * post and pages by contained keywords (keyword targeting) or URL parameters, included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
77
  * hide ads on secondary queries (e.g., posts in sidebars)
78
  * display or hide banners within the post feed
79
  * hide all ads from specific page types, e.g., 404 pages, feed
85
 
86
  * display or hide a banner by device: mobile and tablet or desktop
87
  * display or hide a banner by role and for logged-in visitors
88
+ * advanced visitor conditions: previously visited URL (referrer), user capability, browser language, browser and device included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
89
  * display ads by geolocation with the [Geo Targeting add-on](https://wpadvancedads.com/add-ons/geo-targeting/)
90
  * display ads by browser width with the [Responsive add-on](https://wpadvancedads.com/add-ons/responsive-ads/)
91
 
103
  * ads in the footer
104
  * create [split tests and A/B testing](https://wpadvancedads.com/ab-testing-wordpress/)
105
  * many more ad positions with [add-ons](https://wpadvancedads.com/add-ons/)
106
+ * automatic insertion of any kind of footer and header code, not only advertising
107
 
108
  = mobile devices =
109
 
156
 
157
  Thank you for motivating us with your [positive review](https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post).
158
 
159
+ Localizations: Arabic, Chinese, Czech, Danish, Dutch, English, French, German, Hebrew, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Turkish, Vietnamese
160
 
161
  > <strong>Add-Ons</strong>
162
  >
179
 
180
  Advanced Ads integrates with plenty of other plugins:
181
 
 
 
 
 
182
  - BuddyBoss – [How to integrate ads into BuddyBoss](https://wpadvancedads.com/manual/buddyboss-ads/)
183
  - BuddyPress – [How to add ads on BuddyPress pages](https://wpadvancedads.com/ads-on-buddypress-pages/)
184
  - bbPress – [How to show ads on bbPress pages?](https://wpadvancedads.com/ads-in-bbpress/)
185
  - Cookie Consent, Borlabs Cookies, Complianz, GDPR Cookie Consent, and other content manager – [How to show ads based on visitors’ consent](https://wpadvancedads.com/manual/ad-cookie-consent/)
186
+ - GamiPress – [How to target ads on GamiPress websites](https://wpadvancedads.com/manual/gamipress-ads/)
187
+ - Genesis – [Genesis Ads add-on](https://wpadvancedads.com/add-ons/genesis-ads/)
188
+ - MailPoet - [How to integrate Advanced Ads in MailPoet Newsletters](https://wpadvancedads.com/mailpoet-newsletters/)
189
  - Paid Memberships Pro – [How to manage ads on membership sites running Paid Memberships Pro](https://wpadvancedads.com/paid-memberships-pro/)
190
  - [IAB TCF 2.0 consent](https://wpadvancedads.com/manual/tcf-consent-wordpress/) – hide ads until users give their consent. Integrating with any CMP, Quantcast Choices, iubenda, Google Funding Choices, cookiebot, etc.
191
+ - WPBakery Page Builder – [Displaying Ads with WPBakery Page Builder](https://wpadvancedads.com/visual-composer-ads/)
192
+ - WPML – [Showing different ads per language with WPML](https://wpadvancedads.com/translating-ads-wpml/)
193
 
194
  == Installation ==
195
 
324
 
325
  == Changelog ==
326
 
327
+ = 1.31.1 =
328
+
329
+ - Fix: show ad edit button when Advanced Ads block is used
330
+ - Fix: revert regression from expired view when filtering by weekday
331
+
332
  = 1.31.0 =
333
 
334
  - Feature: add "Expired" and "Expiring" views to the ad overview list replacing the expiry date filter