'1', 'x_content_type_options' => '1', 'strict_transport_security' => '1', 'permissions_policy' => '1', 'x_frame_options' => '1', 'referrer_policy' => '1', 'content_security_policy' => '1', 'remove_x_powered_by' => '0', 'hide_wp_version' => '0', 'remove_login_errors' => '0', 'disable_xmlrpc' => '0', 'remove_x_pingback' => '0', 'restrict_rest_api' => '0', 'csp_default_src' => "'self' ".$site_url, 'csp_script_src' => "'self' ".$site_url, 'csp_style_src' => "'self' ".$site_url, 'csp_img_src' => "'self' ".$site_url, 'csp_connect_src' => "'self' ".$site_url, 'csp_font_src' => "'self' ".$site_url, 'csp_object_src' => "'self' ".$site_url, 'csp_media_src' => "'self' ".$site_url, 'csp_frame_src' => "'self' ".$site_url, 'csp_worker_src' => "'self' ".$site_url, 'csp_form_action' => " * ", 'csp_base_uri' => '', 'csp_sandbox' => '', 'csp_report_uri' => '', 'csp_report_to' => '' ); // Merge existing options with defaults // This ensures we only set default values for options that don't already exist $final_options = wp_parse_args($existing_options, $default_options); // Update options in database update_option('ash_options', $final_options); } // Deactivation hook register_deactivation_hook(__FILE__, 'ash_deactivate'); function ash_deactivate() { // No need to do anything here } // Uninstall hook for complete cleanup register_uninstall_hook(__FILE__, 'ash_uninstall'); function ash_uninstall() { // Remove all plugin options and any other plugin-related data delete_option('ash_options'); // Clean up any additional plugin data if needed // For example, delete custom post types, taxonomies, etc. // Clear any scheduled cron jobs if they exist wp_clear_scheduled_hook('ash_scheduled_tasks'); }