cptui_render_debuginfo_section

Content for the Debug Info tab.

Description

cptui_render_debuginfo_section(); 

Usage

  1. if ( !function_exists( 'cptui_render_debuginfo_section' ) ) { 
  2. require_once '/inc/tools.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptui_render_debuginfo_section(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/tools.php  
  1. function cptui_render_debuginfo_section() { 
  2. $debuginfo = new CPTUI_Debug_Info(); 
  3.  
  4. echo '<form id="cptui_debug_info" method="post">'; 
  5. $debuginfo->tab_site_info(); 
  6.  
  7. if ( ! empty( $_POST ) && isset( $_POST['cptui_debug_info_email'] ) ) { 
  8. $email_args = array(); 
  9. $email_args['email'] = sanitize_text_field( $_POST['cptui_debug_info_email'] ); 
  10. $debuginfo->send_email( $email_args ); 
  11.  
  12. echo '<p><label for="cptui_debug_info_email">' . __( 'Please provide an email address to send debug information to: ', 'custom-post-type-ui' ) . '</label><input type="email" id="cptui_debug_info_email" name="cptui_debug_info_email" value="" /></p>'; 
  13.  
  14. /** 
  15. * Filters the text value to use on the button when sending debug information. 
  16. * @since 1.2.0 
  17. * @param string $value Text to use for the button. 
  18. */ 
  19. echo '<p><input type="submit" class="button-primary" name="cptui_send_debug_email" value="' . esc_attr( apply_filters( 'cptui_debug_email_submit_button', __( 'Send debug info', 'custom-post-type-ui' ) ) ) . '" /></p>'; 
  20. echo '</form>'; 
  21.  
  22. /** 
  23. * Fires after the display of the site information. 
  24. * @since 1.3.0 
  25. */ 
  26. do_action( 'cptui_after_site_info' );