Forked from MaximeCulea/force-search-wp-indexation.php
Created
March 1, 2018 09:51
-
-
Save 7studio/6bc43c1b202e84376cafce36bf0016c5 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