Make WordPress Core


Ignore:
Timestamp:
05/30/2024 03:08:31 AM (2 years ago)
Author:
isabel_brison
Message:

Editor: add aspect ratio presets support.

Enables customizing the list of aspect ratio options available through theme.json.

Props fabiankaegy, isabel_brison, swissspidy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.json

    r57885 r58242  
    190190                        ],
    191191                        "text": true
     192                },
     193                "dimensions": {
     194                        "defaultAspectRatios": true,
     195                        "aspectRatios": [
     196                                {
     197                                        "name": "Square - 1:1",
     198                                        "slug": "square",
     199                                        "ratio": "1"
     200                                },
     201                                {
     202                                        "name": "Standard - 4:3",
     203                                        "slug": "4-3",
     204                                        "ratio": "4/3"
     205                                },
     206                                {
     207                                        "name": "Portrait - 3:4",
     208                                        "slug": "3-4",
     209                                        "ratio": "3/4"
     210                                },
     211                                {
     212                                        "name": "Classic - 3:2",
     213                                        "slug": "3-2",
     214                                        "ratio": "3/2"
     215                                },
     216                                {
     217                                        "name": "Classic Portrait - 2:3",
     218                                        "slug": "2-3",
     219                                        "ratio": "2/3"
     220                                },
     221                                {
     222                                        "name": "Wide - 16:9",
     223                                        "slug": "16-9",
     224                                        "ratio": "16/9"
     225                                },
     226                                {
     227                                        "name": "Tall - 9:16",
     228                                        "slug": "9-16",
     229                                        "ratio": "9/16"
     230                                }
     231                        ]
    192232                },
    193233                "shadow": {
Note: See TracChangeset for help on using the changeset viewer.