searchwp\index\rebuild
Since: 4.0.0
Table of Contents
This action is fired any time the Index is reset, just prior to the rebuilding job is triggered.
Parameters
There are no parameters for this hook.
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Send an email when the index is reset
Send an email to the site administrator when the Index is reset
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 | |
// Send an email to the site adminstrator when the SearchWP Index is reset. | |
add_action( 'searchwp\index\rebuild', function() { | |
wp_mail( | |
get_option( 'admin_email' ), | |
'SearchWP Index Reset', | |
'The SearchWP Index has been reset.' | |
); | |
} ); |