{
  "name": "bricks/fix_filter_element_db",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-fix_filter_element_db/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/fix_filter_element_db",
  "description": {
    "en": "Allows plugins to intercept and handle the database update process for filter elements on a per-post basis. If the filter returns true , Bricks will skip its default update logic for that post.",
    "zh": "Bricks 1.4 引入了 bricks/indexer/run_query 钩子，允许你修改查询筛选索引器的运行查询。"
  },
  "parameters": [
    {
      "name": "handled",
      "type": "bool",
      "type_zh": null,
      "description": {
        "en": "Whether the update has been handled. Default is false .",
        "zh": "更新是否已被处理。默认为 false。"
      }
    },
    {
      "name": "post_id",
      "type": "int",
      "type_zh": null,
      "description": {
        "en": "The ID of the post being processed.",
        "zh": "正在被处理的文章 ID。"
      }
    },
    {
      "name": "template_type",
      "type": "string",
      "type_zh": null,
      "description": {
        "en": "The template type of the post.",
        "zh": "文章的模板类型。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/fix_filter_element_db', function( $handled, $post_id, $template_type ) {\n    // Example: Skip processing for a specific post ID\n    if ( $post_id === 1234 ) {\n        return true;\n    }\n\n\n    return $handled;\n}, 10, 3 );"
}