uninstall.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Fired when the plugin is uninstalled.
  4. *
  5. * When populating this file, consider the following flow
  6. * of control:
  7. *
  8. * - This method should be static
  9. * - Check if the $_REQUEST content actually is the plugin name
  10. * - Run an admin referrer check to make sure it goes through authentication
  11. * - Verify the output of $_GET makes sense
  12. * - Repeat with other user roles. Best directly by using the links/query string parameters.
  13. * - Repeat things for multisite. Once for a single site in the network, once sitewide.
  14. *
  15. * @link https://wordpress.org/plugins/simple-job-board
  16. *
  17. * @package Simple_Job_Board
  18. * @since 1.0.0
  19. */
  20. // If uninstall not called from WordPress, then exit.
  21. if (!defined('WP_UNINSTALL_PLUGIN')) { exit; }
  22. // Delete Options -> Plugin Version
  23. delete_option('sjb_version');
  24. // Delete Options -> General Settings
  25. delete_option('job_board_jobpost_slug');
  26. delete_option('job_board_job_category_slug');
  27. delete_option('job_board_job_type_slug');
  28. delete_option('job_board_job_location_slug');
  29. // Delete Options-> Appearance Settings
  30. delete_option('job_board_pages_layout');
  31. delete_option('job_board_listing');
  32. delete_option('job_board_listing_view');
  33. delete_option('job_board_jobpost_content');
  34. delete_option('job_board_container_class');
  35. delete_option('job_board_container_id');
  36. delete_option('job_board_typography');
  37. // Delete Options-> Settings Feature & Application Form
  38. delete_option('jobapp_settings_options');
  39. delete_option('jobfeature_settings_options');
  40. // Delete Options-> Search Filters
  41. delete_option('job_board_category_filter');
  42. delete_option('job_board_jobtype_filter');
  43. delete_option('job_board_location_filter');
  44. delete_option('job_board_search_bar');
  45. // Delete Options-> Notifications
  46. delete_option('job_board_admin_notification');
  47. delete_option('job_board_applicant_notification');
  48. delete_option('job_board_hr_notification');
  49. delete_option('settings_hr_email');
  50. // Delete Options-> Uploaded File Extension
  51. delete_option('job_board_all_extensions_check');
  52. delete_option('job_board_allowed_extensions');
  53. delete_option('job_board_upload_file_ext');
  54. delete_option('job_board_anti_hotlinking');