searchwp\nuke_on_delete
Since: 4.0.0
Table of Contents
By default when SearchWP is deactivated and deleted using the available links on the Plugins page of the WordPress Admin, its data will remain in case you choose to reinstall and reactivate SearchWP.
If you would like SearchWP to permanently remove all of its data when clicking the Delete link on the Plugins page of the WordPress Admin, you can either tick the checkbox on the Advanced tab of the SearchWP settings screen, or use this hook.
Parameters
Type | Parameter | Default | Since |
---|---|---|---|
Boolean | $enabled |
State of checkbox on Advanced tab of SearchWP settings screen | 4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Remove all SearchWP data on uninstall
Programmatically enable SearchWP’s uninstallation routine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove all SearchWP data when clicking Delete link on WordPress Admin Plugins page. | |
// NOTE: This operation CANNOT be reversed. | |
add_filter( 'searchwp\nuke_on_delete', '__return_true' ); |