{
  "name": "bricks/custom_fonts/mime_types",
  "kind": "filter",
  "url": "https://academy.bricksbuilder.io/developer/hooks/filters/bricks-custom_fonts-mime_types/",
  "scraped_at": "2026-08-29",
  "hook_name": "bricks/custom_fonts/mime_types",
  "description": {
    "en": "Filters the list of allowed MIME types for custom font uploads in the Bricks Custom Fonts manager.",
    "zh": "修改 Bricks Builder 中 CSS 调色板控件可用的颜色。"
  },
  "parameters": [
    {
      "name": "mime_types",
      "type": "array",
      "type_zh": null,
      "description": {
        "en": "Array of file extensions and their corresponding MIME types (e.g., ['woff2' => 'font/woff2'] ).",
        "zh": "文件扩展名及其对应 MIME 类型的数组（例如 ['woff2' => 'font/woff2']）。"
      }
    }
  ],
  "example_usage": "add_filter( 'bricks/custom_fonts/mime_types', function( $mime_types ) {\n    // Add support for OTF fonts\n    $mime_types['otf'] = 'font/otf';\n\n\n    return $mime_types;\n} );"
}