Server IP & Memory Usage Display - Version 1.3.3

Version Description

  • Added support for IP address with IIS using $SERVER['LOCALADDR'].
Download this release

Release Info

Developer apasionados
Plugin Icon 128x128 Server IP & Memory Usage Display
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

Files changed (2) hide show
  1. readme.txt +6 -18
  2. server-ip-memory-usage.php +4 -1
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://apasionados.es/
4
  Author URI: http://apasionados.es/
5
  Tags: memory, memory-limit, ip, ips, admin, adress, php, server, info
6
  Requires at least: 3.0.1
7
- Tested up to: 4.4
8
- Stable tag: 1.3.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -80,11 +80,8 @@ Of course we do. That's why we created it. ;-)
80
 
81
  == Changelog ==
82
 
83
- = 1.3.2 =
84
- * Added check to avoid error "Notice: Undefined index: SERVER_ADDR in" when SERVER_ADDR is not set.
85
-
86
- = 1.3.1 =
87
- * Added check to avoid error "Notice: Undefined index: SERVER_ADDR in" when SERVER_ADDR is not set.
88
 
89
  = 1.3.0 =
90
  * Added Added hostname info after the IP.
@@ -95,9 +92,6 @@ Of course we do. That's why we created it. ;-)
95
  = 1.2.1 =
96
  * Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php). You can set this parameter in wp-config.php by adding this line: *define( 'WP_MEMORY_LIMIT', '768M' );* and replacing 768M with the memory limit you want to set.
97
 
98
- = 1.2.0 =
99
- * Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php). You can set this parameter in wp-config.php by adding this line: *define( 'WP_MEMORY_LIMIT', '768M' );* and replacing 768M with the memory limit you want to set.
100
-
101
  = 1.1.0 =
102
  * Changes for compatibility with PHP 7. Changed "function ip_address_memory_usage() {" to "public function __construct() {". Thanks to Sybre Waaijer for the fix.
103
 
@@ -111,16 +105,10 @@ Of course we do. That's why we created it. ;-)
111
  = 1.0.1 =
112
  * First official release.
113
 
114
- = 1.0 =
115
- * First stable release.
116
-
117
- = 0.5 =
118
- * Beta release.
119
-
120
  == Upgrade Notice ==
121
 
122
- = 1.3.2 =
123
- * Bug fix to prevent PHP Warning when SERVER_ADDR is not set.
124
 
125
  == Contact ==
126
 
4
  Author URI: http://apasionados.es/
5
  Tags: memory, memory-limit, ip, ips, admin, adress, php, server, info
6
  Requires at least: 3.0.1
7
+ Tested up to: 4.7
8
+ Stable tag: 1.3.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
80
 
81
  == Changelog ==
82
 
83
+ = 1.3.3 =
84
+ * Added support for IP address with IIS using $_SERVER['LOCAL_ADDR'].
 
 
 
85
 
86
  = 1.3.0 =
87
  * Added Added hostname info after the IP.
92
  = 1.2.1 =
93
  * Added display of WordPress Memory Limit information (parameter WP_MEMORY_LIMIT of wp-config.php). You can set this parameter in wp-config.php by adding this line: *define( 'WP_MEMORY_LIMIT', '768M' );* and replacing 768M with the memory limit you want to set.
94
 
 
 
 
95
  = 1.1.0 =
96
  * Changes for compatibility with PHP 7. Changed "function ip_address_memory_usage() {" to "public function __construct() {". Thanks to Sybre Waaijer for the fix.
97
 
105
  = 1.0.1 =
106
  * First official release.
107
 
 
 
 
 
 
 
108
  == Upgrade Notice ==
109
 
110
+ = 1.3.3 =
111
+ * Added support for IP address with IIS using $_SERVER['LOCAL_ADDR'].
112
 
113
  == Contact ==
114
 
server-ip-memory-usage.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Server IP & Memory Usage Display
4
  Plugin URI: http://apasionados.es/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=server-ip-memory-usage-plugin
5
  Description: Show the memory limit, current memory usage and IP address in the admin footer.
6
- Version: 1.3.2
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
@@ -86,6 +86,9 @@ if ( is_admin() ) {
86
  $this->check_memory_usage();
87
  //$server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
88
  $server_ip_address = (!empty($_SERVER[ 'SERVER_ADDR' ]) ? $_SERVER[ 'SERVER_ADDR' ] : "");
 
 
 
89
  $content .= ' | ' . __( 'Memory', 'server-ip-memory-usage' ) . ': ' . $this->memory['usage'] . ' ' . __( 'of', 'server-ip-memory-usage' ) . ' ' . $this->memory['limit'] . ' MB (<span style="' . $this->memory['color'] . '">' . $this->memory['percent'] . '%</span>) | ' . __( 'WP LIMIT', 'server-ip-memory-usage' ) . ': ' . $this->check_wp_limit() . ' | IP ' . $server_ip_address . ' (' . gethostname() . ') | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
90
  return $content;
91
  }
3
  Plugin Name: Server IP & Memory Usage Display
4
  Plugin URI: http://apasionados.es/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=server-ip-memory-usage-plugin
5
  Description: Show the memory limit, current memory usage and IP address in the admin footer.
6
+ Version: 1.3.3
7
  Author: Apasionados, Apasionados del Marketing
8
  Author URI: http://apasionados.es
9
  Text Domain: server-ip-memory-usage
86
  $this->check_memory_usage();
87
  //$server_ip_address = $_SERVER[ 'SERVER_ADDR' ];
88
  $server_ip_address = (!empty($_SERVER[ 'SERVER_ADDR' ]) ? $_SERVER[ 'SERVER_ADDR' ] : "");
89
+ if ($server_ip_address == "") { // Added for IP Address in IIS
90
+ $server_ip_address = (!empty($_SERVER[ 'LOCAL_ADDR' ]) ? $_SERVER[ 'LOCAL_ADDR' ] : "");
91
+ }
92
  $content .= ' | ' . __( 'Memory', 'server-ip-memory-usage' ) . ': ' . $this->memory['usage'] . ' ' . __( 'of', 'server-ip-memory-usage' ) . ' ' . $this->memory['limit'] . ' MB (<span style="' . $this->memory['color'] . '">' . $this->memory['percent'] . '%</span>) | ' . __( 'WP LIMIT', 'server-ip-memory-usage' ) . ': ' . $this->check_wp_limit() . ' | IP ' . $server_ip_address . ' (' . gethostname() . ') | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
93
  return $content;
94
  }