Version Description
- Added check to avoid error "Notice: Undefined index: SERVER_ADDR in" when SERVER_ADDR was not set.
Download this release
Release Info
Developer | apasionados |
Plugin | Server IP & Memory Usage Display |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- readme.txt +7 -4
- server-ip-memory-usage.php +3 -2
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.
|
8 |
-
Stable tag: 1.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -80,6 +80,9 @@ Of course we do. That's why we created it. ;-)
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
|
|
|
|
|
|
83 |
= 1.2.1 =
|
84 |
* 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.
|
85 |
|
@@ -107,8 +110,8 @@ Of course we do. That's why we created it. ;-)
|
|
107 |
|
108 |
== Upgrade Notice ==
|
109 |
|
110 |
-
= 1.2.
|
111 |
-
*
|
112 |
|
113 |
== Contact ==
|
114 |
|
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.5
|
8 |
+
Stable tag: 1.2.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 1.2.2 =
|
84 |
+
* Added check to avoid error "Notice: Undefined index: SERVER_ADDR in" when SERVER_ADDR was not set.
|
85 |
+
|
86 |
= 1.2.1 =
|
87 |
* 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.
|
88 |
|
110 |
|
111 |
== Upgrade Notice ==
|
112 |
|
113 |
+
= 1.2.2 =
|
114 |
+
* Bug fix to prevent PHP Warning when SERVER_ADDR is not set.
|
115 |
|
116 |
== Contact ==
|
117 |
|
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.2.
|
7 |
Author: Apasionados, Apasionados del Marketing
|
8 |
Author URI: http://apasionados.es
|
9 |
Text Domain: server-ip-memory-usage
|
@@ -84,7 +84,8 @@ if ( is_admin() ) {
|
|
84 |
|
85 |
function add_footer($content) {
|
86 |
$this->check_memory_usage();
|
87 |
-
|
|
|
88 |
$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 . ' | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
|
89 |
return $content;
|
90 |
}
|
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.2.2
|
7 |
Author: Apasionados, Apasionados del Marketing
|
8 |
Author URI: http://apasionados.es
|
9 |
Text Domain: server-ip-memory-usage
|
84 |
|
85 |
function add_footer($content) {
|
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 . ' | PHP ' . PHP_VERSION . ' @' . (PHP_INT_SIZE * 8) . 'BitOS';
|
90 |
return $content;
|
91 |
}
|