Available since: 3.0
searchwp_th_password_required_message
View Parameters »When highlighting is enabled and SearchWP finds a password protected entry, it will return a default message as opposed to finding an excerpt with a highlight. You can use this hook to customize that returned message:
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 | |
// Customize the 'password protected' message returned by SearchWP's highlighter. | |
add_filter( 'searchwp_th_password_required_message', function( $message ) { | |
return __( 'There is no excerpt because this is a protected post.' ); | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$message |
String |
The message to return when an entry is password protected |