searchwp\index\rebuild
Desde: 4.0.0
Sumário
Esta ação é disparada sempre que o Índice é redefinido, pouco antes do trabalho de reconstrução ser acionado.
Parâmetros
Não há parâmetros para este hook.
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Enviar um e-mail quando o índice for redefinido
Enviar um e-mail para o administrador do site quando o índice for redefinido
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.' | |
| ); | |
| } ); |

