[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/gallery/ -> block.json (source)

   1  {
   2      "$schema": "https://schemas.wp.org/trunk/block.json",
   3      "apiVersion": 3,
   4      "name": "core/gallery",
   5      "title": "Gallery",
   6      "category": "media",
   7      "allowedBlocks": [ "core/image" ],
   8      "description": "Display multiple images in a rich gallery.",
   9      "keywords": [ "images", "photos" ],
  10      "textdomain": "default",
  11      "attributes": {
  12          "images": {
  13              "type": "array",
  14              "default": [],
  15              "source": "query",
  16              "selector": ".blocks-gallery-item",
  17              "query": {
  18                  "url": {
  19                      "type": "string",
  20                      "source": "attribute",
  21                      "selector": "img",
  22                      "attribute": "src"
  23                  },
  24                  "fullUrl": {
  25                      "type": "string",
  26                      "source": "attribute",
  27                      "selector": "img",
  28                      "attribute": "data-full-url"
  29                  },
  30                  "link": {
  31                      "type": "string",
  32                      "source": "attribute",
  33                      "selector": "img",
  34                      "attribute": "data-link"
  35                  },
  36                  "alt": {
  37                      "type": "string",
  38                      "source": "attribute",
  39                      "selector": "img",
  40                      "attribute": "alt",
  41                      "default": ""
  42                  },
  43                  "id": {
  44                      "type": "string",
  45                      "source": "attribute",
  46                      "selector": "img",
  47                      "attribute": "data-id"
  48                  },
  49                  "caption": {
  50                      "type": "rich-text",
  51                      "source": "rich-text",
  52                      "selector": ".blocks-gallery-item__caption"
  53                  }
  54              }
  55          },
  56          "ids": {
  57              "type": "array",
  58              "items": {
  59                  "type": "number"
  60              },
  61              "default": []
  62          },
  63          "shortCodeTransforms": {
  64              "type": "array",
  65              "items": {
  66                  "type": "object"
  67              },
  68              "default": []
  69          },
  70          "columns": {
  71              "type": "number",
  72              "minimum": 1,
  73              "maximum": 8
  74          },
  75          "caption": {
  76              "type": "rich-text",
  77              "source": "rich-text",
  78              "selector": ".blocks-gallery-caption",
  79              "role": "content"
  80          },
  81          "imageCrop": {
  82              "type": "boolean",
  83              "default": true
  84          },
  85          "randomOrder": {
  86              "type": "boolean",
  87              "default": false
  88          },
  89          "fixedHeight": {
  90              "type": "boolean",
  91              "default": true
  92          },
  93          "linkTarget": {
  94              "type": "string"
  95          },
  96          "linkTo": {
  97              "type": "string"
  98          },
  99          "sizeSlug": {
 100              "type": "string",
 101              "default": "large"
 102          },
 103          "allowResize": {
 104              "type": "boolean",
 105              "default": false
 106          },
 107          "aspectRatio": {
 108              "type": "string",
 109              "default": "auto"
 110          }
 111      },
 112      "providesContext": {
 113          "allowResize": "allowResize",
 114          "imageCrop": "imageCrop",
 115          "fixedHeight": "fixedHeight"
 116      },
 117      "supports": {
 118          "anchor": true,
 119          "align": true,
 120          "__experimentalBorder": {
 121              "radius": true,
 122              "color": true,
 123              "width": true,
 124              "style": true,
 125              "__experimentalDefaultControls": {
 126                  "color": true,
 127                  "radius": true
 128              }
 129          },
 130          "html": false,
 131          "units": [ "px", "em", "rem", "vh", "vw" ],
 132          "spacing": {
 133              "margin": true,
 134              "padding": true,
 135              "blockGap": [ "horizontal", "vertical" ],
 136              "__experimentalSkipSerialization": [ "blockGap" ],
 137              "__experimentalDefaultControls": {
 138                  "blockGap": true,
 139                  "margin": false,
 140                  "padding": false
 141              }
 142          },
 143          "color": {
 144              "text": false,
 145              "background": true,
 146              "gradients": true
 147          },
 148          "layout": {
 149              "allowSwitching": false,
 150              "allowInheriting": false,
 151              "allowEditing": false,
 152              "default": {
 153                  "type": "flex"
 154              }
 155          },
 156          "interactivity": {
 157              "clientNavigation": true
 158          }
 159      },
 160      "editorStyle": "wp-block-gallery-editor",
 161      "style": "wp-block-gallery"
 162  }


Generated : Thu Oct 23 08:20:05 2025 Cross-referenced by PHPXref