cptui_tools

Create our settings page output.

Description

cptui_tools(); 

Usage

  1. if ( !function_exists( 'cptui_tools' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'custom-post-type-ui/inc/tools.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cptui_tools(); 
  7.  

Defined (1)

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

/inc/tools.php  
  1. function cptui_tools() { 
  2.  
  3. $tab = ''; 
  4. if ( ! empty( $_GET ) ) { 
  5. if ( ! empty( $_GET['action'] ) && 'taxonomies' === $_GET['action'] ) { 
  6. $tab = 'taxonomies'; 
  7. } elseif ( ! empty( $_GET['action'] ) && 'get_code' === $_GET['action'] ) { 
  8. $tab = 'get_code'; 
  9. } elseif ( ! empty( $_GET['action'] ) && 'debuginfo' === $_GET['action'] ) { 
  10. $tab = 'debuginfo'; 
  11. } else { 
  12. $tab = 'post_types'; 
  13.  
  14. echo '<div class="wrap">'; 
  15.  
  16. /** 
  17. * Fires right inside the wrap div for the import/export pages. 
  18. * @since 1.3.0 
  19. * @deprecated 1.5.0 
  20. */ 
  21. do_action_deprecated( 'cptui_inside_importexport_wrap', array(), '1.5.0', 'cptui_inside_tools_wrap' ); 
  22.  
  23. /** 
  24. * Fires right inside the wrap div for the tools pages. 
  25. * @since 1.5.0 
  26. */ 
  27. do_action( 'cptui_inside_tools_wrap' ); 
  28.  
  29. // Create our tabs. 
  30. cptui_settings_tab_menu( $page = 'tools' ); 
  31.  
  32. /** 
  33. * Fires inside the markup for the import/export section. 
  34. * Allows for more modular control and adding more sections more easily. 
  35. * @since 1.2.0 
  36. * @deprecated 1.5.0 
  37. * @param string $tab Current tab being displayed. 
  38. */ 
  39. do_action_deprecated( 'cptui_import_export_sections', array( $tab ), '1.5.0', 'cptui_tools_sections' ); 
  40.  
  41. /** 
  42. * Fires inside the markup for the tools section. 
  43. * Allows for more modular control and adding more sections more easily. 
  44. * @since 1.5.0 
  45. * @param string $tab Current tab being displayed. 
  46. */ 
  47. do_action( 'cptui_tools_sections', $tab ); 
  48.  
  49.  
  50. echo '</div><!-- End .wrap -->';