Advanced Ads - Version 1.17.8

Version Description

  • WPML: placements now deliver also ads translated with WPML when only one of the language versions was assigned to them
  • fixed delete option in placement form
Download this release

Release Info

Developer webzunft
Plugin Icon 128x128 Advanced Ads
Version 1.17.8
Comparing to
See all releases

Code changes from version 1.17.7 to 1.17.8

admin/views/placements.php CHANGED
@@ -97,15 +97,9 @@ if ( isset( $placements ) && is_array( $placements ) && count( $placements ) ) :
97
  elseif ( isset( $_placement['type'] ) ) :
98
  if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) :
99
  ?>
100
- <img src="
101
- <?php
102
- echo esc_url( $placement_types[ $_placement['type'] ]['image'] );
103
- ?>
104
- " title="
105
- <?php
106
- echo esc_attr( $placement_types[ $_placement['type'] ]['title'] );
107
- ?>
108
- " alt="<?php echo esc_attr( $placement_types[ $_placement['type'] ]['title'] ); ?>"/>
109
  <?php
110
  else :
111
  echo esc_html( $placement_types[ $_placement['type'] ]['title'] );
@@ -247,7 +241,7 @@ endif;
247
  </td>
248
  <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
249
  <td>
250
- <input type="checkbox" id="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>" name="advads[placements][<?php echo esc_url( $_placement_slug ); ?>][delete]" value="1"/>
251
  <label for="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>"><?php echo esc_html_x( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
252
  </td>
253
  </tr>
97
  elseif ( isset( $_placement['type'] ) ) :
98
  if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) :
99
  ?>
100
+ <img src="<?php echo esc_url( $placement_types[ $_placement['type'] ]['image'] ); ?>"
101
+ title="<?php echo esc_attr( $placement_types[ $_placement['type'] ]['title'] ); ?>"
102
+ alt="<?php echo esc_attr( $placement_types[ $_placement['type'] ]['title'] ); ?>"/>
 
 
 
 
 
 
103
  <?php
104
  else :
105
  echo esc_html( $placement_types[ $_placement['type'] ]['title'] );
241
  </td>
242
  <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
243
  <td>
244
+ <input type="checkbox" id="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][delete]" value="1"/>
245
  <label for="advads-placements-item-delete-<?php echo esc_attr( $_placement_slug ); ?>"><?php echo esc_html_x( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
246
  </td>
247
  </tr>
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.17.7
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.17.7' );
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.17.8
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.17.8' );
43
 
44
  // Autoloading, modules and functions.
45
 
classes/ad_placements.php CHANGED
@@ -367,6 +367,14 @@ class Advanced_Ads_Placements {
367
 
368
  // fix method id.
369
  $_item[0] = Advanced_Ads_Select::AD;
 
 
 
 
 
 
 
 
370
  break;
371
 
372
  // avoid loops (programmatical error).
367
 
368
  // fix method id.
369
  $_item[0] = Advanced_Ads_Select::AD;
370
+
371
+ /**
372
+ * Deliver the translated version of an ad if set up with WPML.
373
+ *
374
+ * @source https://wpml.org/wpml-hook/wpml_object_id/
375
+ */
376
+ $_item[1] = apply_filters( 'wpml_object_id', $_item[1], 'advanced_ads', true );
377
+
378
  break;
379
 
380
  // avoid loops (programmatical error).
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: webzunft, advancedads
3
  Tags: ads, ad manager, ad rotation, adsense, banner
4
  Requires at least: 4.6
5
- Tested up to: 5.3
6
  Requires PHP: 5.6
7
- Stable tag: 1.17.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -304,6 +304,11 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
304
 
305
  == Changelog ==
306
 
 
 
 
 
 
307
  = 1.17.7 =
308
 
309
  * fixed index value of content placements not showing up in the form while saved and working correctly
2
  Contributors: webzunft, advancedads
3
  Tags: ads, ad manager, ad rotation, adsense, banner
4
  Requires at least: 4.6
5
+ Tested up to: 5.4
6
  Requires PHP: 5.6
7
+ Stable tag: 1.17.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
304
 
305
  == Changelog ==
306
 
307
+ = 1.17.8 =
308
+
309
+ * WPML: placements now deliver also ads translated with WPML when only one of the language versions was assigned to them
310
+ * fixed delete option in placement form
311
+
312
  = 1.17.7 =
313
 
314
  * fixed index value of content placements not showing up in the form while saved and working correctly