Available since: 2.7
searchwp_initial_engine_settings
On activation, SearchWP implements a default set of settings. If you have a systematic way of implementing SearchWP you may want to customize the defaults, and this hook lets you do just that.
Example: If you would like to customize the default settings used by SearchWP on activation, add something like the following to your theme’s functions.php:
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 | |
function my_searchwp_initial_engine_settings( $settings ){ | |
// $settings contains all of the default engine settings | |
// you can customize the weights in any way you see fit | |
// but do not alter the structure of the array, just values | |
return $settings; | |
} | |
add_filter( 'searchwp_initial_engine_settings', 'my_searchwp_initial_engine_settings' ); |