Advanced Ads - Version 1.14.4

Version Description

  • fixed JavaScript issue on ad edit pages
Download this release

Release Info

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

Code changes from version 1.14.3 to 1.14.4

admin/includes/class-ad-network.php CHANGED
@@ -112,14 +112,12 @@ abstract class Advanced_Ads_Ad_Network{
112
  else if ($pagenow == 'post.php' || $pagenow == 'post-new.php'){
113
  $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : '';
114
  add_filter('advanced-ads-ad-settings-pre-save', array($this, 'sanitize_ad_settings'));
115
-
116
- if (Advanced_Ads_Admin::screen_belongs_to_advanced_ads()){
117
- if (isset($_GET['action']) && 'edit' == $_GET['action']){
118
- $requires_javascript = true;
119
- }
120
- else if ($post_type == "advanced_ads"){
121
- $requires_javascript = true;
122
- }
123
  }
124
  }
125
 
@@ -171,6 +169,11 @@ abstract class Advanced_Ads_Ad_Network{
171
  return $this->identifier . 'AdvancedAdsJS';
172
  }
173
  public function enqueue_scripts_callback(){
 
 
 
 
 
174
  $js_path = $this->get_javascript_base_path();
175
  if ($js_path) {
176
  $id = $this->get_js_library_name();
112
  else if ($pagenow == 'post.php' || $pagenow == 'post-new.php'){
113
  $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : '';
114
  add_filter('advanced-ads-ad-settings-pre-save', array($this, 'sanitize_ad_settings'));
115
+
116
+ if (isset($_GET['action']) && 'edit' == $_GET['action']){
117
+ $requires_javascript = true;
118
+ }
119
+ else if ($post_type == "advanced_ads"){
120
+ $requires_javascript = true;
 
 
121
  }
122
  }
123
 
169
  return $this->identifier . 'AdvancedAdsJS';
170
  }
171
  public function enqueue_scripts_callback(){
172
+
173
+ if ( ! Advanced_Ads_Admin::screen_belongs_to_advanced_ads() ){
174
+ return;
175
+ }
176
+
177
  $js_path = $this->get_javascript_base_path();
178
  if ($js_path) {
179
  $id = $this->get_js_library_name();
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.14.3
16
  * Author: Thomas Maier
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.14.3' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.14.4
16
  * Author: Thomas Maier
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.14.4' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: ads, ad manager, ad rotation, adsense, banner
5
  Requires at least: 4.6
6
  Tested up to: 5.2
7
  Requires PHP: 5.6
8
- Stable tag: 1.14.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -290,6 +290,10 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
290
 
291
  == Changelog ==
292
 
 
 
 
 
293
  = 1.14.3 =
294
 
295
  * allow adding ads to newsletter emails created in MailPoet using the shortcode `[custom:ad:AD_ID]` in the email template
5
  Requires at least: 4.6
6
  Tested up to: 5.2
7
  Requires PHP: 5.6
8
+ Stable tag: 1.14.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
290
 
291
  == Changelog ==
292
 
293
+ = 1.14.4 =
294
+
295
+ * fixed JavaScript issue on ad edit pages
296
+
297
  = 1.14.3 =
298
 
299
  * allow adding ads to newsletter emails created in MailPoet using the shortcode `[custom:ad:AD_ID]` in the email template