| 1 |
<?php |
| 2 |
/** |
| 3 |
* Settings > Tools view |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
|
| 11 |
<div class="metabox-holder"> |
| 12 |
|
| 13 |
<div class="postbox"> |
| 14 |
<h3><span><?php esc_html_e( 'Debug Log', 'convertkit' ); ?></span></h3> |
| 15 |
<div class="inside"> |
| 16 |
<p class="description"> |
| 17 |
<?php esc_html_e( 'Use this tool to help debug ConvertKit plugin functionality.', 'convertkit' ); ?><br /> |
| 18 |
<?php esc_html_e( 'For performance, the last 500 lines of the log are displayed. Use the Download Log option to review the full log.', 'convertkit' ); ?><br /> |
| 19 |
</p> |
| 20 |
|
| 21 |
<textarea readonly="readonly" id="debug-log-textarea" class="large-text convertkit-monospace" rows="15"><?php echo esc_textarea( $log->read() ); ?></textarea> |
| 22 |
|
| 23 |
<?php |
| 24 |
if ( $log->exists() ) { |
| 25 |
?> |
| 26 |
<p class="submit"> |
| 27 |
<?php |
| 28 |
submit_button( |
| 29 |
__( 'Download Log', 'convertkit' ), |
| 30 |
'primary', |
| 31 |
'convertkit-download-debug-log', |
| 32 |
false |
| 33 |
); |
| 34 |
|
| 35 |
submit_button( |
| 36 |
__( 'Clear Log', 'convertkit' ), |
| 37 |
'secondary', |
| 38 |
'convertkit-clear-debug-log', |
| 39 |
false |
| 40 |
); |
| 41 |
?> |
| 42 |
</p> |
| 43 |
<p><?php esc_html_e( 'Log file', 'convertkit' ); ?>: <code><?php echo esc_attr( $log->get_filename() ); ?></code></p> |
| 44 |
<?php |
| 45 |
} |
| 46 |
?> |
| 47 |
</div><!-- .inside --> |
| 48 |
</div><!-- .postbox --> |
| 49 |
|
| 50 |
<div class="postbox"> |
| 51 |
<h3><span><?php esc_html_e( 'System Info', 'convertkit' ); ?></span></h3> |
| 52 |
<div class="inside"> |
| 53 |
<p><?php esc_html_e( 'Use this tool to send system info to support when necessary.', 'convertkit' ); ?></p> |
| 54 |
|
| 55 |
<textarea readonly="readonly" id="system-info-textarea" class="large-text convertkit-monospace" rows="15"><?php echo esc_textarea( $system_info->get() ); ?></textarea> |
| 56 |
|
| 57 |
<p class="submit"> |
| 58 |
<?php |
| 59 |
submit_button( |
| 60 |
__( 'Download System Info', 'convertkit' ), |
| 61 |
'primary', |
| 62 |
'convertkit-download-system-info', |
| 63 |
false |
| 64 |
); |
| 65 |
?> |
| 66 |
</p> |
| 67 |
</div><!-- .inside --> |
| 68 |
|
| 69 |
<?php |
| 70 |
// Nonce for Log and System Info actions. |
| 71 |
wp_nonce_field( 'convertkit-settings-tools', '_convertkit_settings_tools_nonce' ); |
| 72 |
?> |
| 73 |
</div><!-- .postbox --> |
| 74 |
</div><!-- .metabox-holder --> |
| 75 |
|