class-nf-system-status.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. /**
  3. * Debug/Status page
  4. *
  5. * @author Patrick Rauland
  6. * @category Admin
  7. * @since 2.2.50
  8. */
  9. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  10. if ( ! class_exists( 'NF_System_Status' ) ) :
  11. /**
  12. * NF_System_Status Class
  13. */
  14. class NF_System_Status {
  15. /**
  16. * Initializes the class
  17. */
  18. public function __construct(){
  19. // register the system status page
  20. add_action('admin_init', array($this, 'ninja_forms_register_tab_system_status'));
  21. }
  22. /**
  23. * Handles output of the reports page in admin.
  24. */
  25. public function ninja_forms_register_tab_system_status(){
  26. // include the file
  27. require_once( NINJA_FORMS_DIR . "/includes/admin/pages/system-status.php" );
  28. // add the arugements
  29. $args = array(
  30. 'name' => __( 'Ninja Forms System Status', 'ninja-forms' ),
  31. 'page' => 'ninja-forms-system-status',
  32. 'display_function' => 'ninja_forms_tab_system_status',
  33. 'save_function' => '',
  34. 'show_save' => false,
  35. );
  36. // register the tab
  37. ninja_forms_register_tab('system_status', $args);
  38. }
  39. }
  40. endif;
  41. return new NF_System_Status();