Plugin Directory

Changeset 2792105


Ignore:
Timestamp:
09/29/2022 08:03:40 PM (4 years ago)
Author:
naminbd
Message:

version 1.5 realse

Location:
wp-system-info
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • wp-system-info/trunk/readme.txt

    r2375444 r2792105  
    11=== WP System Information ===
    2 Contributors: naminbd
    3 Tags: Site Information, System Information, Site Info, System Info, Info, Theme Info, Theme Information, Site Check, System Check
    4 Donate link: http://nurul.ninja/supportme/
    5 Requires at least: 4.0
    6 Tested up to: 5.5
    7 Requires PHP: 5.6
     2Contributors: naminbd, springdevs
     3Tags: Site Information, System Information, Site Info, phpinfo(), System Info, Info, Theme Info, Theme Information, Site Check, System Check, File Persmission, Folder Persmission
     4Donate link: http://springdevs.com/
     5Requires at least: 5.2
     6Tested up to: 6.1
     7Requires PHP: 7.4
    88Stable tag: trunk
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Show WordPress Site, Current Theme, active plugin and server related information at a glance.
     12Show WordPress Site, Current Theme, active plugin and server related information, php info, file & folder persmission at a glance.
    1313
    1414
    1515== Description ==
    16 This simple, but useful and important plugin for show site and system Information.
     16This simple, but useful and important plugin for show site and system Information, php information, Folder and file Persmission.
    1717With this plugin, you can see your site information, server information, Theme Information and plugin information in one place.
    1818** You also export data to CSV file and download your PC.
     
    5454   * Plugin version   
    5555   * 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
    5763   
    58  
     64
    5965== Installation ==
    6066
     
    6470== Screenshots ==
    6571
    66 1. 'WP System Info' menu location under tools menu.   
     721. 'WP System Info' menu location.   
    67732. Wordpress Related Information
    68743. Server Related Information 
    69754. Theme and Plugin Related Information
    70765. Button for export CSV file.
     776. Raw phpinfo().
     787. Folder & File Persmission information
    7179
    7280== Frequently Asked Questions ==
     
    7785
    7886== 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
    7993= 1.4 =
    8094 * [new] Check WP Debug Log.
  • wp-system-info/trunk/system-info.php

    r2375444 r2792105  
    33/*
    44 * Plugin Name: WP System Info
    5  * Version: 1.4
     5 * Version: 1.5
    66 * Plugin URI: https://wordpress.org/plugins/wp-system-info
    77 * Description: See the basic and main system information about yout site and server.
    88 * Author: Nurul Amin
    99 * Author URI: http://nurul.ninja
    10  * Requires at least: 4.0       
    11  * Tested up to: 5.5
     10 * Requires at least: 5.0       
     11 * Tested up to: 6.0.2
    1212 * License: GPL2
    1313 * Text Domain: bsi
     
    1616 */
    1717
    18 class Bbtech_SI {
    19 
    20     public $version = '1.4';
    21     public $db_version = '1.0';
     18class Bbtech_SI
     19{
     20
     21    public $version = '1.5';
     22    public $db_version = '1.1';
    2223    protected static $_instance = null;
    2324
    24     public static function instance() {
     25    public static function instance()
     26    {
    2527        if (is_null(self::$_instance)) {
    2628            self::$_instance = new self();
     
    2931    }
    3032
    31     function __construct() {
     33    function __construct()
     34    {
    3235
    3336        $this->init_actions();
     
    3639        spl_autoload_register(array($this, 'autoload'));
    3740        // Include required files
    38        
    39        
     41
     42
    4043        register_activation_hook(__FILE__, array($this, 'install'));
    4144        //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
    4548        do_action('bsi_loaded');
    4649    }
    4750
    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    {
    5559        add_action('admin_menu', array($this, 'admin_menu'));
    5660        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    {
    6569        $name = explode('_', $class);
    6670        if (isset($name[1])) {
     
    7377    }
    7478
    75     public function define_constants() {
     79    public function define_constants()
     80    {
    7681
    7782        $this->define('BSI_VERSION', $this->version);
    7883        $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__));
    8085        $this->define('BSI_URL', plugins_url('', __FILE__));
    8186    }
    8287
    83     public function define($name, $value) {
     88    public function define($name, $value)
     89    {
    8490        if (!defined($name)) {
    8591            define($name, $value);
    8692        }
    8793    }
    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'),
    103111            '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    {
    115124        $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    }
    130220}
    131221
    132222
    133 function bsi() {
     223function bsi()
     224{
    134225    return Bbtech_SI::instance();
    135226}
Note: See TracChangeset for help on using the changeset viewer.