Better Search 4.5.4 has 36 actions and 167 filters, read directly from its source code on Nov 18, 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 Better Search fires an action
add_action( 'bsearch_activate', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Better Search is about to use
add_filter( 'better_search_query_cache_time', function( $cache_time, $query_args, $query, $arg4, $arg5 ) {
// Change $cache_time here.
return $cache_time;
}, 10, 5 );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.
Changes by version
4.5.4 → 4.6.0 · Nov 18, 2026 · 8 added, 1 removed
Added
- filter
bsearch_dashboard_no_result_count - filter
bsearch_dashboard_no_result_details - action
bsearch_delete_search_entry - action
bsearch_db_create_tables - action
bsearch_no_result_search - action
bsearch_no_results_cleared - filter
bsearch_tracker_rate_limit_per_minute - filter
bsearch_bot_user_agents
Removed
- filter
bsearch_query_vars
All hooks
-
/** * After Settings Output filter */ apply_filters( "{$this->prefix}_after_setting_output", $html, $args ); -
/** * This filter is documented in includes/class-better-search-core-query.php */ apply_filters_ref_array( 'better_search_query_cache_time', array( $cache_time, $this->query_args, $query, &$this, 'ts' ) ); -
/** * Skip settings that are not really settings. */ apply_filters( "{$this->prefix}_non_setting_types", array( 'header', 'descriptive_text' ) ); -
/** * Filter to modify the help sidebar content. */ apply_filters( "{self::$prefix}_settings_help", $help_sidebar ); -
/** * This filter is documented in includes/class-better-search-core-query.php */ apply_filters( 'better_search_query_exclusion_prefix', '-' ); -
/** * Filters the ORDER BY clause of the Better_Search. */ apply_filters_ref_array( 'better_search_query_posts_orderby', array( $orderby, $query, &$this ) ); -
/** * Filters the posts_orderby clauses of Better_Search before combining. */ apply_filters_ref_array( 'better_search_query_posts_orderby_clauses', array( $orderby_clauses, $query, &$this ) ); -
/** * Filters the CSS class applied to each highlighted term wrapper. */ apply_filters( 'bsearch_highlight_class', 'bsearch_highlight' ); -
/** * Filters the maximum number of search terms passed to the JS highlighter. */ apply_filters( 'bsearch_highlight_max_terms', 50 ); -
/** * Filters the HTML tag used to wrap highlighted search terms. */ apply_filters( 'bsearch_highlight_tag', 'mark' ); -
/** * Filters whether search term highlighting matches whole words only. */ apply_filters( 'bsearch_highlight_use_boundaries', false ); -
/** * Filters the default settings array. */ apply_filters( 'bsearch_settings_defaults', $options ); -
/** * Filter the arguments that are passed to Better_Search_Query. Documented in * includes/frontend/templates/better-search-template.php */ apply_filters( 'bsearch_template_query_args', $args ); -
/** * This filter is documented in includes/heatmap.php */ apply_filters( 'get_bsearch_heatmap_counts', $cached, $args ); -
/** * This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ apply_filters( 'widget_title', $title, $instance, $this->id_base ); -
/** * Filters the settings array. */ apply_filters( "{$this->prefix}_get_settings_types", $options ); -
/** * Action triggered when displaying the meta box. */ do_action( "{$this->prefix}_meta_box", $post ); -
/** * Filter the post meta array which contains post-specific settings. */ apply_filters( "{$this->prefix}_meta_key", $post_meta, $post_id ); -
/** * Skip settings that are not really settings. */ apply_filters( "{$this->prefix}_metabox_non_setting_types", array( 'header', 'descriptive_text' ) ); -
/** * Filter allowed tags allowed when sanitizing text and textarea fields. */ apply_filters( "{$this->prefix}_sanitize_allowed_tags", $allowedtags ); -
/** * After Settings Output filter */ apply_filters( "{$this->prefix}_setting_field_description", $desc, $args ); -
/** * Filter the settings for the tab. e.g. prefix_settings_general_sanitize. */ apply_filters( "{$this->prefix}_settings_{$tab}_sanitize", $input ); -
/** * Filters the default settings array. */ apply_filters( "{$this->prefix}_settings_defaults", $options ); -
/** * Filters the allowed HTML tags and attributes for settings form output. */ apply_filters( "{$this->prefix}_settings_form_allowed_html", $allowed ); -
/** * Action to add more buttons in each tab. */ do_action( "{$this->prefix}_settings_form_buttons", $tab_id, $tab_name, $this->settings_sections ); -
/** * Filter the settings array before it is returned. */ apply_filters( "{$this->prefix}_settings_sanitize", $output, $input ); -
/** * Fires before the wizard actions are rendered. */ do_action( "{$this->prefix}_wizard_before_actions", $this->current_step, $this->total_steps ); -
/** * Action fired when the wizard is completed. */ do_action( "{$this->prefix}_wizard_completed", $this->prefix ); -
/** * Fires after the wizard completion page content. */ do_action( "{$this->prefix}_wizard_completion_after" ); -
/** * Fires before the wizard completion page content. */ do_action( "{$this->prefix}_wizard_completion_before" ); -
/** * Filter the completion page buttons. */ apply_filters( "{$this->prefix}_wizard_completion_buttons", $buttons, $this->prefix ); -
/** * Fires after the wizard completion message. */ do_action( "{$this->prefix}_wizard_completion_message" ); -
/** * Filter the URL to redirect to after wizard completion. */ apply_filters( "{$this->prefix}_wizard_completion_url", admin_url( "admin.php?page={$this->prefix}_settings" ), $this->prefix ); -
/** * Action fired after processing a wizard step. */ do_action( "{$this->prefix}_wizard_step_processed", $this->current_step, $settings ); -
/** * Filter the version number used for cache busting. */ apply_filters( "{$this->prefix}_wizard_version", self::VERSION, $this->prefix ); -
/** * Filters the FIFU meta key used to store external image URLs. */ apply_filters( "{self::$prefix}_fifu_meta_key", 'fifu_image_url' ); -
/** * Filters array of image sizes. */ apply_filters( "{self::$prefix}_get_all_image_sizes", $sizes ); -
/** * Filters bad words array. */ apply_filters( "{self::$prefix}_get_badwords", $badwords ); -
/** * Filter the cached attachment ID from the attachment URL. */ apply_filters( "{self::$prefix}_get_cached_attachment_id", $attachment_id, $attachment_url ); -
/** * Filter the first child image URL. */ apply_filters( "{self::$prefix}_get_first_image", $image_attributes[0], $postid, $thumb_width, $thumb_height ); -
/** * Filters the list of attachment image attributes. */ apply_filters( "{self::$prefix}_get_image_attributes", $attr, $attachment_url ); -
/** * Filters the img tag. */ apply_filters( "{self::$prefix}_get_image_html", $html, $attachment_url, $attr ); -
/** * Filters post thumbnail HTML. */ apply_filters( "{self::$prefix}_get_the_post_thumbnail", $output, $args, $postimage ); -
/** * Filter array of thumbnail size. */ apply_filters( "{self::$prefix}_get_thumb_size", $thumb_size ); -
/** * Filters the settings array */ apply_filters( "{self::$prefix}_registered_settings", $settings ); -
/** * Filters the Counter settings array */ apply_filters( "{self::$prefix}_settings_counter", $settings ); -
/** * Filters the Features settings array */ apply_filters( "{self::$prefix}_settings_features", $settings ); -
/** * Filters the General settings array */ apply_filters( "{self::$prefix}_settings_general", $settings ); -
/** * Filters the List settings array */ apply_filters( "{self::$prefix}_settings_list", $settings ); -
/** * Filters the Output settings array */ apply_filters( "{self::$prefix}_settings_output", $settings ); -
/** * Filters the Performance settings array */ apply_filters( "{self::$prefix}_settings_performance", $settings ); -
/** * Filters the Redirects settings array */ apply_filters( "{self::$prefix}_settings_redirects", $settings ); -
/** * Filter the array containing the settings' sections. */ apply_filters( "{self::$prefix}_settings_sections", $settings_sections ); -
/** * Filters the thumbnail alt. */ apply_filters( "{self::$prefix}_thumb_alt", $alt ); -
/** * Flag to use the post title as the thumbnail alt text if no alt text is * found. */ apply_filters( "{self::$prefix}_thumb_alt_fallback_post_title", true ); -
/** * Filters the thumbnail classes and allows a filter function to add any more * classes if needed. */ apply_filters( "{self::$prefix}_thumb_class", $class ); -
/** * Filters the thumbnail HTML and allows a filter function to add any more HTML * if needed. */ apply_filters( "{self::$prefix}_thumb_html", $thumb_html, $args ); -
/** * Filters the post content that is used to scan for images. */ apply_filters( "{self::$prefix}_thumb_post_content", $post->post_content, $post ); -
/** * Filters the thumbnail styles attribute. */ apply_filters( "{self::$prefix}_thumb_styles", $args['style'] ); -
/** * Filters the thumbnail title. */ apply_filters( "{self::$prefix}_thumb_title", $post_title ); -
/** * Filters the thumbnail image URL. */ apply_filters( "{self::$prefix}_thumb_url", $postimage, $args, $result ); -
/** * Flag to use the image's alt text as the thumbnail alt text. */ apply_filters( "{self::$prefix}_thumb_use_image_alt", true ); -
/** * Filters the default decoding attribute applied to Contextual Related Posts * thumbnails. */ apply_filters( "{self::$prefix}_thumbnail_decoding_attribute", 'async', $attr ); -
/** * Filters the default loading attribute applied to Contextual Related Posts * thumbnails. */ apply_filters( "{self::$prefix}_thumbnail_loading_attribute", 'lazy', $attr ); -
/** * Filter the array containing the settings' sections. */ apply_filters( "{self::$prefix}_translation_strings", $strings ); -
/** * Filters the arguments of the query. */ apply_filters_ref_array( 'better_search_query_args', array( $args, &$this ) ); -
/** * Applies filters to the query arguments before executing the query. */ apply_filters( 'better_search_query_args_before', $args, get_queried_object() ); -
/** * Filter the date_query passed to WP_Query. */ apply_filters( 'better_search_query_date_query', $date_query, $args ); -
/** * Filter the source post before getting the match SQL. */ apply_filters_ref_array( 'better_search_query_get_match_sql', array( '', $search_query, $args, &$this ) ); -
/** * Filters whether result ordering carries a recency boost. */ apply_filters( 'better_search_query_has_recency_boost', false, $this->query_args, $this ); -
/** * Filters the column references used in LIKE search clauses. */ apply_filters_ref_array( 'better_search_query_like_columns', array( array( 'title' => "{$wpdb->posts}.post_title", 'content' => "{$wpdb->posts}.post_content", 'excerpt' => "{$wpdb->posts}.post_excerpt", ), &$this, ) ); -
/** * Filter the meta_query passed to WP_Query. */ apply_filters( 'better_search_query_meta_query', $meta_query, $args ); -
/** * Filter the meta_query relation parameter. */ apply_filters( 'better_search_query_meta_query_relation', 'AND', $args ); -
/** * Filter the post_types passed to the query. */ apply_filters( 'better_search_query_post_types', $post_types, $args ); -
/** * Filters the posts_clauses of Better_Search after processing and before * returning. */ apply_filters_ref_array( 'better_search_query_posts_clauses', array( $clauses, $query, &$this ) ); -
/** * Filters the DISTINCT clause of the Better_Search. */ apply_filters_ref_array( 'better_search_query_posts_distinct', array( $distinct, $query, &$this ) ); -
/** * Filter the SELECT clause of the query. */ apply_filters_ref_array( 'better_search_query_posts_fields', array( $fields, $query, &$this ) ); -
/** * Filters the GROUP BY clause of the Better_Search. */ apply_filters_ref_array( 'better_search_query_posts_groupby', array( $groupby, $query, &$this ) ); -
/** * Filters the JOIN clause of Better_Search. */ apply_filters_ref_array( 'better_search_query_posts_join', array( $join, $query, &$this ) ); -
/** * Filters the posts_pre_query of Better_Search after processing and before * returning. */ apply_filters_ref_array( 'better_search_query_posts_pre_query', array( $posts, $query, &$this ) ); -
/** * Filters the posts_request of Better_Search after processing and before * returning. */ apply_filters_ref_array( 'better_search_query_posts_request', array( $request, $query, &$this ) ); -
/** * Filters the Search part of the WHERE clause of the Better_Search. */ apply_filters_ref_array( 'better_search_query_posts_search', array( $where, $query, &$this ) ); -
/** * Filters the search clauses of Better_Search. This can be used to add custom * search clauses. */ apply_filters_ref_array( 'better_search_query_posts_search_clauses', array( $clause, $term, $like_op, $andor_op, $query, &$this ) ); -
/** * Filter the MATCH clause of the WHERE clause of the query. */ apply_filters_ref_array( 'better_search_query_posts_where_match', array( $match_clause, $where, $query, &$this ) ); -
/** * Filters the maximum lifetime of a cached Better Search result set. */ apply_filters( 'better_search_query_result_cache_cap', 0, $this->query_args, $this ); -
/** * Filter the tax_query passed to the query. */ apply_filters( 'better_search_query_tax_query', $tax_query, $args ); -
/** * Filter the tax_query relation parameter. */ apply_filters( 'better_search_query_tax_query_relation', 'AND', $args ); -
/** * Filter array of WP_Post objects before it is returned to the Better_Search * instance. */ apply_filters_ref_array( 'better_search_query_the_posts', array( $posts, $query, &$this ) ); -
/** * Filters the number of search terms above which a zero-result search is * reported as too long. */ apply_filters( 'bsearch_abilities_max_search_terms', 4 ); -
/** * Filters the number of words above which a zero-result search is reported as * too long. */ apply_filters( 'bsearch_abilities_max_search_words', 9 ); -
/** * Fires after the plugin has been activated. */ do_action( 'bsearch_activate' ); -
/** * Filter the dashboard tabs. */ apply_filters( 'bsearch_admin_dashboard_tabs', $tabs ); -
/** * Action hook to add additional content to the Better Search tools page. */ do_action( 'bsearch_admin_tools_page_content' ); -
/** * Fires after each search result article in the results loop. */ do_action( 'bsearch_after_article' ); -
/** * Fires inside each search result article, after the entry footer. */ do_action( 'bsearch_after_article_inner' ); -
/** * Fires after the Better Search results page content, before the theme footer. */ do_action( 'bsearch_after_content' ); -
/** * Fires after the entry header of each search result, before the excerpt. */ do_action( 'bsearch_after_entry_header' ); -
/** * Fires inside the entry header of each search result, after the post meta * list. */ do_action( 'bsearch_after_entry_header_inner' ); -
/** * Fires after the search results page title. */ do_action( 'bsearch_after_page_title' ); -
/** * Fires after the last item in the post meta list of each search result. */ do_action( 'bsearch_after_post_meta' ); -
/** * Filter the label used for the "any" post type option in the Better Search * form. */ apply_filters( 'bsearch_any_post_type_label', $any_post_type_label, $args ); -
/** * Fires before each search result article in the results loop. */ do_action( 'bsearch_before_article' ); -
/** * Fires before the Better Search results page content, immediately after the * theme header. */ do_action( 'bsearch_before_content' ); -
/** * Fires before the entry header of each search result, after the post * thumbnail. */ do_action( 'bsearch_before_entry_header' ); -
/** * Fires inside the entry header of each search result, before the result * title. */ do_action( 'bsearch_before_entry_header_inner' ); -
/** * Fires before the search results page title. */ do_action( 'bsearch_before_page_title' ); -
/** * Fires before the first item in the post meta list of each search result. */ do_action( 'bsearch_before_post_meta' ); -
/** * Filters a blog option value. */ apply_filters( "bsearch_blog_option_{$key}", $value, $blog_id, $key ); -
/** * Filters the list of Better Search cache keys found in the options table. */ apply_filters( 'bsearch_cache_get_keys', $keys, $network ); -
/** * Filters the language component added to Better Search cache keys. */ apply_filters( 'bsearch_cache_language', $language ); -
/** * Allow the censored character to be replaced. */ apply_filters( 'bsearch_censor_char', $censor_char, $val ); -
/** * Clean search string from XSS exploits. */ apply_filters( 'bsearch_clean_terms', $val ); -
/** * Fires after the plugin data for the current site has been deleted on * uninstall. */ do_action( 'bsearch_delete_data' ); -
/** * Filters the string in the "more" link displayed after a trimmed excerpt. */ apply_filters( 'bsearch_excerpt_more', ' […]' ); -
/** * Filters the post IDs excluded from search results. */ apply_filters( 'bsearch_exclude_post_ids', $exclude_post_ids, $args ); -
/** * Filter whether a feature is enabled. */ apply_filters( 'bsearch_feature_enabled', $enabled, $feature ); -
/** * Filter the map of toggleable features. */ apply_filters( 'bsearch_features', $features ); -
/** * Filters the array of arguments used when generating the Better Search form. */ apply_filters( 'bsearch_form_args', $args ); -
/** * Fires after the Freemius SDK has been initialized. */ do_action( 'bsearch_freemius_loaded' ); -
/** * Filter the index statuses report. */ apply_filters( 'bsearch_fulltext_index_statuses', $statuses ); -
/** * Filter the fulltext indexes. */ apply_filters( 'bsearch_fulltext_indexes', $indexes ); -
/** * Retrieve the from date for the query */ apply_filters( 'bsearch_get_from_date', $from_date, $time, $daily_range ); -
/** * Filter the value for the option being fetched. */ apply_filters( 'bsearch_get_option', $value, $key, $default_value ); -
/** * Key specific filter for the value of the option being fetched. */ apply_filters( "bsearch_get_option_{$key}", $value, $key, $default_value ); -
/** * Filters the primary category/term for the given post. */ apply_filters( 'bsearch_get_primary_term', $return, $post, $term ); -
/** * Settings array */ apply_filters( 'bsearch_get_settings', $stored ); -
/** * Filters the settings array. */ apply_filters( 'bsearch_get_settings_types', $options ); -
/** * Filters the number of limit links to display on the results page. */ apply_filters( 'bsearch_header_limit_steps', array( 10, 20, 50 ), $args ); -
/** * Show link for All results. */ apply_filters( 'bsearch_header_show_all', true ); -
/** * Filters how long heatmap counts are cached, in seconds. 0 disables caching. */ apply_filters( 'bsearch_heatmap_cache_time', 15 * MINUTE_IN_SECONDS, $args ); -
/** * Filter the value of the class tag of heatmap links. */ apply_filters( 'bsearch_heatmap_class', $class, $searchvar, $result ); -
/** * Fires after Better Search widget options. */ do_action( 'bsearch_heatmap_options_after', $instance ); -
/** * Filters Update widget options array. */ apply_filters( 'bsearch_heatmap_options_update', $instance ); -
/** * Filter the value of the style tag of heatmap links. */ apply_filters( 'bsearch_heatmap_style', $style, $searchvar, $result ); -
/** * Filter the value of the title tag of heatmap links. */ apply_filters( 'bsearch_heatmap_title', $title, $searchvar, $count, $result ); -
/** * Filters the CSS selector(s) used to scope JS highlighting. */ apply_filters( 'bsearch_highlight_js_selectors', '.entry-content, .entry-title, .entry-summary' ); -
/** * Filter the map of current index names to legacy index names. */ apply_filters( 'bsearch_legacy_index_aliases', $aliases ); -
/** * Filters how long a live search response is cached, in seconds. 0 disables * caching. */ apply_filters( 'bsearch_live_search_cache_time', 5 * MINUTE_IN_SECONDS, $search_query ); -
/** * Filter the number of posts to show in the live search. */ apply_filters( 'bsearch_live_search_posts_per_page', 5 ); -
/** * Fires inside the network admin settings page content area. */ do_action( 'bsearch_network_admin_settings_page_content' ); -
/** * Fires at the top of the network admin settings page, after the heading. */ do_action( 'bsearch_network_admin_settings_page_content_header' ); -
/** * Action hook to add additional content to the Better Search network tools * page. */ do_action( 'bsearch_network_admin_tools_page_content' ); -
/** * Filters the number formatted based on the locale. */ apply_filters( 'bsearch_number_format_i18n', $formatted, $number, $decimals ); -
/** * Filters Post object for current language. */ apply_filters( 'bsearch_object_id_cur_lang', $post ); -
/** * Filter the post thumbnail size in the search results. */ apply_filters( 'bsearch_post_thumbnail_size', 'thumbnail', $post ); -
/** * Filter the MATCH part of the FIELDS clause of the query. */ apply_filters_ref_array( 'bsearch_posts_match_field', array( $field_score, $search_query, $weight_title, $weight_content, $args, &$this ) ); -
/** * Function to add additional queries to query_vars. */ apply_filters( 'bsearch_query_vars', $vars ); -
/** * Filter search result score */ apply_filters( 'bsearch_score2percent', $output, $score, $topscore ); -
/** * Filters the meta keys searched when "Search meta fields" is enabled. */ apply_filters_ref_array( 'bsearch_search_meta_keys', array( array(), $query, &$this ) ); -
/** * Filters Update widget options array for the Search box. */ apply_filters( 'bsearch_search_widget_options_update', $instance ); -
/** * Fires after the Tools page help tabs have been registered. */ do_action( 'bsearch_settings_tools_help', $screen ); -
/** * Filters the wizard steps. */ apply_filters( 'bsearch_settings_wizard_steps', $steps, $all_settings, $all_settings_grouped ); -
/** * Filter whether the current request should have its search query tracked. */ apply_filters( 'bsearch_should_track', true ); -
/** * Fires when a SQL injection attempt is detected. */ do_action( 'bsearch_sql_injection_detected', $val, $pattern ); -
/** * Fires at the top of the network admin Tools page, after the heading. */ do_action( 'bsearch_tools_network_page_header' ); -
/** * Filter the localize script arguments for the Better Search tracker. */ apply_filters( 'bsearch_tracker_script_args', $ajax_bsearch_tracker ); -
/** * Filter the URL of the tracker. */ apply_filters( 'bsearch_tracker_url', $home_url ); -
/** * Filter the response on database update. */ apply_filters( 'bsearch_update_count', $str, $search_query ); -
/** * Filters the value before it is updated */ apply_filters( 'bsearch_update_option', $value, $key ); -
/** * Filter whether to use custom tables. */ apply_filters( 'bsearch_use_custom_table', $use_custom_table ); -
/** * Filter to modify if the original language ID is returned. */ apply_filters( 'bsearch_wpml_return_original', $return_original_if_missing, $post->ID ); -
/** * Filter the auto-correct notice markup. */ apply_filters( 'get_bsearch_autocorrect_notice', $output, $args ); -
/** * Filter formatted string with search result date */ apply_filters( 'get_bsearch_date', $output, $search, $before, $after, $format ); -
/** * Filter the "Did you mean" suggestion markup. */ apply_filters( 'get_bsearch_did_you_mean', $output, $args ); -
/** * Filter formatted string with search result exeerpt */ apply_filters( 'get_bsearch_excerpt', $output, $post, $excerpt_length, $use_excerpt, $content ); -
/** * Filters the HTML output of the search form. */ apply_filters( 'get_bsearch_form', $form, $search_query, $args ); -
/** * Filter the Better Search header HTML. */ apply_filters( 'get_bsearch_header', $output, $args ); -
/** * Filter formatted string with the search heatmap */ apply_filters( 'get_bsearch_heatmap', $output, $args ); -
/** * Filters the post type label for the current post. */ apply_filters( 'get_bsearch_post_type', $output, $post, $args ); -
/** * Filter search terms string */ apply_filters( 'get_bsearch_query', $search_query ); -
/** * Filter the relevance score text. */ apply_filters( 'get_bsearch_score', $output, $args ); -
/** * Filters the post terms for the current post. */ apply_filters( 'get_bsearch_term_list', $output, $post, $args ); -
/** * Filter array holding the search query and terms */ apply_filters( 'get_bsearch_terms', $s_array ); -
/** * Filters the title of the widget */ apply_filters( 'get_bsearch_title', $title ); -
/** * Filters the title of the widget */ apply_filters( 'get_bsearch_title_daily', $title ); -
/** * Filter the columns displayed in the Posts list table. */ apply_filters( 'manage_pop_searches_columns', $columns ); -
/** * Filters how the items in a search results heatmap are sorted. */ apply_filters( 'tag_cloud_sort', $results, $args ); -
/** * This filter has been defined in /wp-admin/includes/ajax-actions.php */ apply_filters( 'term_search_min_chars', 2, $tax, $search_term ); -
/** * Filter the date. */ apply_filters( 'the_bsearch_date', $output, $args ); -
/** * Filters the displayed post excerpt. */ apply_filters( 'the_bsearch_excerpt', $output, $args ); -
/** * Filter the arguments used by get_bsearch_excerpt(). */ apply_filters( 'the_bsearch_excerpt_args', $args ); -
/** * Filter the header. */ apply_filters( 'the_bsearch_header', get_bsearch_header( $args ), $args ); -
/** * Filters the displayed heatmap. */ apply_filters( 'the_bsearch_heatmap', $output, $args ); -
/** * Filters the display of the permalink for the current post. */ apply_filters( 'the_bsearch_permalink', $permalink, $post, $query_args ); -
/** * Filter the thumbnail. */ apply_filters( 'the_bsearch_post_thumbnail', $output, $size, $args ); -
/** * Filters the post type displayed for the current post. */ apply_filters( 'the_bsearch_post_type', get_bsearch_post_type( $post, $args ), $post, $args ); -
/** * Filter the relevance score text. */ apply_filters( 'the_bsearch_score', get_bsearch_score( $args ), $args ); -
/** * Filters the post terms for the current post. */ apply_filters( 'the_bsearch_term_list', get_bsearch_term_list( $post, $args ), $post, $args ); -
/** * This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_content', $output ); -
/** * Filters the arguments for the Better Search form widget. */ apply_filters( 'widget_bsearch_form_args', array( 'post_types' => $post_types, 'show_post_types' => $show_post_types, 'ai_mode' => $ai_mode, ), $instance ); -
/** * Filters the arguments for the Better Search heatmap widget. */ apply_filters( 'widget_bsearch_heatmap_args', array( 'daily' => $daily, 'daily_range' => $daily_range, ), $instance ); -
/** * This filter is documented in class-wp-query.php. */ apply_filters( 'wp_search_stopwords', array_values( array_unique( $stopwords ) ) ); -
apply_filters( 'wpml_current_language', null ); -
do_action( "{$this->prefix}_repeater_field_{$field['type']}", $field_args, $index ); -
do_action( "{$this->prefix}_settings_page_header" ); -
do_action( "{$this->prefix}_settings_page_header_before" ); -
apply_filters( "{self::$prefix}_max_image_dimension", 10000 ); -
apply_filters_ref_array( 'better_search_query_posts_where', array( $where, $query, &$this ) ); -
do_action( 'bsearch_cache_cleared', $network ); -
apply_filters( 'bsearch_tools_status_tables', array( $wpdb->prefix . 'bsearch' => __( 'Popular searches', 'better-search' ), $wpdb->prefix . 'bsearch_daily' => __( 'Daily searches', 'better-search' ), ) ); -
apply_filters( 'bsearch_trp_ajax_language', $language ); -
apply_filters( 'trp_translating_capability', 'manage_options' ); -
apply_filters( 'wpml_object_id', $post->ID, $post->post_type, $return_original_if_missing, $current_lang );
Generated from Better Search'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: