/** * Callback to display the system info. * * @access public * @since 8.3 * @static * * @uses do_action() * @uses _e() * @uses esc_url() * @uses self_admin_url() * @uses cnSystem_Info::display() * @uses wp_nonce_field() */ public static function systemInfo() { /** * Run before the display of the system info * * @since 8.3 */ do_action('cn_tools_system_before'); ?> <div class="postbox"> <h3><span><?php _e('System Information', 'connections'); ?> </span></h3> <div class="inside"> <textarea readonly="readonly" onclick="this.focus();this.select()" name="cn-system-info" title="<?php _e('To copy the System Info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'connections'); ?> " style="display: block; width: 100%; height: 500px; font-family: 'Consolas', 'Monaco', monospace; white-space: pre; overflow: auto;"> <?php // Non standard indentation needed for plain-text display. cnSystem_Info::display(); ?> </textarea> <?php // Form used to download .txt file ?> <form method="post" enctype="multipart/form-data" action="<?php echo esc_url(self_admin_url('admin-ajax.php')); ?> "> <input type="hidden" name="action" value="download_system_info"/> <?php wp_nonce_field('download_system_info'); ?> <?php submit_button(__('Download System Info as Text File', 'connections'), 'secondary', 'submit'); ?> </form> </div><!-- .inside --> </div><!-- .postbox --> <?php wp_enqueue_script('cn-system-info'); /** * Run after the display of the system info. * * @since 8.3 */ do_action('cn_tools_system_after'); }