searchwp\source\post\attributes\comments\email
Since: 4.0.0
Table of Contents
When Comments have been added to a WP_Post
-based Source, control whether the Comment Email is indexed.
Parameters
Type | Parameter | Default | Since | ||||||
---|---|---|---|---|---|---|---|---|---|
Boolean | $enabled |
false |
4.0.0 |
||||||
Array |
$args
|
4.0.0 |
Examples
All hooks should be added to your custom SearchWP Customizations Plugin.
Index Comment Author Email
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 | |
// Enble Comment Author Email indexing in SearchWP. | |
add_filter( 'searchwp\source\post\attributes\comments\email', function( $enabled, $args ) { | |
return true; | |
}, 10, 2 ); |