| 1 |
<?php |
| 2 |
namespace MaxButtons; |
| 3 |
defined('ABSPATH') or die('No direct access permitted'); |
| 4 |
|
| 5 |
//$theme = wp_get_theme(); |
| 6 |
//$browser = maxbuttons_get_browser(); |
| 7 |
|
| 8 |
function maxbuttons_system_label($label, $value, $spaces_between) { |
| 9 |
$output = "<label>$label</label>"; |
| 10 |
return "<div class='info'>" . $output . trim($value) . "</div>" ; |
| 11 |
} |
| 12 |
|
| 13 |
?> |
| 14 |
<?php |
| 15 |
$support_link = apply_filters("mb-support-link", 'http://wordpress.org/support/plugin/maxbuttons'); |
| 16 |
|
| 17 |
$admin = MB()->getClass('admin'); |
| 18 |
$page_title = __("Support","maxbuttons"); |
| 19 |
$action = "<a href='$support_link' class='page-title-action add-new-h2' target='_blank'>" . __("Go to support","maxbuttons") . "</a>"; |
| 20 |
$admin->get_header(array("title" => $page_title, "title_action" => $action) ); |
| 21 |
?> |
| 22 |
|
| 23 |
<div class='support tiles'> |
| 24 |
<div> |
| 25 |
<a href='https://wordpress.org/plugins/maxbuttons/#faq' target="_blank">Frequently Asked Questions</a> |
| 26 |
</div> |
| 27 |
|
| 28 |
<div><?php printf(__('%sSupport Forums%s.', 'maxbuttons'), "<a href='$support_link' target='_blank'>" , '</a>') ?></div> |
| 29 |
|
| 30 |
</div> |
| 31 |
|
| 32 |
<h4><?php _e('You may be asked to provide the information below to help troubleshoot your issue.', 'maxbuttons') ?></h4> |
| 33 |
|
| 34 |
<div class='system_info'> |
| 35 |
----- Begin System Info ----- <br /> |
| 36 |
|
| 37 |
|
| 38 |
<?php echo maxbuttons_system_label('WordPress Version:', get_bloginfo('version'), 4) ?> |
| 39 |
|
| 40 |
<?php echo maxbuttons_system_label('PHP Version:', PHP_VERSION, 10) ?> |
| 41 |
|
| 42 |
<?php |
| 43 |
global $wpdb; |
| 44 |
$mysql_version = $wpdb->db_version(); |
| 45 |
|
| 46 |
echo maxbuttons_system_label('MySQL Version:', $mysql_version, 8) ?> |
| 47 |
|
| 48 |
<?php echo maxbuttons_system_label('Web Server:', $_SERVER['SERVER_SOFTWARE'], 11) ?> |
| 49 |
|
| 50 |
<?php echo maxbuttons_system_label('WordPress URL:', get_bloginfo('wpurl'), 8) ?> |
| 51 |
|
| 52 |
<?php echo maxbuttons_system_label('Home URL:', get_bloginfo('url'), 13) ?> |
| 53 |
|
| 54 |
<?php echo maxbuttons_system_label('PHP cURL Support:', function_exists('curl_init') ? 'Yes' : 'No', 5) ?> |
| 55 |
|
| 56 |
<?php echo maxbuttons_system_label('PHP GD Support:', function_exists('gd_info') ? 'Yes' : 'No', 7) ?> |
| 57 |
<?php echo maxbuttons_system_label('PHP Memory Limit:', ini_get('memory_limit'), 5) ?> |
| 58 |
|
| 59 |
<?php echo maxbuttons_system_label('PHP Post Max Size:', ini_get('post_max_size'), 4) ?> |
| 60 |
|
| 61 |
<?php echo maxbuttons_system_label('PHP Upload Max Size:', ini_get('upload_max_filesize'), 2) ?> |
| 62 |
|
| 63 |
<?php echo maxbuttons_system_label('WP_DEBUG:', defined('WP_DEBUG') ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set', 13) ?> |
| 64 |
<?php echo maxbuttons_system_label('Multi-Site Active:', is_multisite() ? 'Yes' : 'No', 4) ?> |
| 65 |
|
| 66 |
<?php echo maxbuttons_system_label('Operating System:', $view->browser['platform'], 5) ?> |
| 67 |
<?php echo maxbuttons_system_label('Browser:', $view->browser['name'] . ' ' . $view->browser['version'], 14) ?> |
| 68 |
<?php echo maxbuttons_system_label('User Agent:', $view->browser['user_agent'], 11) ?> |
| 69 |
|
| 70 |
Active Theme: |
| 71 |
<?php echo maxbuttons_system_label('-', $view->theme->get('Name') . ' ' . $view->theme->get('Version'), 1) ?> |
| 72 |
<?php echo maxbuttons_system_label('', $view->theme->get('ThemeURI'), 2) ?> |
| 73 |
|
| 74 |
Active Plugins: |
| 75 |
<?php |
| 76 |
//$plugins = get_plugins(); |
| 77 |
//$active_plugins = get_option('active_plugins', array()); |
| 78 |
|
| 79 |
foreach ($view->plugins as $plugin_path => $plugin) { |
| 80 |
// Only show active plugins |
| 81 |
if (in_array($plugin_path, $view->active_plugins)) { |
| 82 |
echo maxbuttons_system_label('-', $plugin['Name'] . ' ' . $plugin['Version'], 1); |
| 83 |
|
| 84 |
if (isset($view->plugin['PluginURI'])) { |
| 85 |
echo maxbuttons_system_label('', $view->plugin['PluginURI'], 2); |
| 86 |
} |
| 87 |
|
| 88 |
echo "\n"; |
| 89 |
} |
| 90 |
} |
| 91 |
?> |
| 92 |
----- End System Info ----- |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
<div class="ad-wrap"> |
| 96 |
<?php do_action("mb-display-ads"); ?> |
| 97 |
</div> |
| 98 |
|
| 99 |
<?php $admin->get_footer(); ?> |
| 100 |
|