Advanced Ads - Version 1.17.7

Version Description

  • fixed index value of content placements not showing up in the form while saved and working correctly
  • recovered compatibility with the "Render Blocking JS" option of the WP Fastest Cache plugin
Download this release

Release Info

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

Code changes from version 1.17.6 to 1.17.7

admin/views/placements-content-index.php CHANGED
@@ -11,7 +11,7 @@ $_positions = array(
11
  ); ?>
12
  <select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][position]">
13
  <?php foreach ( $_positions as $_pos_key => $_pos ) : ?>
14
- <option value="<?php echo esc_attr( $_pos_key ); ?>"
15
  <?php
16
  if ( isset( $_placement['options']['position'] ) ) {
17
  selected( $_placement['options']['position'], $_pos_key );
@@ -22,11 +22,7 @@ $_positions = array(
22
  <?php endforeach; ?>
23
  </select>
24
 
25
- <input type="number" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][index]" value="
26
- <?php
27
- echo ( isset( $_placement['options']['index'] ) ) ? absint( max( 1, (int) $_placement['options']['index'] ) ) : 1;
28
- ?>
29
- " min="1"/>.
30
 
31
  <?php $tags = Advanced_Ads_Placements::tags_for_content_injection(); ?>
32
  <select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][tag]">
11
  ); ?>
12
  <select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][position]">
13
  <?php foreach ( $_positions as $_pos_key => $_pos ) : ?>
14
+ <option value="<?php echo esc_attr( $_pos_key ); ?>"
15
  <?php
16
  if ( isset( $_placement['options']['position'] ) ) {
17
  selected( $_placement['options']['position'], $_pos_key );
22
  <?php endforeach; ?>
23
  </select>
24
 
25
+ <input type="number" name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][index]" value="<?php echo ( isset( $_placement['options']['index'] ) ) ? absint( max( 1, (int) $_placement['options']['index'] ) ) : 1; ?>" min="1"/>.
 
 
 
 
26
 
27
  <?php $tags = Advanced_Ads_Placements::tags_for_content_injection(); ?>
28
  <select name="advads[placements][<?php echo esc_attr( $_placement_slug ); ?>][options][tag]">
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.6
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.6' );
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.7
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.7' );
43
 
44
  // Autoloading, modules and functions.
45
 
classes/utils.php CHANGED
@@ -81,14 +81,16 @@ class Advanced_Ads_Utils {
81
  * @return string $content
82
  */
83
  public static function get_inline_asset( $content ) {
84
- if ( Advanced_Ads_Checks::active_autoptimize() || Advanced_Ads_Checks::active_wp_rocket() ) {
85
- return '<!--noptimize-->' . $content . '<!--/noptimize-->';
86
- }
87
  // WP Fastest Cache Premium: "Render Blocking Js" feature.
 
88
  if ( class_exists( 'WpFastestCache', false )
89
  && '<script' === substr( $content, 0, 7 ) ) {
90
  $content = substr_replace( $content, '<script data-wpfc-render="false"', 0, 7 );
91
  }
 
 
 
 
92
  return $content;
93
  }
94
 
81
  * @return string $content
82
  */
83
  public static function get_inline_asset( $content ) {
 
 
 
84
  // WP Fastest Cache Premium: "Render Blocking Js" feature.
85
+ $content = ltrim( $content );
86
  if ( class_exists( 'WpFastestCache', false )
87
  && '<script' === substr( $content, 0, 7 ) ) {
88
  $content = substr_replace( $content, '<script data-wpfc-render="false"', 0, 7 );
89
  }
90
+
91
+ if ( Advanced_Ads_Checks::active_autoptimize() || Advanced_Ads_Checks::active_wp_rocket() ) {
92
+ return '<!--noptimize-->' . $content . '<!--/noptimize-->';
93
+ }
94
  return $content;
95
  }
96
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.6
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.6 =
308
 
309
  * improved coding style in backend templates
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
 
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
310
+ * recovered compatibility with the "Render Blocking JS" option of the WP Fastest Cache plugin
311
+
312
  = 1.17.6 =
313
 
314
  * improved coding style in backend templates