Knowledge Base 3.3.2 has 18 actions and 112 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 Knowledge Base fires an action
add_action( 'wzkb_widget_options_after', function( $instance, $id_base, $number ) {
// Your code runs here.
}, 10, 3 );
// Change a value Knowledge Base is about to use
add_filter( 'widget_title', function( $title, $instance, $id_base ) {
// Change $title here.
return $title;
}, 10, 3 );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
-
/** * After Settings Output filter */ apply_filters( "{$this->prefix}_after_setting_output", $html, $args ); -
/** * This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ apply_filters( 'widget_title', $title, $instance, $this->id_base ); -
/** * This filter is documented in * includes/frontend/templates/taxonomy-wzkb_product.php */ apply_filters( 'wzkb_term_archive_header_image', '', $wzkb_current_taxonomy ); -
/** * Fires after WZKB Knowledge Base widget options. */ do_action( 'wzkb_widget_options_after', $instance, $this->id_base, $this->number ); -
/** * Filters Update widget options array. */ apply_filters( 'wzkb_widget_options_update', $instance, $new_instance, $old_instance, $this->id_base, $this->number ); -
/** * Skip settings that are not really settings. */ apply_filters( "{$this->prefix}_non_setting_types", array( 'header', 'descriptive_text' ) ); -
/** * Fires before the wizard actions are rendered. */ do_action( "{$this->prefix}_wizard_before_actions", $this->current_step, $this->total_steps ); -
/** * Action fired after processing a wizard step. */ do_action( "{$this->prefix}_wizard_step_processed", $this->current_step, $settings ); -
/** * Fires after an administrator clears the knowledge base cache from the Tools * page or the settings page. */ do_action( 'wzkb_cache_cleared' ); -
/** * This filter is documented in includes/widgets/class-sections-widget.php */ apply_filters( 'wzkb_widget_options', $arguments, $args, $instance, $this->id_base, $this->number ); -
/** * 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 ); -
/** * 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 ); -
/** * 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 ); -
/** * 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 ); -
/** * Filter the default settings array. */ apply_filters( "{self::$prefix}_settings_defaults", $defaults ); -
/** * Filters the General settings array */ apply_filters( "{self::$prefix}_settings_general", $settings ); -
/** * Filter the GitHub settings array. */ apply_filters( "{self::$prefix}_settings_github", $settings ); -
/** * Filter to modify the help sidebar content. */ apply_filters( "{self::$prefix}_settings_help", $help_sidebar ); -
/** * Filter to add more help tabs. */ apply_filters( "{self::$prefix}_settings_help_tabs", $help_tabs ); -
/** * Filters the Output settings array */ apply_filters( "{self::$prefix}_settings_output", $settings ); -
/** * Filters the Pro settings array */ apply_filters( "{self::$prefix}_settings_pro", $settings ); -
/** * Filter the array containing the settings' sections. */ apply_filters( "{self::$prefix}_settings_sections", $sections ); -
/** * Filters the Styles settings array */ apply_filters( "{self::$prefix}_settings_styles", $settings ); -
/** * 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 a blog option value. */ apply_filters( "{self::FILTER_PREFIX}_blog_option_{$key}", $value, $blog_id, $key ); -
/** * Filter the value for the option being fetched. */ apply_filters( "{self::FILTER_PREFIX}_get_option", $value, $key, $default_value ); -
/** * Key specific filter for the value of the option being fetched. */ apply_filters( "{self::FILTER_PREFIX}_get_option_{$key}", $value, $key, $default_value ); -
/** * Filters the settings array. */ apply_filters( "{self::FILTER_PREFIX}_get_settings", get_option( self::SETTINGS_OPTION, array() ) ); -
/** * Filters the registered settings types. */ apply_filters( "{self::FILTER_PREFIX}_get_settings_types", $options ); -
/** * Filter the default settings array. */ apply_filters( "{self::FILTER_PREFIX}_settings_defaults", Admin\Settings::get_defaults() ); -
/** * Filters the value before it is saved. */ apply_filters( "{self::FILTER_PREFIX}_update_option", $value, $key ); -
/** * This filter has been defined in /wp-admin/includes/ajax-actions.php */ apply_filters( 'term_search_min_chars', 2, $tax, $term ); -
/** * Filters the plugin settings passed to the block editor. */ apply_filters( 'wzkb_block_editor_settings', $settings ); -
/** * Filter the path to the block metadata directory for a given block. */ apply_filters( 'wzkb_block_metadata_path', __DIR__ . "/build/$block_name/", $block_name ); -
/** * Filters arguments passed to wzkb_knowledge for the block. */ apply_filters( 'wzkb_block_options', $arguments, $attributes ); -
/** * Filters the render callback used when registering a Knowledge Base block. */ apply_filters( 'wzkb_block_render_callback', $default_callback, $block_name, $this ); -
/** * Filters the breadcrumb items before they are rendered. */ apply_filters( 'wzkb_breadcrumb_items', $items, $args ); -
/** * Filters the array containing the various cache keys. */ apply_filters( 'wzkb_cache_keys', $keys ); -
/** * Filters the language component added to Knowledge Base cache keys. */ apply_filters( 'wzkb_cache_language', $language ); -
/** * Filter the arguments of the custom categories. */ apply_filters( 'wzkb_cat_args', $cat_args ); -
/** * Filter the classes added to the div wrapper of the Knowledge Base. */ apply_filters( 'wzkb_div_class', implode( ' ', $classes ) ); -
/** * Filter the arguments for fetching terms. */ apply_filters( 'wzkb_fetch_terms_args', $args, $taxonomy, $query_args, $meta_query ); -
/** * Fires after the Freemius SDK has been initialized. */ do_action( 'wzkb_freemius_loaded' ); -
/** * Filter the HTML for alert messages */ apply_filters( 'wzkb_get_alert', $html, $args, $content ); -
/** * Filters the rendered breadcrumb HTML. */ apply_filters( 'wzkb_get_breadcrumb', $output, $args ); -
/** * Filter the HTML output of the search form. */ apply_filters( 'wzkb_get_search_form', $form ); -
/** * Filter available KB styles. */ apply_filters( 'wzkb_kb_styles', $styles ); -
/** * Filter the formatted output. */ apply_filters( 'wzkb_knowledge', $output, $args ); -
/** * Filters the number of results returned by AJAX live search. */ apply_filters( 'wzkb_live_search_posts_per_page', 5 ); -
/** * Filters the WP_Query arguments for live search. */ apply_filters( 'wzkb_live_search_query_args', $query_args, $search_query, $product_id ); -
/** * Filters the maximum number of articles processed per migration batch. */ apply_filters( 'wzkb_migration_max_articles_per_batch', 50 ); -
/** * Filters the maximum number of sections processed per migration batch. */ apply_filters( 'wzkb_migration_max_sections_per_batch', 3 ); -
/** * Filter the arguments passed to register the post type. */ apply_filters( 'wzkb_post_type_args', $ptargs ); -
/** * Filter the labels of the post type. */ apply_filters( 'wzkb_post_type_labels', $ptlabels ); -
/** * Filter the rendered product grid HTML. */ apply_filters( 'wzkb_product_archive_grid', $output, $products ); -
/** * Filter the arguments of the products taxonomy. */ apply_filters( 'wzkb_product_args', $product_args ); -
/** * Filter the image HTML inserted before the product card title. */ apply_filters( 'wzkb_product_card_image', '', $product_term ); -
/** * Filters arguments passed to wzkb_get_product_sections_list for the block. */ apply_filters( 'wzkb_products_block_options', $arguments, $attributes ); -
/** * Filter the list of blocks to register. */ apply_filters( 'wzkb_register_blocks', $blocks ); -
/** * Filters the permission logic for a REST route. */ apply_filters( 'wzkb_rest_route_permission', null, $route_slug, $default_public ); -
/** * Filters the search form output for the block. */ apply_filters( 'wzkb_search_block_form', $form, $attributes ); -
/** * Filter the number of results on the knowledge base search results page. */ apply_filters( 'wzkb_search_posts_per_page', 12 ); -
/** * Filters arguments passed to wzkb_categories_list for the block. */ apply_filters( 'wzkb_sections_block_options', $arguments, $attributes ); -
/** * Filters knowledgebase shortcode. */ apply_filters( 'wzkb_shortcode', $output, $atts, $content ); -
/** * Filters knowledge base breadcrumb shortcode. */ apply_filters( 'wzkb_shortcode_alert', $output, $atts, $content ); -
/** * Filters knowledge base breadcrumb shortcode. */ apply_filters( 'wzkb_shortcode_breadcrumb', $output, $atts, $content ); -
/** * Filters knowledge base search form shortcode. */ apply_filters( 'wzkb_shortcode_search', $output, $atts, $content ); -
/** * Filters whether the KB primary sidebar markup is output. */ apply_filters( 'wzkb_show_sidebar', true ); -
/** * Filter the style URL. */ apply_filters( 'wzkb_style_url', $style_url, $style_name, $filename ); -
/** * Filter the arguments of the custom tags. */ apply_filters( 'wzkb_tag_args', $tag_args ); -
/** * Filters the TOC HTML output. */ apply_filters( 'wzkb_toc', $output, $headings, $args ); -
/** * Action hook to add additional help tabs. */ do_action( 'wzkb_tools_help_tabs', $screen ); -
/** * Action hook to add tools page content. */ do_action( 'wzkb_tools_page_content' ); -
/** * Action hook to add content above the Tools page columns. */ do_action( 'wzkb_tools_page_header' ); -
/** * Action hook to add sidebar content before standard sidebar. */ do_action( 'wzkb_tools_page_sidebar' ); -
/** * Filters the TranslatePress language used to render Knowledge Base REST * responses. */ apply_filters( 'wzkb_trp_rest_language', $language, $request ); -
/** * Filters the response keys Knowledge Base translates with TranslatePress. */ apply_filters( 'wzkb_trp_rest_translatable_keys', array( 'content' => array( 'html', 'title', 'excerpt', 'content', 'name', 'description' ), 'url' => array( 'link', 'permalink' ), ) ); -
/** * Filter wizard steps. */ apply_filters( 'wzkb_wizard_steps', $steps ); -
apply_filters( 'wpml_current_language', '' ); -
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( 'the_content', $post->post_content ); -
apply_filters( 'trp_translating_capability', 'manage_options' ); -
apply_filters( 'wpml_object_id', $term_id, $taxonomy, true );
Generated from Knowledge Base'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: