Changeset 2792105
- Timestamp:
- 09/29/2022 08:03:40 PM (4 years ago)
- Location:
- wp-system-info
- Files:
-
- 3 added
- 4 edited
-
assets/banner-772x250.png (modified) (previous)
-
assets/icon-128x128.png (added)
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-6.png (added)
-
assets/screenshot-7.png (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/system-info.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-system-info/trunk/readme.txt
r2375444 r2792105 1 1 === WP System Information === 2 Contributors: naminbd 3 Tags: Site Information, System Information, Site Info, System Info, Info, Theme Info, Theme Information, Site Check, System Check4 Donate link: http:// nurul.ninja/supportme/5 Requires at least: 4.06 Tested up to: 5.57 Requires PHP: 5.62 Contributors: naminbd, springdevs 3 Tags: Site Information, System Information, Site Info, phpinfo(), System Info, Info, Theme Info, Theme Information, Site Check, System Check, File Persmission, Folder Persmission 4 Donate link: http://springdevs.com/ 5 Requires at least: 5.2 6 Tested up to: 6.1 7 Requires PHP: 7.4 8 8 Stable tag: trunk 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Show WordPress Site, Current Theme, active plugin and server related information at a glance.12 Show WordPress Site, Current Theme, active plugin and server related information, php info, file & folder persmission at a glance. 13 13 14 14 15 15 == Description == 16 This simple, but useful and important plugin for show site and system Information .16 This simple, but useful and important plugin for show site and system Information, php information, Folder and file Persmission. 17 17 With this plugin, you can see your site information, server information, Theme Information and plugin information in one place. 18 18 ** You also export data to CSV file and download your PC. … … 54 54 * Plugin version 55 55 * Plugin Author URL 56 56 57 **PHP info()** 58 * Row PHP info 59 60 **File Persmission** 61 * Show all Filder Persmission 62 * Show all File Persmission 57 63 58 64 59 65 == Installation == 60 66 … … 64 70 == Screenshots == 65 71 66 1. 'WP System Info' menu location under tools menu.72 1. 'WP System Info' menu location. 67 73 2. Wordpress Related Information 68 74 3. Server Related Information 69 75 4. Theme and Plugin Related Information 70 76 5. Button for export CSV file. 77 6. Raw phpinfo(). 78 7. Folder & File Persmission information 71 79 72 80 == Frequently Asked Questions == … … 77 85 78 86 == Changelog == 87 = 1.5 = 88 * [new] Move Plugin to main menu. 89 * [new] RAW PHP info() 90 * [new] Show Folder Persmission 91 * [new] Show File Persmission 92 79 93 = 1.4 = 80 94 * [new] Check WP Debug Log. -
wp-system-info/trunk/system-info.php
r2375444 r2792105 3 3 /* 4 4 * Plugin Name: WP System Info 5 * Version: 1. 45 * Version: 1.5 6 6 * Plugin URI: https://wordpress.org/plugins/wp-system-info 7 7 * Description: See the basic and main system information about yout site and server. 8 8 * Author: Nurul Amin 9 9 * Author URI: http://nurul.ninja 10 * Requires at least: 4.011 * Tested up to: 5.510 * Requires at least: 5.0 11 * Tested up to: 6.0.2 12 12 * License: GPL2 13 13 * Text Domain: bsi … … 16 16 */ 17 17 18 class Bbtech_SI { 19 20 public $version = '1.4'; 21 public $db_version = '1.0'; 18 class Bbtech_SI 19 { 20 21 public $version = '1.5'; 22 public $db_version = '1.1'; 22 23 protected static $_instance = null; 23 24 24 public static function instance() { 25 public static function instance() 26 { 25 27 if (is_null(self::$_instance)) { 26 28 self::$_instance = new self(); … … 29 31 } 30 32 31 function __construct() { 33 function __construct() 34 { 32 35 33 36 $this->init_actions(); … … 36 39 spl_autoload_register(array($this, 'autoload')); 37 40 // Include required files 38 39 41 42 40 43 register_activation_hook(__FILE__, array($this, 'install')); 41 44 //Do some thing after load this plugin 42 43 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ));44 45 46 add_action('admin_enqueue_scripts', array($this, 'admin_scripts')); 47 45 48 do_action('bsi_loaded'); 46 49 } 47 50 48 49 50 function install() { 51 52 } 53 54 function init_actions() { 51 52 53 function install() 54 { 55 } 56 57 function init_actions() 58 { 55 59 add_action('admin_menu', array($this, 'admin_menu')); 56 60 add_action('plugins_loaded', array($this, 'load_textdomain')); 57 58 } 59 60 61 62 63 64 function autoload($class){61 } 62 63 64 65 66 67 function autoload($class) 68 { 65 69 $name = explode('_', $class); 66 70 if (isset($name[1])) { … … 73 77 } 74 78 75 public function define_constants() { 79 public function define_constants() 80 { 76 81 77 82 $this->define('BSI_VERSION', $this->version); 78 83 $this->define('BSI_DB_VERSION', $this->db_version); 79 $this->define( 'BSI_PATH', plugin_dir_path( __FILE__ ));84 $this->define('BSI_PATH', plugin_dir_path(__FILE__)); 80 85 $this->define('BSI_URL', plugins_url('', __FILE__)); 81 86 } 82 87 83 public function define($name, $value) { 88 public function define($name, $value) 89 { 84 90 if (!defined($name)) { 85 91 define($name, $value); 86 92 } 87 93 } 88 89 90 function load_textdomain() { 91 load_plugin_textdomain( 'bsi', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); 92 } 93 94 95 static function admin_scripts() { 96 97 wp_enqueue_script( 'jquery' ); 98 wp_enqueue_script( 'jquery-ui-core' ); 99 wp_enqueue_script( 'bsi_admin', plugins_url( 'assets/js/script.js', __FILE__ ), '', false, true ); 100 wp_localize_script( 'bsi_admin', 'BSI_Vars', array( 101 'ajaxurl' => admin_url( 'admin-ajax.php' ), 102 'nonce' => wp_create_nonce( 'bsi_nonce' ), 94 95 96 function load_textdomain() 97 { 98 load_plugin_textdomain('bsi', false, dirname(plugin_basename(__FILE__)) . '/lang/'); 99 } 100 101 102 static function admin_scripts() 103 { 104 105 wp_enqueue_script('jquery'); 106 wp_enqueue_script('jquery-ui-core'); 107 wp_enqueue_script('bsi_admin', plugins_url('assets/js/script.js', __FILE__), '', false, true); 108 wp_localize_script('bsi_admin', 'BSI_Vars', array( 109 'ajaxurl' => admin_url('admin-ajax.php'), 110 'nonce' => wp_create_nonce('bsi_nonce'), 103 111 'pluginURL' => BSI_URL, 104 105 ) ); 106 107 wp_enqueue_style( 'bsi_admin', plugins_url( '/assets/css/style.css', __FILE__ ) ); 108 109 wp_enqueue_style( 'dashicons' ); 110 do_action( 'bsi_admin_scripts' ); 111 } 112 113 114 function admin_menu() { 112 113 )); 114 115 wp_enqueue_style('bsi_admin', plugins_url('/assets/css/style.css', __FILE__)); 116 117 wp_enqueue_style('dashicons'); 118 do_action('bsi_admin_scripts'); 119 } 120 121 122 function admin_menu() 123 { 115 124 $capability = 'read'; //minimum level: subscriber 116 117 add_submenu_page('tools.php', 118 __( 'System Info', 'bsi' ), 119 __( 'System Info', 'bsi' ), 120 $capability, 'bsi_system_info', array( $this, 'system_info_view' ) ); 121 122 do_action( 'bsi_admin_menu', $capability, $this ); 123 } 124 125 function system_info_view() { 126 require ( BSI_PATH . '/view/status.php' ); 127 } 128 129 125 $page_title = __('System Info', 'bsi'); 126 $menu_title = __('System Info', 'bsi'); 127 $menu_slug = "/bsi_system_info"; 128 $callback = array($this, 'system_info_view'); 129 $icon_url = ''; 130 $position = 70; 131 add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, 'dashicons-info', $position); 132 133 add_submenu_page( 134 $menu_slug, 135 __('PHP info()', 'bsi'), 136 __('PHP info()', 'bsi'), 137 $capability, 138 'php-info', 139 array($this, 'show_php_info'), 140 1 141 ); 142 143 add_submenu_page( 144 $menu_slug, 145 __('File Permission', 'bsi'), 146 __('File Permission', 'bsi'), 147 $capability, 148 'file-permission', 149 array($this, 'show_file_permission'), 150 2 151 ); 152 153 add_submenu_page( 154 $menu_slug, 155 __('Get More Free Item', 'bsi'), 156 __('Get More Free Item', 'bsi'), 157 $capability, 158 'get-more-free-item', 159 array($this, 'get_more_free_item'), 160 3 161 ); 162 163 164 do_action('bsi_admin_menu', $capability, $this); 165 } 166 167 function system_info_view() 168 { 169 require(BSI_PATH . '/view/status.php'); 170 } 171 172 function show_php_info() 173 { 174 175 require(BSI_PATH . '/view/php-info.php'); 176 } 177 178 function show_file_permission() 179 { 180 $files = $this->fetchWpFiles(ABSPATH); 181 require(BSI_PATH . '/view/show-file-permission.php'); 182 } 183 184 function get_more_free_item() 185 { 186 187 $springdevsurl = "https://springdevs.com/"; 188 ?> 189 <script type="text/javascript"> 190 window.location = "<?php echo $springdevsurl; ?>"; 191 </script> 192 <?php 193 194 } 195 196 197 198 function fetchWpFiles($dir) 199 { 200 try { 201 $x = scandir($dir); 202 } catch (exception $e) { 203 return false; 204 } 205 $result = array(); 206 foreach ($x as $filename) { 207 if ($filename == '.') continue; 208 if ($filename == '..') continue; 209 $result[] = $dir . $filename; 210 $filePath = $dir . $filename; 211 if (is_dir($filePath)) { 212 $filePath = $dir . $filename . '/'; 213 foreach ($this->fetchWpFiles($filePath) as $childFilename) { 214 $result[] = $childFilename; 215 } 216 } 217 } 218 return $result; 219 } 130 220 } 131 221 132 222 133 function bsi() { 223 function bsi() 224 { 134 225 return Bbtech_SI::instance(); 135 226 }
Note: See TracChangeset
for help on using the changeset viewer.