Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active March 18, 2020 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/62e1d9797b0a3655e93d7d6e5f5844fa to your computer and use it in GitHub Desktop.
Save jchristopher/62e1d9797b0a3655e93d7d6e5f5844fa to your computer and use it in GitHub Desktop.
<?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.'
);
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment