SearchWP

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

<?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' );

How to use this code