searchwp\index\rebuild
Depuis : 4.0.0
Table des matières
Cette action est déclenchée chaque fois que l'index est réinitialisé, juste avant le déclenchement du travail de reconstruction.
Paramètres
Il n’y a pas de paramètres pour ce hook.
Exemples
All hooks should be added to your custom SearchWP Customizations Plugin.
Envoyer un e-mail lorsque l’index est réinitialisé
Envoyer un e-mail à l’administrateur du site lorsque l’index est réinitialisé
This file contains hidden or 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.' | |
| ); | |
| } ); |

