coresocial_explore_prompt
Developer Knowledge Level
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
PHP
Definition
apply_filters( "coresocial_explore_prompt", $prompt, $network, $context );
Arguments
Name
Type
Description
$prompt
string
Expanded plain-text prompt after template placeholders are substituted.
$network
string
AI provider code, such as openai or gemini.
$context
array
Item context: item, item_id, url, title, image.
Returns
string — expanded prompt.
Runs once per prepared provider button. The filtered prompt supplies both the outgoing URL and copy-panel data; markup is stripped after filtering. A non-string return preserves the original prompt. Direct low-level build_prompt() and get_share_link() calls do not run this preparation hook.
Example
add_filter( 'coresocial_explore_prompt', function ( $prompt, $network, $context ) {
return $prompt . ' Reply in French.';
}, 10, 3 );