affilinet Performance Ads - Version 1.9.3

Version Description

  • Release Date: March 6, 2018
  • Fix: Update ads.txt on Plugin version change
Download this release

Release Info

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

Code changes from version 1.9.2 to 1.9.3

Files changed (4) hide show
  1. affilinet.php +1 -1
  2. classes/Plugin.php +21 -1
  3. readme.txt +4 -1
  4. uninstall.php +1 -0
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.2
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.3
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
@@ -5,7 +5,7 @@ class Affilinet_Plugin
5
 
6
  public function __construct()
7
  {
8
- register_activation_hook( AFFILINET_PLUGIN_FILE, array( $this, 'plugin_upgraded'));
9
 
10
  add_action('admin_init', array($this, 'admin_init'));
11
  add_action('admin_menu', array($this, 'admin_menu'));
@@ -21,7 +21,27 @@ class Affilinet_Plugin
21
 
22
  add_filter( 'plugin_action_links_' .plugin_basename(AFFILINET_PLUGIN_FILE ), array( $this, 'plugin_add_settings_link' ) );
23
 
 
 
 
 
24
  add_action( 'upgrader_process_complete', array($this, 'plugin_upgraded'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  function admin_notice() {
5
 
6
  public function __construct()
7
  {
8
+
9
 
10
  add_action('admin_init', array($this, 'admin_init'));
11
  add_action('admin_menu', array($this, 'admin_menu'));
21
 
22
  add_filter( 'plugin_action_links_' .plugin_basename(AFFILINET_PLUGIN_FILE ), array( $this, 'plugin_add_settings_link' ) );
23
 
24
+
25
+ // check for ads.txt
26
+
27
+ // manual update
28
  add_action( 'upgrader_process_complete', array($this, 'plugin_upgraded'));
29
+ // manual activation
30
+
31
+ register_activation_hook( AFFILINET_PLUGIN_FILE, array( $this, 'plugin_upgraded' ) );
32
+
33
+ // check for version changes
34
+ $pluginVersion = get_file_data( AFFILINET_PLUGIN_DIR . DIRECTORY_SEPARATOR . 'affilinet.php', array( 'Version' => 'Version' ), 'plugin' );
35
+ if ( get_option( 'affilinet-performance-ads-version', false ) !== $pluginVersion['Version'] ) {
36
+ $this->plugin_upgraded();
37
+ update_option( 'affilinet-performance-ads-version', $pluginVersion['Version'] );
38
+ }
39
+
40
+ // if file was deleted restore it
41
+ $filePath = ABSPATH . DIRECTORY_SEPARATOR . 'ads.txt';
42
+ if ( ! file_exists( $filePath ) ) {
43
+ $this->plugin_upgraded();
44
+ }
45
  }
46
 
47
  function admin_notice() {
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.9.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -79,6 +79,9 @@ It may take up to 90 minutes for ads to show, additionally all publisher account
79
 
80
  == Changelog ==
81
 
 
 
 
82
 
83
  = 1.9.2 =
84
  * Release Date: March 6, 2018
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.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.9.3 =
83
+ * Release Date: March 6, 2018
84
+ * Fix: Update ads.txt on Plugin version change
85
 
86
  = 1.9.2 =
87
  * Release Date: March 6, 2018
uninstall.php CHANGED
@@ -22,6 +22,7 @@ delete_option( 'affilinet_ywidgetpos' );
22
  delete_option( 'affilinet_ywdensity' );
23
  delete_option( 'affilinet_ywcap' );
24
  delete_option( 'affilinet_ywcolor' );
 
25
 
26
 
27
 
22
  delete_option( 'affilinet_ywdensity' );
23
  delete_option( 'affilinet_ywcap' );
24
  delete_option( 'affilinet_ywcolor' );
25
+ delete_option( 'affilinet-performance-ads-version' );
26
 
27
 
28