[ 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          },
  80          "imageCrop": {
  81              "type": "boolean",
  82              "default": true
  83          },
  84          "randomOrder": {
  85              "type": "boolean",
  86              "default": false
  87          },
  88          "fixedHeight": {
  89              "type": "boolean",
  90              "default": true
  91          },
  92          "linkTarget": {
  93              "type": "string"
  94          },
  95          "linkTo": {
  96              "type": "string"
  97          },
  98          "sizeSlug": {
  99              "type": "string",
 100              "default": "large"
 101          },
 102          "allowResize": {
 103              "type": "boolean",
 104              "default": false
 105          }
 106      },
 107      "providesContext": {
 108          "allowResize": "allowResize",
 109          "imageCrop": "imageCrop",
 110          "fixedHeight": "fixedHeight"
 111      },
 112      "supports": {
 113          "anchor": true,
 114          "align": true,
 115          "html": false,
 116          "units": [ "px", "em", "rem", "vh", "vw" ],
 117          "spacing": {
 118              "margin": true,
 119              "padding": true,
 120              "blockGap": [ "horizontal", "vertical" ],
 121              "__experimentalSkipSerialization": [ "blockGap" ],
 122              "__experimentalDefaultControls": {
 123                  "blockGap": true,
 124                  "margin": false,
 125                  "padding": false
 126              }
 127          },
 128          "color": {
 129              "text": false,
 130              "background": true,
 131              "gradients": true
 132          },
 133          "layout": {
 134              "allowSwitching": false,
 135              "allowInheriting": false,
 136              "allowEditing": false,
 137              "default": {
 138                  "type": "flex"
 139              }
 140          },
 141          "interactivity": {
 142              "clientNavigation": true
 143          }
 144      },
 145      "editorStyle": "wp-block-gallery-editor",
 146      "style": "wp-block-gallery"
 147  }


Generated : Tue May 7 08:20:01 2024 Cross-referenced by PHPXref