Created
June 3, 2020 13:34
-
-
Save jchristopher/2ddf485de4a13813e2dd54dcbbeab33b to your computer and use it in GitHub Desktop.
Index Mod vs. Source Mod in SearchWP
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 | |
// @link https://searchwp.com/documentation/knowledge-base/comparing-index-source-mods/ | |
// Instantiate an index Mod that applies to the entire index. | |
$mod = new \SearchWP\Mod(); | |
// Instantiate a Source Mod that applies only to Posts. | |
$source = \SearchWP\Utils::get_post_type_source_name( 'post' ); | |
$mod = new \SearchWP\Mod( $source ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment