monsterinsights_tools_settings_tab

The Google Analytics for WordPress by MonsterInsights monsterinsights tools settings tab function.

Description

monsterinsights_tools_settings_tab(); 

Usage

  1. if ( !function_exists( 'monsterinsights_tools_settings_tab' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/pages/tools.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = monsterinsights_tools_settings_tab(); 
  7.  

Defined (1)

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

/includes/admin/pages/tools.php  
  1. function monsterinsights_tools_settings_tab() { 
  2. ob_start();?> 
  3. <h2><?php echo esc_html__( 'Setting Tools', 'google-analytics-for-wordpress' );?></h2> 
  4. <p><?php echo esc_html__( 'You can use the below tools to import settings from other MonsterInsights websites or export settings to import into another MonsterInsights install.', 'google-analytics-for-wordpress' ); ?> </p> 
  5. <br /> 
  6. <table class="form-table"> 
  7. <tbody> 
  8. <tr> 
  9. <th scope="row"> 
  10. <label for="monsterinsights-import-settings"> 
  11. <?php echo esc_html__( 'Import Settings', 'google-analytics-for-wordpress' );?> 
  12. </label> 
  13. </th> 
  14. <td> 
  15. <?php  
  16. if ( ! empty( $_REQUEST['action'] ) && ! empty( $_REQUEST['result'] ) && $_REQUEST['action'] === 'import' && $_REQUEST['result'] === 'success' ) { 
  17. echo MonsterInsights()->notices->display_inline_notice( 'monsterinsights_standard_notice', '', __( 'Successfully imported settings!', 'google-analytics-for-wordpress'), 'success', false, array() ); 
  18. ?> 
  19. <form method="post" enctype="multipart/form-data"> 
  20. <p> 
  21. <input type="file" name="import_file"/> 
  22. <input type="hidden" name="monsterinsights_action" value="monsterinsights_import_settings" /> 
  23. </p> 
  24. <p class="description"><?php echo esc_html__( 'Paste the import field content from another MonsterInsights site in above.', 'google-analytics-for-wordpress' );?></p> 
  25. <p> 
  26. </p> 
  27. <p> 
  28. <?php submit_button( __( 'Import', 'google-analytics-for-wordpress' ), 'monsterinsights-action-button button button-action', 'submit', false ); ?> 
  29. </p> 
  30. </form> 
  31. </td> 
  32. </tr> 
  33. <tr> 
  34. <th scope="row"> 
  35. <label for="monsterinsights-export-settings"> 
  36. <?php echo esc_html__( 'Export Settings:', 'google-analytics-for-wordpress' );?> 
  37. </label> 
  38. </th> 
  39. <td> 
  40. <form method="post" enctype="multipart/form-data"> 
  41. <p> 
  42. <input type="hidden" name="monsterinsights_action" value="monsterinsights_export_settings" /> 
  43. </p> 
  44. <p> 
  45. </p> 
  46. <p> 
  47. <?php submit_button( __( 'Export', 'google-analytics-for-wordpress' ), 'monsterinsights-settings-export monsterinsights-action-button button button-action', 'submit', false ); ?> 
  48. </p> 
  49. </form> 
  50. </td> 
  51. </tr> 
  52.  
  53. </tbody> 
  54. </table> 
  55. <?php 
  56. echo ob_get_clean();