ElasticPress 5.3.6 has 75 actions and 392 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when ElasticPress fires an action
add_action( 'ep_cli_put_mapping', function( $indexable, $args, $assoc_args ) {
// Your code runs here.
}, 10, 3 );
// Change a value ElasticPress is about to use
add_filter( 'ep_analyzer_language', function( $value, $arg2 ) {
// Change $value here.
return $value;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter Elasticsearch maximum shingle difference */ apply_filters( 'ep_analyzer_language', 'english', 'analyzer_default' ); -
/** * This filter is documented in * includes/classes/Feature/Facets/Types/Taxonomy/Block.php */ apply_filters( 'ep_facet_renderer_class', __NAMESPACE__ . '\Renderer', 'post-type', 'block', $attributes ); -
/** * Filter Elasticsearch maximum shingle difference */ apply_filters( 'ep_default_analyzer_filters', [ 'lowercase', 'ep_stop', 'ewp_snowball', 'ep_asciifolding' ] ); -
/** * Filter Elasticsearch default analyzer's char_filter */ apply_filters( 'ep_default_search_analyzer_char_filters', array( 'html_strip' ) ); -
/** * Filter Elasticsearch default analyzer's filters */ apply_filters( 'ep_default_search_analyzer_filters', array( 'lowercase', 'ep_stop', 'ewp_snowball', 'ep_asciifolding' ) ); -
/** * This filter is documented in includes/classes/Indexable/Post/Post.php */ apply_filters( 'ep_prepare_meta_allowed_protected_keys', [], $empty_post ); -
/** * Filter to whether skip a sync during autosave, defaults to true */ apply_filters( 'ep_skip_autosave_sync', true, __FUNCTION__ ); -
/** * Fires after CLI put mapping */ do_action( 'ep_cli_put_mapping', $indexable, $args, $assoc_args ); -
/** * Filter number of Elasticsearch replicas to use in indices */ apply_filters( 'ep_default_index_number_of_replicas', 1 ); -
/** * Filter number of Elasticsearch shards to use in indices */ apply_filters( 'ep_default_index_number_of_shards', 5 ); -
/** * Filter how long results of Elasticsearch version query are stored */ apply_filters( 'ep_es_info_cache_expiration', ( 5 * MINUTE_IN_SECONDS ) ); -
/** * Filter to kill post sync */ apply_filters( 'ep_post_sync_kill', false, $object_id, $object_id ); -
/** * Filter to skip WP Query integration */ apply_filters( 'ep_skip_query_integration', false, $query ); -
/** * Filter match phrase boost amount */ apply_filters( "ep_{$indexable_slug}_match_phrase_boost", 4, $search_fields, $query_vars ); -
/** * Filter documents pipeline ID */ apply_filters( 'ep_documents_pipeline_id', Indexables::factory()->get( 'post' )->get_index_name() . '-attachment' ); -
/** * Filter whether to enable query integration during indexing */ apply_filters( 'ep_enable_query_integration_during_indexing', false, $indexable_slug ); -
/** * Filter facet search threshold */ apply_filters( 'ep_facet_search_threshold', 15, $this->meta_field, 'meta', $instance ); -
/** * Filter fallback Elasticsearch version */ apply_filters( 'ep_fallback_elasticsearch_version', '2.0' ); -
/** * Filter boost for post match phrase query. */ apply_filters_deprecated( 'ep_match_phrase_boost', [ $query['bool']['should'][0]['multi_match']['boost'], $search_fields, $query_vars ], '4.3.0', 'ep_post_match_phrase_boost' ); -
/** * Set the maximum results window size. */ apply_filters( 'ep_max_results_window', 10000 ); -
/** * Fires before documents are prepared to be indexed, in single and bulk * indexing. */ do_action( 'ep_pre_prepare_documents', [ $object_id ], $this->slug ); -
/** * Filter pre-prepare meta for a post */ apply_filters( 'ep_prepare_meta_data', (array) get_post_meta( $post->ID ), $post ); -
/** * Filter Elasticsearch total field limit for posts */ apply_filters( 'ep_total_field_limit', 5000 ); -
/** * Filter match boost amount */ apply_filters( "ep_{$indexable_slug}_match_boost", 2, $search_fields, $query_vars ); -
/** * Filter the search algorithm to be used */ apply_filters( "ep_{$this->slug}_search_algorithm", 'basic', $search_text, $search_fields, $query_vars ); -
/** * Filter whether to show epio credentials fields in admin UI or not */ apply_filters( 'ep_admin_show_credentials', true ); -
/** * Filter whether to integrate with admin queries. */ apply_filters( 'ep_admin_wp_query_integration', false ); -
/** * Filter to integrate with admin ajax queries */ apply_filters( 'ep_ajax_wp_query_integration', false ); -
/** * Conditionally kill indexing on a specific object */ apply_filters( 'ep_bulk_index_action_args', $action_args, $document ); -
/** * Filter Elasticsearch max result window for users */ apply_filters( 'ep_comment_max_result_window', 1000000 ); -
/** * Filter Elasticsearch total field limit for users */ apply_filters( 'ep_comment_total_field_limit', 5000 ); -
/** * Filter Elasticsearch default analyzer's char_filter */ apply_filters( 'ep_default_analyzer_char_filters', array( 'html_strip' ) ); -
/** * Filter taxonomies made available for faceting */ apply_filters( 'ep_facet_include_taxonomies', $taxonomies ); -
/** * Filter if EP should only filter by fields selected in facets. Defaults to * true. */ apply_filters( 'ep_facet_should_check_if_allowed', true ); -
/** * This filter is documented below */ apply_filters( 'ep_facet_tax_special_slug_taxonomies', [], $selected_filters ); -
/** * Fires after feature is deactivated */ do_action( 'ep_feature_post_deactivation', $this->slug, $this ); -
/** * Filter class applied to search highlight tags */ apply_filters( 'ep_highlighting_class', 'ep-highlight' ); -
/** * Filter the tag that wraps the search highlighted term */ apply_filters( 'ep_highlighting_tag', $current_tag ); -
/** * Filter whether Elasticsearch ignores malformed fields or not. */ apply_filters( 'ep_ignore_malformed', true ); -
/** * Filter if a fully reindex is being done to an indexable */ apply_filters( "ep_is_full_reindexing_{$indexable_slug}", false ); -
/** * Filter boost for post match query */ apply_filters_deprecated( 'ep_match_boost', [ $query['bool']['should'][1]['multi_match']['boost'], $search_fields, $query_vars ], '4.3.0', 'ep_post_match_boost' ); -
/** * Filter Elasticsearch max result window for posts */ apply_filters( 'ep_max_result_window', 1000000 ); -
/** * Filter Elasticsearch maximum shingle difference */ apply_filters( 'ep_max_shingle_diff', 8 ); -
/** * Filter the distinct meta keys fetched from the database. */ apply_filters( 'ep_post_meta_keys_db', $meta_keys ); -
/** * Filter the distinct meta keys fetched from the database per post type. */ apply_filters( 'ep_post_meta_keys_db_per_post_type', $meta_keys, $post_type ); -
/** * Filter indexable meta keys for posts */ apply_filters( 'ep_prepare_meta_allowed_keys', array_merge( $allowed_protected_keys, $selected_keys ), $post ); -
/** * This filter is documented in includes/classes/Indexable/Post/Post.php */ apply_filters( 'ep_prepare_meta_excluded_public_keys', [], $empty_post ); -
/** * Filter final list of prepared meta. */ apply_filters( 'ep_prepared_post_meta', [], $post ); -
/** * Fires after Elasticsearch remote request */ do_action( 'ep_remote_request', $query, $type ); -
/** * Filter to skip WP_Comment_Query integration */ apply_filters( 'ep_skip_comment_query_integration', false, $query ); -
/** * Filter whether to skip the permissions check on updating a post */ apply_filters( 'ep_sync_insert_permissions_bypass', false, $post_id ); -
/** * Filter weighting configuration for search */ apply_filters( 'ep_weighting_configuration_for_search', $weight_config, $args ); -
/** * DEPRECATED. Expands or contracts the post_types eligible for indexing. */ apply_filters_deprecated( 'ep_woocommerce_default_supported_post_types', [ $post_types ], '4.7.0', 'ep_woocommerce_orders_supported_post_types' ); -
/** * Fires after the request is sent the search template API endpoint. */ do_action( "{$this->get_hook_prefix()}_template_deleted" ); -
/** * Fires after the request is sent the search template API endpoint. */ do_action( "{$this->get_hook_prefix()}_template_saved", $template ); -
/** * Filter the query logger object */ apply_filters( 'elasticpress_general_ep_screens', $general_ep_screens ); -
/** * Fires after Elasticpress plugin is loaded */ do_action( 'elasticpress_loaded' ); -
/** * Filter formatted Elasticsearch query (only contains query part) */ apply_filters( "ep_{$indexable_slug}_formatted_args_query", $query, $query_vars, $search_term, $search_fields ); -
/** * Filter fuzziness amount */ apply_filters( "ep_{$indexable_slug}_fuzziness_arg", 1, $search_fields, $query_vars ); -
/** * Filter boost for match cross_fields query */ apply_filters( "ep_{$indexable_slug}_match_cross_fields_boost", 1, $search_fields, $query_vars ); -
/** * Filter fuzziness for match query */ apply_filters( "ep_{$indexable_slug}_match_fuzziness", 'auto', $search_fields, $query_vars ); -
/** * This filter is documented in includes/classes/Indexable.php */ apply_filters_deprecated( "ep_{$indexable->slug}_index_kill", [ false, $indexable_object->ID ], 'ElasticPress 5.3.3', 'ep_' . $indexable->slug . '_sync_kill' ); -
/** * This filter is documented in includes/classes/Indexable.php */ apply_filters( "ep_{$indexable->slug}_sync_kill", false, $indexable_object->ID ); -
/** * Filters arguments used to query for content for each indexable */ apply_filters( "ep_{$this->args['method']}_index_args", $args ); -
/** * Fires after one by one indexing an object */ do_action( "ep_{$this->args['method']}_object_index", $object_id, $indexable, $return ); -
/** * Fires at start of new index */ do_action( "ep_{$this->args['method']}_start_index", $this->index_meta ); -
/** * Filter the max. number of different distinct values to be returned by * Elasticsearch. */ apply_filters( "ep_{$this->slug}_all_distinct_values", $count, $field ); -
/** * Conditionally kill indexing on a specific object */ apply_filters_deprecated( "ep_{$this->slug}_index_kill", [ false, $object_id ], 'ElasticPress 5.3.3', 'ep_' . $this->slug . '_sync_kill' ); -
/** * Conditionally kill indexing for an object. */ apply_filters( "ep_{$this->slug}_sync_kill", false, $object_id ); -
/** * Filter the ACF Repeater field value before it is indexed */ apply_filters( 'ep_acf_repeater_meta_value', $value_encoded, $value_field, $key, $post ); -
/** * Filter whether EP should or not display the field setting in ACF */ apply_filters( 'ep_acf_repeater_should_display_field_setting', true, $field ); -
/** * Fires after item is added to the query log */ do_action( 'ep_add_query_log', $query ); -
/** * Filter whether to display the admin bar status. */ apply_filters( 'ep_admin_bar_should_display', current_user_can( Utils\get_capability( 'admin-bar' ) ) ); -
/** * Filter whether to display the admin bar status. */ apply_filters( 'ep_admin_bar_status_and_summary', $status_and_summary, $queries, $has_main_query, $is_main_query_success ); -
/** * Filter the final output of the admin bar status and summary. */ apply_filters( 'ep_admin_bar_status_and_summary_output', $final_output, $filtered_status_and_summary, $queries ); -
/** * Filter admin notices */ apply_filters( 'ep_admin_notices', $this->notices ); -
/** * Filter whether to show host field in admin UI or not */ apply_filters( 'ep_admin_show_host', true ); -
/** * Filter protected content supported post types. For backwards compatibility. */ apply_filters( 'ep_admin_supported_post_types', $post_types ); -
/** * Fires after executing a reindex */ do_action( "ep_after_{$this->args['method']}_index" ); -
/** * Fires after item is added to sync queue */ do_action( 'ep_after_add_to_queue', $object_id, $this->get_sync_queue() ); -
/** * Perform actions after a bulk indexing is completed */ do_action( 'ep_after_bulk_index', $object_ids, $this->slug, $result ); -
/** * Perform actions after a dynamic bulk indexing is completed */ do_action( 'ep_after_bulk_index_dynamically', $object_ids, $this->slug, $results ); -
/** * Fires after indexing document and body decoding */ do_action( 'ep_after_index', $document, $return ); -
/** * Fires after document is indexed */ do_action( "ep_after_index_{$this->slug}", $document, $return ); -
/** * Fires after indexing document and body decoding */ do_action( 'ep_after_index_post', $document, $return ); -
/** * Fires after sending a put mapping request */ do_action( 'ep_after_put_mapping', $index, $request ); -
/** * Fires after item is removed from sync queue */ do_action( 'ep_after_remove_from_queue', $object_id, $this->get_sync_queue() ); -
/** * Perform actions before a new batch of documents is processed. */ do_action( 'ep_after_send_dynamic_bulk_request', $result, $body, $documents, $min_buffer_size, $max_buffer_size, $current_buffer_size, $request_time ); -
/** * Perform actions after a batch of documents was processed. */ do_action( 'ep_after_send_dynamic_bulk_requests', $results, $requests ); -
/** * Fires after a sync failed due to a PHP fatal error. */ do_action( 'ep_after_sync_error', $error ); -
/** * Fires after executing a reindex */ do_action( 'ep_after_sync_index', $this->args ); -
/** * Fires after activating, inactivating, or just updating a feature. */ do_action( 'ep_after_update_feature', $slug, $settings, $data ); -
/** * Filter to allow indexing of filtered post content */ apply_filters( 'ep_allow_post_content_filtered_index', true ); -
/** * Filter allowed mime types for documents */ apply_filters( 'ep_allowed_documents_ingest_mime_types', array( 'pdf' => 'application/pdf', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'xls' => 'application/vnd.ms-excel', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '... ); -
/** * Filter contexts for autosuggest. */ apply_filters( 'ep_autosuggest_contexts', [ 'public', 'ajax' ] ); -
/** * Filter autosuggest default selectors. */ apply_filters( 'ep_autosuggest_default_selectors', '.ep-autosuggest, input[type="search"], .search-field' ); -
/** * Filter autosuggest HTTP headers */ apply_filters( 'ep_autosuggest_http_headers', [] ); -
/** * Filter autosuggest ngram fields */ apply_filters( 'ep_autosuggest_ngram_fields', [ 'post_title' => 'post_title.suggest', 'terms\.(.+)\.name' => 'term_suggest', ] ); -
/** * Filter autosuggest JavaScript options */ apply_filters( 'ep_autosuggest_options', $epas_options ); -
/** * Filter WP Query args of the autosuggest query template. */ apply_filters( 'ep_autosuggest_query_args', [ 'post_type' => $post_type, 'post_status' => $post_status, 's' => $placeholder, 'ep_integrate' => true, 'ep_intercept_request' => true, ] ); -
/** * Filter autosuggest query placeholder */ apply_filters( 'ep_autosuggest_query_placeholder', 'ep_autosuggest_placeholder' ); -
/** * Filter available languages in Elasticsearch. */ apply_filters( 'ep_available_languages', [ 'arabic' => [ 'ar', 'ary' ], 'armenian' => [ 'hy' ], 'basque' => [ 'eu' ], 'bengali' => [ 'bn', 'bn_BD' ], 'brazilian' => [ 'pt_BR' ], 'bulgarian' => [ 'bg', 'bg_BG' ], 'catalan' => [ 'ca' ], 'cjk' => [], 'czech' => [ 'cs', 'cs_CZ' ], 'danish' => [ 'da', 'da_DK' ], 'dutch' => [ 'nl_NL_formal', 'nl_NL', 'nl_BE' ], 'english' => [ 'en', 'en_AU', 'en_GB', 'en_NZ', 'en_CA', 'en_US', 'en_ZA' ], 'es... ); -
/** * Perform actions before a new batch of documents is processed. */ do_action( 'ep_before_send_dynamic_bulk_requests', $documents ); -
/** * Short-circuits the process of getting all blocks of a template. */ apply_filters( 'ep_blocks_pre_all_blocks', null ); -
/** * Filter bulk items to sync per batch */ apply_filters( 'ep_bulk_items_per_page', 350, $this ); -
/** * Filter whether the exclusion from the "exclude from search" checkbox should * be applied */ apply_filters_deprecated( 'ep_bypass_exclusion_from_search', [ $bypass_exclusion_from_search, $query ], 'ElasticPress 5.3.0', 'WP_Query->ep_skip_search_exclusion argument' ); -
/** * Filter the WP capability needed to interact with ElasticPress in the admin */ apply_filters( 'ep_capability', 'manage_elasticpress', $context ); -
/** * Fires after bulk indexing */ do_action( "ep_cli_{$indexable->slug}_bulk_index", $queued_items, $return ); -
/** * Fires after the CLI `clear-sync` command is executed. */ do_action( 'ep_cli_after_clear_index' ); -
/** * Fires after the algorithm version is changed via WP-CLI. */ do_action( 'ep_cli_after_set_search_algorithm_version', $args, $assoc_args ); -
/** * Fires before the CLI `clear-sync` command is executed. */ do_action( 'ep_cli_before_clear_index' ); -
/** * Fires before the algorithm version is changed via WP-CLI. */ do_action( 'ep_cli_before_set_search_algorithm_version', $args, $assoc_args ); -
/** * Fires after the comment query is executed. */ do_action( 'ep_comment_after_search_widget', $comment_query, $request ); -
/** * Filter formatted Elasticsearch query (entire query) */ apply_filters( 'ep_comment_formatted_args', $formatted_args, $query_vars ); -
/** * Filter comment indexable mapping */ apply_filters( 'ep_comment_mapping', $mapping ); -
/** * Filter comment indexable mapping file */ apply_filters( 'ep_comment_mapping_file', __DIR__ . '/../../../mappings/comment/' . $mapping_file ); -
/** * Fires before the comment query is executed. */ do_action( 'ep_comment_pre_search_widget', $args, $request ); -
/** * Filter database arguments for comment query */ apply_filters( 'ep_comment_query_db_args', wp_parse_args( $args, $defaults ) ); -
/** * Filter default comment search fields */ apply_filters( 'ep_comment_search_fields', $prepared_search_fields, $query_vars ); -
/** * Filter search scope */ apply_filters( 'ep_comment_search_scope', $scope ); -
/** * Filter to args used in WP_Comment_Query in Widget Search Comment */ apply_filters( 'ep_comment_search_widget_args', $default_args ); -
/** * Filter the l10n data attached to the Widget Search Comments script */ apply_filters( 'ep_comment_search_widget_l10n_data_script', $default_script_data ); -
/** * Filters the comments response */ apply_filters( 'ep_comment_search_widget_response', $return ); -
/** * Filter sync arguments for a comment. */ apply_filters( 'ep_comment_sync_args', $comment_args, $comment_id ); -
/** * Filter to kill comment sync */ apply_filters( 'ep_comment_sync_kill', false, $comment_id ); -
/** * Filter Elasticsearch mapping before put mapping */ apply_filters( 'ep_config_mapping', $mapping, $index ); -
/** * Filter Elasticsearch put mapping response */ apply_filters( 'ep_config_mapping_request', $request, $index, $mapping ); -
/** * Filter an instance before it is added to the container */ apply_filters( 'ep_container_set', $instance, $id ); -
/** * Filter create pipeline request arguments */ apply_filters( 'ep_create_pipeline_args', $request_args ); -
/** * Filter the number of errors of a current sync that should be stored. */ apply_filters( 'ep_current_sync_number_of_errors_stored', 50 ); -
/** * Fires after dashboard put mapping is completed */ do_action( 'ep_dashboard_put_mapping', $this->index_meta, 'start' ); -
/** * Filter the default language to use at index time */ apply_filters( 'ep_default_language', $ep_language ); -
/** * Fires before object deletion */ do_action( "ep_delete_{$this->slug}", $object_id, $this->slug ); -
/** * Filter query logging. Don't log anything to the queries property when true. */ apply_filters( 'ep_disable_query_logging', false ); -
/** * Filter to disable loading of Search weighting engine. */ apply_filters( 'ep_disable_search_weighting', false ); -
/** * Filter intercepted request */ apply_filters( 'ep_do_intercept_request', new WP_Error( 400, 'No Request defined' ), $query, $args, $failures, $type ); -
/** * Filter the document status array. */ apply_filters( 'ep_doc_status', $status, $post_id, $es_doc ); -
/** * Filter whether the feature should work on the Media Library admin ajax * request */ apply_filters( 'ep_documents_media_library_ajax_enabled', $protected_content->is_active() ); -
/** * Filter whether mime type restriction should be applied to the current WP * Query */ apply_filters( 'ep_documents_wp_query_set_mime_types', $should_set_mime_types, $query ); -
/** * Filter the number of bytes the current buffer size should be incremented in * case of success. */ apply_filters( 'ep_dynamic_bulk_incremental_step', MB_IN_BYTES / 2 ); -
/** * Filter the max buffer size for dynamic bulk index requests. */ apply_filters( 'ep_dynamic_bulk_max_buffer_size', 150 * MB_IN_BYTES ); -
/** * Filter the minimum buffer size for dynamic bulk index requests. */ apply_filters( 'ep_dynamic_bulk_min_buffer_size', MB_IN_BYTES / 2 ); -
/** * Perform actions when a post is bigger than the max buffer size. */ do_action( 'ep_dynamic_bulk_post_too_big', $next_document ); -
/** * Determine if ElasticPress should integrate with a query */ apply_filters( 'ep_elasticpress_enabled', $enabled, $query ); -
/** * Filter Elasticsearch plugins */ apply_filters( 'ep_elasticsearch_plugins', $info['plugins'] ); -
/** * Filter Elasticsearch version */ apply_filters( 'ep_elasticsearch_version', $info['version'] ); -
/** * Filter the query arguments used to get Elementor templates. */ apply_filters( 'ep_elementor_templates_query_args', [ 'post_type' => [ 'elementor_library' ], 'posts_per_page' => 999, ] ); -
/** * Short-circuits the process of getting all widgets of a template. */ apply_filters( 'ep_elementor_widgets_pre_all_widgets', null ); -
/** * Filter whether to enable weighting configuration */ apply_filters( 'ep_enable_do_weighting', $should_do_weighting, $weight_config, $args, $formatted_args ); -
/** * Filter whether to enable sticky posts for this request */ apply_filters( 'ep_enable_sticky_posts', is_home(), $args, $formatted_args ); -
/** * Filter autosuggest ES query */ apply_filters( 'ep_epio_autosuggest_es_query', $es_search_query ); -
/** * Fires before the request is sent to EP.io to set Autosuggest allowed values. */ do_action( 'ep_epio_pre_send_autosuggest_allowed' ); -
/** * Fires after the request is sent to EP.io to set Autosuggest allowed values. */ do_action( 'ep_epio_sent_autosuggest_allowed' ); -
/** * Filter Elasticsearch query results */ apply_filters( 'ep_es_query_results', [ 'found_documents' => $total_hits, 'documents' => $documents, 'aggregations' => $response['aggregations'] ?? [], 'suggest' => $response['suggest'] ?? [], ], $response, $query, $query_args, $query_object ); -
/** * Filter to exclude protected posts from search. */ apply_filters( 'ep_exclude_password_protected_from_search', false ); -
/** * Filter WP query arguments that will be used to build the aggregations * filter. */ apply_filters( 'ep_facet_agg_filters', $query_args, $args, $query ); -
/** * Filter allowed query args */ apply_filters( 'ep_facet_allowed_query_args', $args ); -
/** * Filter the HTML for the facet action. */ apply_filters( 'ep_facet_date_action_html', $html, $applied_dates ); -
/** * Filter the HTML for the facet custom date. */ apply_filters( 'ep_facet_date_custom_date_html', $html, $is_custom_date, $applied_dates ); -
/** * Filter the facet filter name that's added to the URL */ apply_filters( 'ep_facet_date_filter_name', 'ep_date_filter' ); -
/** * Filter the facet filter type. Used by the Facet feature to organize filters. */ apply_filters( 'ep_facet_date_filter_type', 'ep_date' ); -
/** * Filter the options for the date facet. */ apply_filters( 'ep_facet_date_options', $options ); -
/** * Filter the HTML for an individual facet value. */ apply_filters( 'ep_facet_date_value_html', $html, $item ); -
/** * Filter the facet filter sanitize callback. */ apply_filters( 'ep_facet_default_sanitize_callback', 'sanitize_text_field' ); -
/** * Filter if facet should be enabled in the editor. Default: false */ apply_filters( 'ep_facet_enabled_in_editor', false ); -
/** * Filter the facet filter name that's added to the URL */ apply_filters( 'ep_facet_filter_name', 'ep_filter_' ); -
/** * Filter the facet filter type. Used by the Facet feature to organize filters. */ apply_filters( 'ep_facet_filter_type', 'taxonomies' ); -
/** * Filter the match type of all facets. Can be 'all' or 'any'. */ apply_filters( 'ep_facet_match_type', $settings['match_type'] ); -
/** * Filter meta values, their labels, and count. */ apply_filters( 'ep_facet_meta_all_values', $values, $this->meta_field, $instance ); -
/** * Short-circuits the process of getting distinct meta values. */ apply_filters( 'ep_facet_meta_custom_meta_values', null, $meta_key ); -
/** * Filter meta fields to be used in aggregations. */ apply_filters( 'ep_facet_meta_fields', $facets_meta_fields ); -
/** * Filter the facet filter name that's added to the URL */ apply_filters( 'ep_facet_meta_filter_name', 'ep_meta_filter_' ); -
/** * Filter the facet filter type. Used by the Facet feature to organize filters. */ apply_filters( 'ep_facet_meta_filter_type', 'meta' ); -
/** * Filter meta fields to be used in aggregations related to meta range blocks. */ apply_filters( 'ep_facet_meta_range_fields', $facets_meta_fields ); -
/** * Filter the facet filter name that's added to the URL */ apply_filters( 'ep_facet_meta_range_filter_name', 'ep_meta_range_filter_' ); -
/** * Filter the facet filter type. Used by the Facet feature to organize filters. */ apply_filters( 'ep_facet_meta_range_filter_type', 'meta-range' ); -
/** * Retrieve aggregations based on a custom field. This field must exist on the * mapping and be numeric so ES can apply min and max to it. */ apply_filters( 'ep_facet_meta_range_use_field', 'double', $meta_field ); -
/** * Filter the number of different values (and their count) for the meta field * returned by Elasticsearch. */ apply_filters( 'ep_facet_meta_size', 10000, $meta_field ); -
/** * Retrieve aggregations based on a custom field. This field must exist on the * mapping. Values available out-of-the-box are: - raw (default) - long - * double - boolean - date - datetime - time */ apply_filters( 'ep_facet_meta_use_field', 'raw', $meta_field ); -
/** * Filter the accessible label for an individual facet meta value link. */ apply_filters( 'ep_facet_meta_value_accessible_label', $item['is_selected'] ? sprintf( __( 'Remove filter: %s', 'elasticpress' ), wp_strip_all_tags( $label ) ) : sprintf( __( 'Apply filter: %s', 'elasticpress' ), wp_strip_all_tags( $label ) ), $item ); -
/** * Filter the HTML for an individual facet meta value. */ apply_filters( 'ep_facet_meta_value_html', $html, $item, $url ); -
/** * Filter the label for an individual meta value. */ apply_filters( 'ep_facet_meta_value_label', $label, $item ); -
/** * Max length of each value in the facet. */ apply_filters( 'ep_facet_meta_value_max_strlen', 100, $meta_key ); -
/** * Filter the facet filter name that's added to the URL */ apply_filters( 'ep_facet_post_type_filter_name', 'ep_post_type_filter' ); -
/** * Filter the facet filter type. Used by the Facet feature to organize filters. */ apply_filters( 'ep_facet_post_type_filter_type', 'ep_post_type' ); -
/** * Filter the number of different values (and their count) for post types * returned by Elasticsearch. */ apply_filters( 'ep_facet_post_type_size', 10000, $post_types ); -
/** * Filter the accessible label for an individual facet post-type value link. */ apply_filters( 'ep_facet_post_type_value_accessible_label', $item['is_selected'] ? sprintf( __( 'Remove filter: %s', 'elasticpress' ), wp_strip_all_tags( $label ) ) : sprintf( __( 'Apply filter: %s', 'elasticpress' ), wp_strip_all_tags( $label ) ), $item ); -
/** * Filter the HTML for an individual facet post-type value. */ apply_filters( 'ep_facet_post_type_value_html', $html, $item, $url ); -
/** * Filter the label for an individual post-type value. */ apply_filters( 'ep_facet_post_type_value_label', $label, $item ); -
/** * Filter facet selection filters to be applied to the ES query */ apply_filters( 'ep_facet_query_filters', [], $args, $query ); -
/** * Filter facet query string */ apply_filters( 'ep_facet_query_string', $query_string, $query_params ); -
/** * Filter the facet filter sanitize callback. */ apply_filters( 'ep_facet_sanitize_callback', 'sanitize_title' ); -
/** * Filter arguments passed to get_terms() while getting all possible terms for * the facet widget. */ apply_filters( 'ep_facet_search_get_terms_args', [ 'taxonomy' => $taxonomy, 'hide_empty' => true, 'update_term_meta_cache' => false, ], $args, $instance ); -
/** * Filter facet search widget HTML */ apply_filters( 'ep_facet_search_widget', $facet_html, $selected_filters, $terms_by_slug, $outputted_terms, $instance['title'] ); -
/** * Filter selected filters. */ apply_filters( 'ep_facet_selected_filters', $filters ); -
/** * Filter whether to sync query aggregations to global variable */ apply_filters( 'ep_facet_sync_aggregations_to_global', false, $query ); -
/** * Filter the taxonomy facet terms. */ apply_filters( 'ep_facet_taxonomy_terms', $terms_by_slug, $taxonomy ); -
/** * Filter the HTML for an individual facet post-type value. */ apply_filters( 'ep_facet_taxonomy_value_html', $html, $item, $url ); -
/** * Filter the Facet types available. */ apply_filters( 'ep_facet_types', $types ); -
/** * Retrieve aggregations based on a custom field. This field must exist on the * mapping. Values available out-of-the-box are: - slug (default) - term_id - * name - parent - term_taxonomy_id - term_order - facet (retrieves a JSON * representation of the term object) */ apply_filters( 'ep_facet_use_field', 'slug', $taxonomy ); -
/** * Filter the accessible label for an individual facet term link. */ apply_filters( 'ep_facet_widget_term_accessible_label', $item->is_selected ? sprintf( __( 'Remove filter: %s', 'elasticpress' ), $item->name ) : sprintf( __( 'Apply filter: %s', 'elasticpress' ), $item->name ), $item, $item->is_selected ); -
/** * Filter the HTML for an individual facet term. */ apply_filters_deprecated( 'ep_facet_widget_term_html', array( $html, $item, $url, $item->is_selected ), '4.7.0', 'ep_facet_taxonomy_value_html' ); -
/** * Filter the label for an individual facet term. */ apply_filters( 'ep_facet_widget_term_label', $label, $item, $item->is_selected ); -
/** * Filter facet aggregations. */ apply_filters( 'ep_facet_wp_query_aggs_facet', [] ); -
/** * Filter post types that are facetable. */ apply_filters( 'ep_facetable_post_types', $searchable_post_types ); -
/** * Filter the data passed to the date facet script. */ apply_filters( 'ep_facets_date_script_data', [] ); -
/** * Filter whether a feature is active or not */ apply_filters( 'ep_feature_active', $active, $feature_settings, $this ); -
/** * Fires when Feature object is created */ do_action( 'ep_feature_create', $this ); -
/** * Filter available field groups. */ apply_filters( 'ep_feature_field_groups', $this->field_group_map ); -
/** * Filter available groups. */ apply_filters( 'ep_feature_groups', $groups ); -
/** * Filter whether a feature is available or not. */ apply_filters( 'ep_feature_is_available', $this->is_visible() && ! in_array( $requirements_status->get_code(), [ FeatureRequirementsStatus::FORCE_DISABLED, FeatureRequirementsStatus::TEMPORARILY_DISABLED ], true ), $this->slug, $this ); -
/** * Filter whether a feature is visible or not in the dashboard. */ apply_filters( 'ep_feature_is_visible', $this->is_visible || $this->is_active(), $this->slug, $this ); -
/** * Fires after feature is activated */ do_action( 'ep_feature_post_activation', $this->slug, $this ); -
/** * Filter feature requirement status */ apply_filters( 'ep_feature_requirements_status', $status, $this ); -
/** * Filter the feature requirements status code */ apply_filters( 'ep_feature_requirements_status_code', (int) $this->code, $this ); -
/** * Filter the feature object */ apply_filters( 'ep_feature_requirements_status_feature', $this->feature, $this ); -
/** * Filter the feature requirements status message */ apply_filters( 'ep_feature_requirements_status_message', (array) $this->message, $this ); -
/** * Filter the settings schema of a feature */ apply_filters( 'ep_feature_settings_schema', $settings_schema, $this->slug, $this ); -
/** * Filters the arguments passed to WP_Filesystem() */ apply_filters( 'ep_filesystem_args', false ); -
/** * Filter Elasticsearch request headers */ apply_filters( 'ep_format_request_headers', $headers ); -
/** * Filter formatted Elasticsearch query (entire query) */ apply_filters( 'ep_formatted_args', $formatted_args, $args, $wp_query ); -
/** * Filter formatted Elasticsearch query for posts. */ apply_filters_deprecated( 'ep_formatted_args_query', [ $query, $query_vars, $search_term, $search_fields ], '4.3.0', 'ep_post_formatted_args_query' ); -
/** * Filter the formatted document status. */ apply_filters_deprecated( 'ep_formatted_doc_status', [ $status_indicator . $message, $document_status, $status_indicator, $message ], 'ElasticPress 5.3.0', 'ep_admin_bar_status_and_summary' ); -
/** * Filter fuzziness for post query */ apply_filters_deprecated( 'ep_fuzziness_arg', [ $query['bool']['should'][2]['multi_match']['fuzziness'], $search_fields, $query_vars ], '4.3.0', 'ep_post_fuzziness_arg' ); -
/** * Filter documents found by Elasticsearch through the /_mget endpoint. */ apply_filters( 'ep_get_documents', $docs, $index, $type, $document_ids ); -
/** * Filter Elasticsearch allows to flatten hits, if searched hits are come * within aggregations. */ apply_filters( 'ep_get_hits_from_query', $response['hits']['hits'], $response ); -
/** * Filter get pipeline request arguments */ apply_filters( 'ep_get_pipeline_args', $request_args ); -
/** * Filter the query log */ apply_filters( 'ep_get_query_log', $this->queries ); -
/** * Filter global/network Elasticsearch alias */ apply_filters( 'ep_global_alias', $alias ); -
/** * Filter the maximum number of fragments highlighted for a searched field. */ apply_filters( 'ep_highlight_number_of_fragments', 0, $field ); -
/** * Filter whether to add the `highlight` clause in the query or not. */ apply_filters( 'ep_highlight_should_add_clause', Utils\is_integrated_request( 'highlighting', [ 'public' ] ), $formatted_args, $args ); -
/** * Filter the fields that should be highlighted. */ apply_filters( 'ep_highlighting_fields', [ 'post_title', 'post_content' ], $formatted_args, $args ); -
/** * Fires before the highlighting clause is added to the Elasticsearch query */ do_action( 'ep_highlighting_pre_add_highlight', $formatted_args, $args ); -
/** * Filter ElasticPress host to use */ apply_filters( 'ep_host', $host ); -
/** * Filter to ignore invalid dates */ apply_filters( 'ep_ignore_invalid_dates', true, $post_id, $post ); -
/** * Filters the number of times the index will try before failing. */ apply_filters( 'ep_index_batch_attempts_number', $total_attempts ); -
/** * Fires before each attempt of indexing objects */ do_action( 'ep_index_batch_new_attempt', $attempts, $total_attempts ); -
/** * Filter number of items to index per cycle in the dashboard */ apply_filters( 'ep_index_default_per_page', Utils\get_option( 'ep_bulk_setting', 350 ) ); -
/** * Allow sites to select which indices will be displayed in the Index Health * page */ apply_filters( 'ep_index_health_stats_indices', $filtered_indices, $indices ); -
/** * Filter index meta during dashboard sync */ apply_filters( 'ep_index_meta', $this->index_meta ); -
/** * Filter index name */ apply_filters( 'ep_index_name', $index_name, $blog_id, $this ); -
/** * Fires after indexing document */ do_action( 'ep_index_post_retrieve_raw_response', $request, $document, $path ); -
/** * Filter arguments used to query posts from database */ apply_filters( 'ep_index_posts_args', apply_filters( 'ep_post_query_db_args', wp_parse_args( $args, $defaults ) ) ); -
/** * Filter index prefix. Defaults to nothing */ apply_filters( 'ep_index_prefix', $prefix ); -
/** * Fires after indexing document */ do_action( 'ep_index_retrieve_raw_response', $request, $document, $path ); -
/** * Filter indexable comment status */ apply_filters( 'ep_indexable_comment_status', $comment_status ); -
/** * Filter indexable comment types */ apply_filters( 'ep_indexable_comment_types', $comment_types ); -
/** * Filter indexable post statuses */ apply_filters( 'ep_indexable_post_status', array( 'publish' ) ); -
/** * Filter indexable post types */ apply_filters( 'ep_indexable_post_types', $post_types ); -
/** * Filter indexable sites */ apply_filters( 'ep_indexable_sites', $sites ); -
/** * Filter arguments to use to query for sites on network */ apply_filters( 'ep_indexable_sites_args', $args ); -
/** * Filter indexable taxonomies for Terms indexable */ apply_filters( 'ep_indexable_taxonomies', $public_taxonomies ); -
/** * Filter install status */ apply_filters( 'ep_install_status', $this->install_status ); -
/** * The schema defining the API arguments used by Instant Results. */ apply_filters( 'ep_instant_results_args_schema', $args_schema ); -
/** * Filter post type slugs to exclude from Instant Results. */ apply_filters( 'ep_instant_results_excluded_post_types', [] ); -
/** * Filter term IDs to exclude from all Instant Results taxonomy filters. */ apply_filters( 'ep_instant_results_excluded_term_ids', [] ); -
/** * The number of results per page for Instant Results. */ apply_filters( 'ep_instant_results_per_page', $this->settings['per_page'] ); -
/** * The search API endpoint. */ apply_filters( 'ep_instant_results_search_endpoint', "api/v1/search/posts/{$index}", $index ); -
/** * Filters the search template API endpoint. */ apply_filters( 'ep_instant_results_template_endpoint', "api/v1/search/posts/{$index}/template/", $index ); -
/** * Filter whether to enable integration on search queries or not. */ apply_filters( 'ep_integrate_search_queries', $enabled, $query ); -
/** * Filter whether remote request should be intercepted */ apply_filters( 'ep_intercept_remote_request', false ); -
/** * Fires after invalid Elasticsearch query */ do_action( 'ep_invalid_response', $request, $query, $query_args, $query_object ); -
/** * Filter to modify decaying */ apply_filters( 'ep_is_decaying_enabled', $is_decaying_enabled, $settings, $args ); -
/** * Bypass the standard checks and set a query to be facetable. */ apply_filters_deprecated( 'ep_is_facetable', [ false, $query ], 'ElasticPress 5.3.0', 'WP_Query->ep_is_facetable argument' ); -
/** * Filter whether an index is occurring in dashboard or CLI */ apply_filters( 'ep_is_indexing', ! empty( IndexHelper::factory()->get_index_meta() ) ); -
/** * Filter whether a CLI sync is occurring */ apply_filters( 'ep_is_indexing_wpcli', ( ! empty( $index_meta ) && 'cli' === $index_meta['method'] ) ); -
/** * Filter whether the queries for the current request should be integrated. */ apply_filters( 'ep_is_integrated_request', $is_integrated, $context, $types ); -
/** * Filter whether to not sync specific item in dashboard or not */ apply_filters_deprecated( 'ep_item_sync_kill', [ false, $indexable_object, $indexable ], 'ElasticPress 5.3.3', 'ep_' . $indexable->slug . '_sync_kill' ); -
/** * Filter to whether to keep index on site deletion */ apply_filters( 'ep_keep_index', false, $blog_id, $this->indexable_slug ); -
/** * Filter boost for post match cross_fields query */ apply_filters_deprecated( 'ep_match_cross_fields_boost', [ $query['bool']['should'][2]['multi_match']['boost'], $search_fields, $query_vars ], '4.3.0', 'ep_post_match_cross_fields_boost' ); -
/** * Filter fuzziness for post match query */ apply_filters_deprecated( 'ep_match_fuzziness', [ $query['bool']['should'][1]['multi_match']['fuzziness'], $search_fields, $query_vars ], '4.3.0', 'ep_post_match_fuzziness' ); -
/** * Filter max number of times to attempt remote requests */ apply_filters( 'ep_max_remote_request_tries', 1, $path, $args ); -
/** * Filter the maximum year limit for date conversion. */ apply_filters( 'ep_max_year_limit', 2099 ); -
/** * Filter meta management mode. */ apply_filters( 'ep_meta_mode', 'manual' ); -
/** * Filter the WP capability needed to interact with ElasticPress in the network * admin */ apply_filters( 'ep_network_capability', 'manage_network_elasticpress', $context ); -
/** * Filter to skip the password protected content clean up. */ apply_filters( 'ep_pc_skip_post_content_cleanup', false, $post_args, $post_id ); -
/** * Filter protected content supported comment types. */ apply_filters( 'ep_pc_supported_comment_types', $comment_types ); -
/** * Filter protected content supported post types. */ apply_filters( 'ep_pc_supported_post_types', $supported_post_types ); -
/** * Filter the ES filters that will be applied to the ES query. */ apply_filters( 'ep_post_filters', $filters, $args, $query ); -
/** * Filter formatted Elasticsearch post query (entire query) */ apply_filters( 'ep_post_formatted_args', $formatted_args, $args, $wp_query ); -
/** * Filter post indexable mapping */ apply_filters( 'ep_post_mapping', $mapping ); -
/** * Filter post indexable mapping file */ apply_filters( 'ep_post_mapping_file', __DIR__ . '/../../../mappings/post/' . $mapping_file ); -
/** * Filter the post mapping version cache expiration. */ apply_filters( 'ep_post_mapping_version_cache_expiration', DAY_IN_SECONDS ); -
/** * Filter the mapping version for posts. */ apply_filters( 'ep_post_mapping_version_determined', $version ); -
/** * Filter the number of IDs to be fetched per page to discover distinct meta * fields per post type. */ apply_filters( 'ep_post_meta_by_type_ids_per_page', 11000, $post_type ); -
/** * Filter the number of times EP will fetch IDs from the database */ apply_filters( 'ep_post_meta_by_type_number_of_pages', $pages, $per_page, $post_type ); -
/** * Filter if the current screen is allowed or not to use the function. */ apply_filters( 'ep_post_meta_keys_db_per_post_type_allowed_screen', $allowed_screen ); -
/** * Short-circuits the process of getting distinct meta keys from the database. */ apply_filters( 'ep_post_pre_meta_keys_db', null ); -
/** * Short-circuits the process of getting distinct meta keys from the database * per post type. */ apply_filters( 'ep_post_pre_meta_keys_db_per_post_type', null, $post_type ); -
/** * Filter arguments used to query posts from database */ apply_filters( 'ep_post_query_db_args', wp_parse_args( $args, $defaults ) ); -
/** * Filter sync arguments for a post. For backwards compatibility. */ apply_filters( 'ep_post_sync_args', $post_args, $post_id ); -
/** * Filter sync arguments for a post after meta preparation. */ apply_filters( 'ep_post_sync_args_post_prepare_meta', $post_args, $post_id ); -
/** * Filter the value used to fill meta fields while predicting indexable * content. */ apply_filters( 'ep_post_test_meta_value', 'test-value' ); -
/** * Filters the image size to use when indexing the post thumbnail. */ apply_filters( 'ep_post_thumbnail_image_size', 'medium', $post ); -
/** * Fires right before entries are about to be indexed. */ do_action( "ep_pre_{$this->args['method']}_index", $this->index_meta, ( $this->index_meta['start'] ? 'start' : false ), $indexable ); -
/** * Filter document before index */ apply_filters( "ep_pre_index_{$this->slug}", $document ); -
/** * Fires right before entries are about to be indexed in a dashboard sync */ do_action( 'ep_pre_index_batch', $this->index_meta ); -
/** * Short-circuits the process of checking if a post should be indexed or not * depending on its password. */ apply_filters( 'ep_pre_kill_sync_for_password_protected', null, $skip, $object_id ); -
/** * Filter Elasticsearch args prior to remote request */ apply_filters( 'ep_pre_request_args', $args, $path, $query_args, $type ); -
/** * Filter Elasticsearch host prior to remote request */ apply_filters( 'ep_pre_request_host', $query['host'], $failures, $path, $args ); -
/** * Filter Elasticsearch url prior to remote request */ apply_filters( 'ep_pre_request_url', esc_url( trailingslashit( $query['host'] ) . $path ), $failures, $query['host'], $path, $args ); -
/** * Fires right before entries are about to be indexed. */ do_action( 'ep_pre_sync_index', $this->index_meta, ( $this->index_meta['start'] ? 'start' : false ), $indexable ); -
/** * Filter force allow a meta key */ apply_filters( 'ep_prepare_comment_meta_allowed_key', false, $key, $comment_id ); -
/** * Filter index-able private meta */ apply_filters( 'ep_prepare_comment_meta_allowed_protected_keys', [], $comment_id ); -
/** * Filter non-indexed public meta */ apply_filters( 'ep_prepare_comment_meta_excluded_public_keys', [], $comment_id ); -
/** * Filter force whitelisting a meta key */ apply_filters( 'ep_prepare_meta_whitelist_key', false, $key, $post ); -
/** * Filter index-able private meta */ apply_filters( 'ep_prepare_term_meta_allowed_protected_keys', [], $term_id ); -
/** * Filter non-indexed public meta */ apply_filters( 'ep_prepare_term_meta_excluded_public_keys', [ 'session_tokens', ], $term_id ); -
/** * Filter kill switch for any term meta */ apply_filters( 'ep_prepare_term_meta_whitelist_key', false, $key, $term_id ); -
/** * Filter the query logger object */ apply_filters( 'ep_query_logger', new \ElasticPress\QueryLogger() ); -
/** * Filter the array with a map from query types to callables. If the callable * returns true, the query will be logged. */ apply_filters( 'ep_query_logger_allowed_log_types', array( 'put_mapping' => array( $this, 'is_query_error' ), 'delete_network_alias' => array( $this, 'is_query_error' ), 'create_network_alias' => array( $this, 'is_query_error' ), 'bulk_index' => array( $this, 'is_bulk_index_error' ), 'delete_index' => array( $this, 'maybe_log_delete_index' ), 'create_pipeline' => array( $this, 'is_query_error' ), 'get_pipeline' => array( $this, 'is_query_error' ... ); -
/** * Perform actions after clearing the logs */ do_action( 'ep_query_logger_cleared_logs' ); -
/** * Filter the formatted query log */ apply_filters( 'ep_query_logger_formatted_query', $formatted_log, $query, $type ); -
/** * Perform actions after a new query is logged */ do_action( 'ep_query_logger_logged_query', $logs_json_str, $query, $type ); -
/** * Filter the logs */ apply_filters( 'ep_query_logger_logs', $logs ); -
/** * Filter the max cache size. Defaults to MB_IN_BYTES */ apply_filters( 'ep_query_logger_max_cache_size', MB_IN_BYTES ); -
/** * Filter the number of queries to keep in the log */ apply_filters( 'ep_query_logger_queries_to_keep', 5, $query, $type ); -
/** * Filter the formatted query log */ apply_filters( 'ep_query_logger_should_log_query', $should_log, $query, $type ); -
/** * Filter the period to keep queried logs. Defaults to DAY_IN_SECONDS */ apply_filters( 'ep_query_logger_time_to_keep', DAY_IN_SECONDS ); -
/** * Filter post type query variables before WP Query */ apply_filters( 'ep_query_post_type', $query_vars['post_type'] ?? '', $query ); -
/** * Filter Elasticsearch query request arguments */ apply_filters( 'ep_query_request_args', $request_args, $path, $index, $type, $query, $query_args, $query_object ); -
/** * Filter Elasticsearch query request path */ apply_filters( 'ep_query_request_path', $path, $index, $type, $query, $query_args, $query_object ); -
/** * Filter whether to send the EP-Search-Term header or not. */ apply_filters( 'ep_query_send_ep_search_term_header', ( Utils\is_epio() && ! empty( $query_args['s'] ) && Utils\is_integrated_request( 'search' ) && ! isset( $_GET['post_type'] ) ), $query_args ); -
/** * Filter fields and their weitghting as used in the Elasticsearch query. */ apply_filters( 'ep_query_weighting_fields', "{$field}^{$weight}", $field, $weight, $fieldset, $weights ); -
/** * Reindex if we cross a reindex version in the upgrade */ apply_filters( 'ep_reindex_versions', array( '2.2', '2.3.1', '2.4', '2.5.1', '2.6', '2.7', '3.0', '3.1', '3.3', '3.4', '3.6.0', '3.6.1', '4.0.0-beta.1', '4.0.0', ) ); -
/** * Filter the User Agent header when submitting requests to Elasticsearch. */ apply_filters( 'ep_remote_request_add_ep_user_agent', Utils\is_epio() ); -
/** * Filter whether Elasticsearch remote request response code is valid */ apply_filters( 'ep_remote_request_is_valid_res', $is_valid_res, $request ); -
/** * Filter the ID generated to identify a request. */ apply_filters( 'ep_request_id', get_request_id_base() . $uuid ); -
/** * Filter the base of requests IDs. Uses the return of `get_index_prefix()` by * default. */ apply_filters( 'ep_request_id_base', str_replace( '-', '', get_index_prefix() ) ); -
/** * Deprecated way to retrieve aggregations. */ do_action( 'ep_retrieve_aggregations', $response['aggregations'], $query, '', $query_args ); -
/** * Fires after valid Elasticsearch query */ do_action( 'ep_retrieve_raw_response', $request, $query, $query_args, $query_object ); -
/** * Filter Elasticsearch retrieved document */ apply_filters( "ep_retrieve_the_{$type}", $document, $hit, $index ); -
/** * Fires right after the weighting configuration is saved. */ do_action( 'ep_saved_weighting_configuration' ); -
/** * Filter the algorithm version to be used. */ apply_filters( 'ep_search_algorithm_version', $search_algorithm_version_option ); -
/** * Filter default post search fields */ apply_filters( 'ep_search_fields', $search_fields, $args ); -
/** * Filter post object properties set after query */ apply_filters( 'ep_search_post_return_args', array( 'post_type', 'post_author', 'post_name', 'post_status', 'post_title', 'post_parent', 'post_content', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', 'post_mime_type', 'comment_count', 'comment_status', 'ping_status', 'menu_order', 'permalink', 'terms', 'post_meta', 'meta', ) ); -
/** * Filter Elasticsearch query request path */ apply_filters( 'ep_search_request_path', $path, $index, $type, $query, $query_args, $query_object ); -
/** * Filter post query scope */ apply_filters( 'ep_search_scope', $scope ); -
/** * Filter the search analyzer use for the did you mean feature. */ apply_filters( 'ep_search_suggestion_analyzer', $search_analyzer, $formatted_args, $args, $wp_query ); -
/** * The ID of the current user when generating the Instant Results search * template. */ apply_filters( 'ep_search_template_user_id', 0 ); -
/** * Filter searchable post types */ apply_filters( 'ep_searchable_post_types', $post_types ); -
/** * Filter server type */ apply_filters( 'ep_server_type', $info['server_type'] ); -
/** * Filter default post query order by */ apply_filters( 'ep_set_default_sort', 'date', $order ); -
/** * Filter the ES query order (`sort` clause) */ apply_filters( 'ep_set_sort', $default_sort, $order ); -
/** * Fires after settings table is displayed for inserting custom settings. */ do_action( 'ep_settings_custom' ); -
/** * Filter the field types the feature settings screen can render. */ apply_filters( 'ep_settings_field_types', $types ); -
/** * Fires before features are setup */ do_action( 'ep_setup_features' ); -
/** * Filter whether the feature should be setup. */ apply_filters( 'ep_should_setup_feature', $should_setup, $feature ); -
/** * Filter whether to show 'ElasticPress Indexing' option on Multisite in admin * UI or not. */ apply_filters( 'ep_show_indexing_option_on_multisite', defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ); -
/** * Filter to allow skipping this action in case of custom handling */ apply_filters( 'ep_skip_action_deleted_term_relationships', false, $post_id, $tt_ids, $taxonomy ); -
/** * Filter to allow skipping this action in case of custom handling */ apply_filters( 'ep_skip_action_edited_term', $should_skip, $term_id, $tt_id, $taxonomy, $object_ids ); -
/** * Filter to allow skipping this action in case of custom handling */ apply_filters( 'ep_skip_action_set_object_terms', false, $post_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ); -
/** * Filter whether we should delete index and send new mapping at the start of * the sync */ apply_filters( 'ep_skip_index_reset', false, $this->index_meta ); -
/** * Filter to allow skipping a sync triggered by meta changes */ apply_filters( 'ep_skip_post_meta_sync', false, $post, $meta_id, $meta_key, $meta_value ); -
/** * Filter the reports executed in the Status Report page. */ apply_filters( 'ep_status_report_reports', $reports ); -
/** * Fires after reducing the memory footprint */ do_action( 'ep_stop_the_insanity' ); -
/** * Filter the did you mean suggested HTML. */ apply_filters( 'ep_suggestion_html', $html, $terms, $query ); -
/** * Filter the score for a suggestion. If the score is lower than this, it will * be removed. */ apply_filters( 'ep_suggestion_minimum_score', 0.0001 ); -
/** * Filter the HTML output for the original search term. */ apply_filters( 'ep_suggestion_original_search_term_html', $html, $query->query_vars['s'], $original_term, $query ); -
/** * Filter the sync arguments */ apply_filters( 'ep_sync_args', $args, $this->index_meta ); -
/** * Fire before comment is queued for syncing */ do_action( 'ep_sync_comment_on_transition', $comment_id ); -
/** * Filter whether to skip the permissions check on deleting a post */ apply_filters( 'ep_sync_delete_permissions_bypass', false, $post_id ); -
/** * Filters arguments used to query for content for each indexable */ apply_filters( 'ep_sync_index_args', $args ); -
/** * Filter whether to bypass sync. */ apply_filters( 'ep_sync_indexable_kill', $is_importing, $this->indexable_slug ); -
/** * Filter the number of errors of a sync that should be stored. */ apply_filters( 'ep_sync_number_of_errors_stored', 50 ); -
/** * Fires after one by one indexing an object */ do_action( 'ep_sync_object_index', $object_id, $indexable, $return ); -
/** * Fire before post is queued for syncing */ do_action( 'ep_sync_on_deleted_term_relationships', $post_id, $tt_ids, $taxonomy ); -
/** * Fire before post is queued for syncing */ do_action( 'ep_sync_on_edited_term', $post_id, $term_id, $tt_id, $taxonomy ); -
/** * Fires when object in queue are synced */ do_action( 'ep_sync_on_meta_update', $object_id ); -
/** * Fire before post is queued for syncing */ do_action( 'ep_sync_on_set_object_terms', $post_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ); -
/** * Fire before post is queued for syncing */ do_action( 'ep_sync_on_transition', $post_id ); -
/** * Fires after sync put mapping is completed */ do_action( 'ep_sync_put_mapping', $this->index_meta, $indexable, $result ); -
/** * Fires at start of new index */ do_action( 'ep_sync_start_index', $this->index_meta ); -
/** * Filter taxonomies to be synced with post */ apply_filters( 'ep_sync_taxonomies', $selected_taxonomies, $post ); -
/** * Filter to allow child terms to be indexed */ apply_filters( 'ep_sync_terms_allow_hierarchy', true ); -
/** * Filter the number of past syncs to keep info */ apply_filters( 'ep_syncs_to_keep_info', 5 ); -
/** * Filter array of synonyms to add to a custom synonym filter. */ apply_filters( 'ep_synonyms', $synonyms ); -
/** * Filter the indices that use the synonym filter. */ apply_filters( 'ep_synonyms_affected_indices', $this->affected_indices ); -
/** * Filter the default synonyms editor mode. */ apply_filters( 'ep_synonyms_editor_mode', $mode ); -
/** * Filter the synonym filter set in elasticsearch. */ apply_filters( 'ep_synonyms_filter', [ 'type' => 'synonym_graph', 'lenient' => true, 'synonyms' => $this->get_synonyms(), ] ); -
/** * Filter name of the synonym filter set in elasticsearch. */ apply_filters( 'ep_synonyms_filter_name', $this->filter_name ); -
/** * Filter database arguments for term count query */ apply_filters( 'ep_term_all_query_db_args', $all_query_args, $args ); -
/** * Filter full Elasticsearch query for Terms indexable */ apply_filters( 'ep_term_formatted_args', $formatted_args, $query_vars ); -
/** * Filter full Elasticsearch query for Terms indexable */ apply_filters( 'ep_term_mapping', $mapping ); -
/** * Filter mapping file for Terms indexable */ apply_filters( 'ep_term_mapping_file', __DIR__ . '/../../../mappings/term/' . $mapping_file ); -
/** * Filter Elasticsearch term maximum shingle difference */ apply_filters( 'ep_term_max_shingle_diff', 8 ); -
/** * Filter the number of object IDs fetched per query when getting a term's * object IDs */ apply_filters( 'ep_term_object_ids_chunk_size', 10000, $term_ids[0], $taxonomy ); -
/** * Filter database arguments for term query */ apply_filters( 'ep_term_query_db_args', wp_parse_args( $args, $defaults ) ); -
/** * Filter fields to search on Term query */ apply_filters( 'ep_term_search_fields', $prepared_search_fields, $query_vars ); -
/** * Filter search scope */ apply_filters( 'ep_term_search_scope', $scope ); -
/** * Filter post statuses available to autosuggest */ apply_filters( 'ep_term_suggest_post_status', array_values( $post_status ) ); -
/** * Filter post types available to autosuggest */ apply_filters( 'ep_term_suggest_post_type', array_values( $post_type ) ); -
/** * Filter term fields pre-sync */ apply_filters( 'ep_term_sync_args', $term_args, $term_id ); -
/** * Filters the capability required to use the token API. */ apply_filters( 'ep_token_capability', 'edit_others_shop_orders' ); -
/** * Filters the temporary token API endpoint. */ apply_filters( 'ep_token_endpoint', 'api/v1/token' ); -
/** * Fires after updating an index settings */ do_action( 'ep_update_index_settings', $index, $settings ); -
/** * Fires after valid Elasticsearch query */ do_action( 'ep_valid_response', $response, $query, $query_args, $query_object ); -
/** * Filter weighting query for a post type */ apply_filters( 'ep_weighted_query_for_post_type', [ 'bool' => [ 'must' => [ $current_query, ], 'filter' => [ [ 'match' => [ 'post_type.raw' => $post_type, ], ], ], ], ], $post_type, $args ); -
/** * Hook after weighting is added to Elasticsearch query */ do_action( 'ep_weighting_added', $formatted_args, $args ); -
/** * Filter weighting configuration */ apply_filters( 'ep_weighting_configuration', get_option( 'elasticpress_weighting', [] ) ); -
/** * Filter autosuggest weighting configuration */ apply_filters( 'ep_weighting_configuration_for_autosuggest', $config ); -
/** * Filter install status */ apply_filters( 'ep_weighting_default_enabled_taxonomies', [ 'post_tag', 'category' ], $post_type ); -
/** * Filter weighting defaults for post type */ apply_filters( 'ep_weighting_default_post_type_weights', $post_type_defaults, $post_type ); -
/** * Filter weighting fields for a post type */ apply_filters( 'ep_weighting_fields_for_post_type', $fields, $post_type ); -
/** * Filter fields considered in weighting */ apply_filters( 'ep_weighting_ignore_fields_in_consideration', [ 'terms.ep_custom_result.name' => true ] ); -
/** * Filter weighting dashboard options. */ apply_filters( 'ep_weighting_options', [ 'apiUrl' => $api_url, 'metaMode' => $meta_mode, 'weightableFields' => $weightable_fields, 'weightingConfiguration' => $weighting_configuration, ] ); -
/** * Filter comment search widget HTML */ apply_filters( 'ep_widget_search_comments', $search_comments_html, $instance['title'] ); -
/** * Filter the fields used in WooCommerce Admin Product Search. */ apply_filters( 'ep_woocommerce_admin_products_list_search_fields', [ 'post_title', 'post_content', 'post_excerpt', 'meta' => [ '_sku', '_variations_skus', ], ] ); -
/** * Filter admin searchable WooCommerce post types */ apply_filters( 'ep_woocommerce_admin_searchable_post_types', $searchable_post_types ); -
/** * Determines actions to be applied, or removed, if doing a WooCommerce serarch */ do_action( 'ep_woocommerce_hook_search_fields' ); -
/** * Filter to skip integration with WooCommerce Admin Product List. */ apply_filters( 'ep_woocommerce_integrate_admin_products_list', true, $query_vars ); -
/** * Filters the WooCommerce Orders search endpoint. */ apply_filters( 'ep_woocommerce_order_search_endpoint', "api/v1/search/orders/{$this->index}", $this->index ); -
/** * Filters the WooCommerce Orders search template API endpoint. */ apply_filters( 'ep_woocommerce_order_search_template_endpoint', "api/v1/search/orders/{$this->index}/template", $this->index ); -
/** * Whether the autosuggest feature is available for non ElasticPress.io * customers. */ apply_filters( 'ep_woocommerce_orders_autosuggest_available', Utils\is_epio() && $this->is_hpos_compatible() ); -
/** * Expands or contracts the post_types related to orders eligible for indexing. */ apply_filters( 'ep_woocommerce_orders_supported_post_types', $supported_post_types ); -
/** * Expands or contracts the post_types related to products eligible for * indexing. */ apply_filters( 'ep_woocommerce_products_supported_post_types', $supported_post_types, $query ); -
/** * Filter supported custom taxonomies for WooCommerce product queries * integration */ apply_filters( 'ep_woocommerce_products_supported_taxonomies', $supported_taxonomies ); -
/** * Filters the WooCommerce Settings schema. */ apply_filters( 'ep_woocommerce_settings_schema', $this->settings_schema ); -
/** * Filter all the shop order fields to search for WooCommerce */ apply_filters( 'ep_woocommerce_shop_order_search_fields', $search_fields, $query ); -
/** * DEPRECATED. Filter supported custom taxonomies for WooCommerce integration. */ apply_filters_deprecated( 'ep_woocommerce_supported_taxonomies', [ $supported_taxonomies ], '4.7.0', 'ep_woocommerce_products_supported_taxonomies' ); -
/** * Fires after executing a CLI index */ do_action( 'ep_wp_cli_after_index', $args, $assoc_args ); -
/** * Fires before starting a CLI index */ do_action( 'ep_wp_cli_pre_index', $args, $assoc_args ); -
/** * Fires before returning posts from query */ do_action( 'ep_wp_query', $new_posts, $ep_query, $query ); -
/** * Filter cached comments pre-post query */ apply_filters( 'ep_wp_query_cached_comments', null, $query ); -
/** * Filter cached posts pre-post query */ apply_filters( 'ep_wp_query_cached_posts', [], $query ); -
/** * Fires after non cached post query */ do_action( 'ep_wp_query_non_cached_search', $new_posts, $ep_query, $query ); -
/** * Fires before returning posts from query */ do_action( 'ep_wp_query_search', $new_posts, $ep_query, $query ); -
/** * Filter search date weighting boost mode */ apply_filters( 'epwr_boost_mode', 'multiply', $formatted_args, $args ); -
/** * Filter search date weighting decay */ apply_filters( 'epwr_decay', 0.25, $formatted_args, $args ); -
/** * Filter search date weighting field */ apply_filters( 'epwr_decay_field', 'post_date_gmt', $formatted_args, $args ); -
/** * Filter search date weighting scale */ apply_filters( 'epwr_decay_function', 'exp', $formatted_args, $args ); -
/** * Filter search date weighting offset */ apply_filters( 'epwr_offset', '7d', $formatted_args, $args ); -
/** * Filter search date weighting scale */ apply_filters( 'epwr_scale', '14d', $formatted_args, $args ); -
/** * Filter search date weighting score mode */ apply_filters( 'epwr_score_mode', 'sum', $formatted_args, $args ); -
/** * Filter search date weight */ apply_filters( 'epwr_weight', 0.001, $formatted_args, $args ); -
/** * Filter WooCommerce to Elasticsearch meta mapping */ apply_filters( 'orderby_meta_mapping', array( 'ID' => 'ID', 'title' => 'title date', 'menu_order' => 'menu_order title date', 'menu_order title' => 'menu_order title date', 'total_sales' => 'meta.total_sales.double date', '_wc_average_rating' => 'meta._wc_average_rating.double date', '_price' => 'meta._price.double date', '_sku' => 'meta._sku.value.sortable date', 'date' => 'date', ) ); -
/** * Allow other code to intercept the sync process */ apply_filters( 'pre_ep_index_sync_queue', false, $this, $this->indexable_slug ); -
/** * Filter shop order meta fields to search for WooCommerce */ apply_filters( 'shop_order_search_fields', array( '_order_key', '_billing_company', '_billing_address_1', '_billing_address_2', '_billing_city', '_billing_postcode', '_billing_country', '_billing_state', '_billing_email', '_billing_phone', '_shipping_address_1', '_shipping_address_2', '_shipping_city', '_shipping_postcode', '_shipping_country', '_shipping_state', '_billing_last_name', '_billing_first_name', '_shipping_first_name', '_shi... ); -
apply_filters( 'widget_title', $instance['title'] ); -
do_action( 'ep_sync_term_on_transition', $term_id ); -
apply_filters( 'ep_term_sync_kill', false, $term_id ); -
apply_filters( "ep_index_{$type}_request_path", $index . '/' . $type . '/' . $document['ID'], $document, $type ); -
apply_filters( 'the_content', $post->post_content ); -
apply_filters( 'ep_bulk_index_request_path', $index . '/' . $type . '/_bulk', $body, $type ); -
apply_filters( 'ep_facet_taxonomies_size', 10000, $taxonomy ); -
apply_filters( 'ep_index_document_timeout', 15 ); -
apply_filters( 'ep_skip_term_query_integration', false, $query ); -
apply_filters( 'ep_term_max_result_window', 1000000 ); -
apply_filters( 'ep_term_total_field_limit', 5000 ); -
apply_filters( 'bulk_request_timeout', $default_bulk_request_timeout ); -
apply_filters( 'ep_bulk_index_timeout', 30 ); -
do_action( 'ep_epio_wp_cli_set_autosuggest', $args, $assoc_args ); -
apply_filters( 'ep_index_request_path', $path, $document, $type ); -
apply_filters( 'ep_instant_results_available', false ); -
apply_filters( 'ep_post_mapping_version', $mapping_file ); -
apply_filters( 'ep_sanitize_feature_settings', $new_settings, $feature ); -
apply_filters( 'ep_search_term_return_args', array( 'term_id', 'name', 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description', 'parent', 'count', 'meta', ) ); -
apply_filters( 'ep_wp_query_cached_terms', null, $query ); -
apply_filters( 'excerpt_length', 55 ); -
apply_filters( 'excerpt_more', $text ); -
apply_filters( 'http_request_timeout', $default_request_timeout, Utils\get_host() ); -
apply_filters( 'woocommerce_price_filter_widget_tax_class', '' );
Generated from ElasticPress's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: