wpfts_intro_text (Filter)
The wpfts_intro_text
filter in WP Fast Total Search allows developers to modify the welcome message text displayed on the plugin’s settings page after the first installation. This text contains brief instructions on getting started with the plugin and a suggestion to begin indexing.
When to Use
This filter is used if you need to change the standard welcome text, for example, to add links to your addon’s documentation or provide additional information for users.
Arguments
$intro_text
(string): The standard welcome message text.
Return Value
$intro_text
(string): The modified welcome message text.
Example
add_filter('wpfts_intro_text', 'my_wpfts_intro_text_filter');
function my_wpfts_intro_text_filter($intro_text)
{
// Add a link to the addon documentation.
$intro_text .= '<p>'.sprintf(__('For more information, please refer to the <a href="%s" target="_blank">documentation</a>.', 'fulltext-search'), 'https://example.com/my-addon/docs/').'</p>';
return $intro_text;
}
Important Notes
- The
wpfts_intro_text
filter is called only once after plugin activation, if theis_new
flag in the result of theWPFTS_Core::GetUpdates()
method istrue
, and the user is on the WPFTS settings page. - The welcome message text is stored in the database in the
wpfts_is_welcome_message
option. - After the user closes the welcome message, it will no longer be displayed, and the
wpfts_intro_text
filter will not be called.
This filter allows developers to customize the WP Fast Total Search welcome message and provide users with additional information about their extensions.