{
  "name": "bricks/database/bricks_get_all_templates_by_type_args",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-database-bricks_get_all_templates_by_type_args/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/database/bricks_get_all_templates_by_type_args",
  "description": {
    "en": "Filters the query arguments used to retrieve all Bricks templates. This is primarily used by multilingual plugins (like WPML and Polylang) to ensure only templates in the current language are fetched.",
    "zh": "Bricks 1.4 引入了新的 bricks/database/get_all_templates_by_type/after_query 钩子，允许你在 Bricks 从数据库检索所有特定类型模板后修改返回结果。"
  },
  "parameters": [
    {
      "name": "args",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "Array of arguments passed to get_posts() .",
        "zh": "传递给 get_posts() 的参数数组。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/database/bricks_get_all_templates_by_type_args', function( $args ) {\n    // Example: Include private templates\n    $args['post_status'] = [ 'publish', 'private' ];\n\n\n    return $args;\n} );"
}