Site Info Dashboard Widget
Dashboard widget to show general site information.
class Site_Info_Dashboard_Widget { public function __construct() { add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) ); } public function add_dashboard_widget() { wp_add_dashboard_widget( 'site_info_dashboard_widget', __( 'Site Info', 'site-info-dashboard-widget' ), array( $this, 'render_dashboard_widget' ) ); } public function render_dashboard_widget() { $info = array( __( 'Site Name', 'site-info-dashboard-widget') => get_bloginfo( 'name' ), __( 'Site Tagline', 'site-info-dashboard-widget') => get_bloginfo( 'description' ), __( 'Site URL', 'site-info-dashboard-widget') => get_bloginfo( 'url' ), __( 'Admin Email', 'site-info-dashboard-widget') => get_bloginfo( 'admin_email' ), __( 'Admin Language', 'site-info-dashboard-widget') => get_bloginfo( 'language' ), __( 'Text Direction', 'site-info-dashboard-widget') => get_bloginfo( 'text_direction' ), __( 'PHP Version', 'site-info-dashboard-widget') => PHP_VERSION, __( 'MySQL Version', 'site-info-dashboard-widget') => MYSQL_VERSION, __( 'WordPress Version', 'site-info-dashboard-widget') => get_bloginfo( 'version' ), ); echo '<table>'; foreach ( $info as $key => $value ) { echo '<tr><td><strong>' . $key . ' :</strong></td><td>' . $value . '</td></tr>'; } echo '</table>'; } } new Site_Info_Dashboard_Widget;