Filter: ep_search_template_user_id

apply_filters( 'ep_search_template_user_id', $user_id ) → {int}

The ID of the current user when generating the Instant Results search template.

By default Instant Results sets the current user as anomnymous when generating the search template, so that any filters applied to queries for logged-in or specific users are not applied to the template. This filter supports setting a specific user as the current user while the template is generated.

Parameters:
Name Type Description
$user_id int

User ID to use.

Since:
  • 4.1.0
Source:
Returns:

New user ID to use.

Type
int