Skip to content

Commit

Permalink
Added phpinfo in Stats module
Browse files Browse the repository at this point in the history
Started entering change log
  • Loading branch information
lordspace committed Aug 22, 2013
1 parent eb76f52 commit 7152066
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
19 changes: 18 additions & 1 deletion !sak4wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
define('ORBISIUS_WP_SAK_APP_SHORT_NAME', 'SAK4WP');
define('ORBISIUS_WP_SAK_APP_NAME', 'Swiss Army Knife for WordPress');
define('ORBISIUS_WP_SAK_APP_URL', 'http://sak4wp.com');
define('ORBISIUS_WP_SAK_APP_VER', '1.0.1');
define('ORBISIUS_WP_SAK_APP_VER', '1.0.2');
define('ORBISIUS_WP_SAK_APP_SCRIPT', basename(__FILE__));
define('ORBISIUS_WP_SAK_HOST', str_replace('www.', '', $_SERVER['HTTP_HOST']));

Expand Down Expand Up @@ -1143,6 +1143,23 @@ public function run() {
$buff .= $ctrl->renderKeyValueTable('WordPress Site Stats', $data);
ob_start();
phpinfo();
$php_info = ob_get_contents();
ob_get_clean();
// clear HTML buff around content and reduce heading tags to h4
$php_info = preg_replace('#.*?<body[^>]*>#si', '', $php_info);
$php_info = preg_replace('#</body>.*#si', '', $php_info);
$php_info = preg_replace('#<h\d#si', '<h4', $php_info);
$php_info = preg_replace('#</\d#si', '</h4', $php_info);
$php_info = '<h3>PHP Info</h3>'
. " (<a href='javascript:void(0);' class='toggle_info_trigger'>show/hide</a>)\n"
. " <div class='toggle_info app_hide'>" . $php_info . '</div>';
$buff .= $php_info;
return $buff;
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Stats Module
- Db version info, db config details parsed from wp-config.php
- Shows if you are running an older or the latest WordPress version. Links to update and to the latest wp are provided.
- Disk space usage (linux only)
- Shows phpinfo

List Page Templates
- This module allows you to see which page templates are use by your pages.
Expand Down Expand Up @@ -178,4 +179,3 @@ Author
------

Svetoslav (Slavi) Marinov | twitter: http://twitter.com/orbisius | http://orbisius.com

13 changes: 13 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

SAK4WP Change Log
=================

* 1.0.2 (2013-08-22)
Added phpinfo in Stats module
Started entering change log

* 1.0.1 (2013-08-22)
Plugins can be automatically activated after unzipping

* 1.0.0 (2013-08)
Initial release

0 comments on commit 7152066

Please sign in to comment.