Created
February 1, 2018 15:24
-
-
Save MaximeCulea/76609a7024b4478ef7c49ca2097669ed to your computer and use it in GitHub Desktop.
Force indexation of Search WP.
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 | |
/** | |
* Force indexation of Search WP | |
* May cause trouble on production site | |
* | |
* @author Maxime CULEA | |
*/ | |
/* @see https://searchwp.com/docs/hooks/searchwp_lazy_settings/ */ | |
add_filter( 'searchwp_lazy_settings', '__return_false' ); | |
/* @see https://searchwp.com/docs/hooks/searchwp_indexer_throttle/ */ | |
add_filter( 'searchwp_indexer_throttle', function() { return 0; } ); | |
/* @see https://searchwp.com/docs/hooks/searchwp_load_maximum/ */ | |
add_filter( 'searchwp_load_maximum', function() { return 50; } ); | |
/* @see https://searchwp.com/docs/hooks/searchwp_index_chunk_size// */ | |
add_filter( 'searchwp_index_chunk_size', function() { return 100; } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment