/wp-content/plugins/google-analytics-for-wordpress/includes/admin/settings/tab-status.php

https://bitbucket.org/carloskikea/helpet · PHP · 53 lines · 27 code · 4 blank · 22 comment · 4 complexity · 4581670505ea200ddfe42834af928637 MD5 · raw file

  1. <?php
  2. /**
  3. * Status Tab.
  4. *
  5. * @since 6.1.0
  6. *
  7. * @package MonsterInsights
  8. * @subpackage Settings
  9. * @author Chris Christoff
  10. */
  11. // Exit if accessed directly
  12. if ( ! defined( 'ABSPATH' ) ) {
  13. exit;
  14. }
  15. /**
  16. * Callback for displaying the UI for support tab.
  17. *
  18. * @since 6.1.0
  19. * @access public
  20. *
  21. * @return void
  22. */
  23. function monsterinsights_settings_status_tab() {
  24. ?>
  25. <div id="monsterinsights-settings-general">
  26. <?php
  27. ?>
  28. <?php //Status page coming soon. ?>
  29. <!-- <hr /> -->
  30. </div>
  31. <?php
  32. }
  33. add_action( 'monsterinsights_tab_settings_status', 'monsterinsights_settings_status_tab' );
  34. /**
  35. * Output System Info file
  36. */
  37. function monsterinsights_system_info() {
  38. if ( ! empty( $_REQUEST['monsterinsights-action'] ) && $_REQUEST['monsterinsights-action'] === 'download_sysinfo' ) {
  39. if ( ! current_user_can( 'monsterinsights_save_settings' ) ) {
  40. return;
  41. }
  42. nocache_headers();
  43. header( 'Content-Type: text/plain' );
  44. header( 'Content-Disposition: attachment; filename="monsterinsights-system-info.txt"' );
  45. echo wp_strip_all_tags( $_POST['monsterinsights-sysinfo'] );
  46. die();
  47. }
  48. }
  49. //add_action( 'admin_init', 'monsterinsights_system_info' );