Skip to content

Commit 81d355e

Browse files
committed
fix/svg for columns 25
1 parent b1ba5a1 commit 81d355e

File tree

3 files changed

+36
-20
lines changed

3 files changed

+36
-20
lines changed

assets/source/js/admin/blocks/columns.js

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
wp.domReady(() => {
2+
//Remove assymetric grids
3+
wp.blocks.unregisterBlockVariation(
4+
"core/columns",
5+
"three-columns-wider-center",
6+
);
7+
8+
wp.blocks.registerBlockVariation("core/columns", {
9+
name: "four-columns",
10+
icon: (
11+
<svg
12+
width="48"
13+
height="48"
14+
viewBox="0 0 48 48"
15+
xmlns="http://www.w3.org/2000/svg"
16+
role="img"
17+
aria-hidden="true"
18+
focusable="false"
19+
>
20+
<path
21+
fillRule="nonzero"
22+
d="M39 12a2 2 0 011.995 1.85L41 14v20a2 2 0 01-1.85 1.995L39 36H9a2 2 0 01-1.995-1.85L7 34V14a2 2 0 011.85-1.995L9 12h30zm-24 2H9v20h6V14zm8 0h-6v20h6V14zm2 0v20h6V14h-6zm8 20h6V14h-6v20z"
23+
/>
24+
</svg>
25+
),
26+
title: "25/25/25/25",
27+
scope: ["block"], // Highlight
28+
innerBlocks: [
29+
["core/column"],
30+
["core/column"],
31+
["core/column"],
32+
["core/column"],
33+
],
34+
});
35+
});

vite.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const entries = {
8989
"js/widgets-area-hider": "./assets/source/js/admin/widgetsAreaHider.js",
9090
"js/customizer-error-handling":
9191
"./assets/source/js/admin/customizerErrorHandling.ts",
92-
"js/blocks/columns": "./assets/source/js/admin/blocks/columns.js",
92+
"js/blocks/columns": "./assets/source/js/admin/blocks/columns.jsx",
9393
"js/event-source-progress":
9494
"./assets/source/js/admin/eventSourceProgress/index.ts",
9595
};

0 commit comments

Comments
 (0)