affilinet Performance Ads - Version 1.9.1

Version Description

  • Release Date: March 6, 2018
  • Updating ads.txt as needed for integration
Download this release

Release Info

Developer Affilinet
Plugin Icon 128x128 affilinet Performance Ads
Version 1.9.1
Comparing to
See all releases

Code changes from version 1.9.0 to 1.9.1

Files changed (3) hide show
  1. affilinet.php +1 -1
  2. classes/Plugin.php +30 -0
  3. readme.txt +5 -2
affilinet.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: affilinet Performance Ads
5
  Description: Integrate our data driven and automated performance display plugin into your WordPress platform and serve your users targeted ads in real time.
6
- Version: 1.9.0
7
  Author: affilinet
8
  Author URI: https://www.affili.net/de/publisher/tools/performance-ads
9
  Text Domain: affilinet-performance-module
3
  /*
4
  Plugin Name: affilinet Performance Ads
5
  Description: Integrate our data driven and automated performance display plugin into your WordPress platform and serve your users targeted ads in real time.
6
+ Version: 1.9.1
7
  Author: affilinet
8
  Author URI: https://www.affili.net/de/publisher/tools/performance-ads
9
  Text Domain: affilinet-performance-module
classes/Plugin.php CHANGED
@@ -18,6 +18,8 @@ class Affilinet_Plugin
18
  add_action( 'admin_notices', array( $this, 'admin_notice' ));
19
 
20
  add_filter( 'plugin_action_links_' .plugin_basename(AFFILINET_PLUGIN_FILE ), array( $this, 'plugin_add_settings_link' ) );
 
 
21
  }
22
 
23
  function admin_notice() {
@@ -238,4 +240,32 @@ class Affilinet_Plugin
238
  echo Affilinet_Yieldkit::getAdCode();
239
  }
240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  }
18
  add_action( 'admin_notices', array( $this, 'admin_notice' ));
19
 
20
  add_filter( 'plugin_action_links_' .plugin_basename(AFFILINET_PLUGIN_FILE ), array( $this, 'plugin_add_settings_link' ) );
21
+
22
+ add_action( 'upgrader_process_complete', array($this, 'plugin_upgraded'));
23
  }
24
 
25
  function admin_notice() {
240
  echo Affilinet_Yieldkit::getAdCode();
241
  }
242
 
243
+
244
+ public function plugin_upgraded() {
245
+ // check for correct ads.txt
246
+
247
+ $filePath = ABSPATH.DIRECTORY_SEPARATOR.'ads.txt';
248
+
249
+ $neededContent =
250
+ '# affilinet-performance-module-start' . PHP_EOL .
251
+ '# Do not modify the following lines' . PHP_EOL .
252
+ '# Ver. 1.9.1' . PHP_EOL .
253
+ 'appnexus.com, 8332, RESELLER, f5ab79cb980f11d1' . PHP_EOL .
254
+ 'appnexus.com, 8327, RESELLER, f5ab79cb980f11d1' . PHP_EOL .
255
+ 'appnexus.com, 8334, RESELLER, f5ab79cb980f11d1' . PHP_EOL .
256
+ 'appnexus.com, 8333, RESELLER, f5ab79cb980f11d1'. PHP_EOL .
257
+ '# affilinet-performance-module-end' . PHP_EOL;
258
+
259
+ if (file_exists($filePath)) {
260
+ $adsTxtFile = file_get_contents($filePath);
261
+ if (strpos($adsTxtFile, $neededContent) === false) {
262
+ // write to file
263
+ file_put_contents($filePath, PHP_EOL . $neededContent, FILE_APPEND);
264
+ }
265
+ }else {
266
+ file_put_contents($filePath, $neededContent, FILE_APPEND);
267
+ }
268
+
269
+ }
270
+
271
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: affilinet, teraone
3
  Tags: Affiliate, affilinet, advertising, banner, performance marketing
4
  Requires at least: 3.0.1
5
  Tested up to: 4.9
6
- Stable tag: 1.8.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -80,11 +80,14 @@ It may take up to 90 minutes for ads to show, additionally all publisher account
80
  == Changelog ==
81
 
82
 
 
 
 
 
83
  = 1.9.0 =
84
  * Release Date: March 3, 2018
85
  * RTB Header bidding added => increased eCPM and better Publisher Monetization
86
 
87
-
88
  = 1.8.7 =
89
  * Release Date: July 5, 2017
90
  * SubId can be modified with the hook 'affilinet_subid_array'
3
  Tags: Affiliate, affilinet, advertising, banner, performance marketing
4
  Requires at least: 3.0.1
5
  Tested up to: 4.9
6
+ Stable tag: 1.9.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
80
  == Changelog ==
81
 
82
 
83
+ = 1.9.1 =
84
+ * Release Date: March 6, 2018
85
+ * Updating ads.txt as needed for integration
86
+
87
  = 1.9.0 =
88
  * Release Date: March 3, 2018
89
  * RTB Header bidding added => increased eCPM and better Publisher Monetization
90
 
 
91
  = 1.8.7 =
92
  * Release Date: July 5, 2017
93
  * SubId can be modified with the hook 'affilinet_subid_array'