Timeline for Disable only one Gutenberg block programatically / coblock/maps not listed in blocks
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 2, 2021 at 8:34 | vote | accept | Alex | ||
Nov 1, 2021 at 19:55 | answer | added | StudioAl | timeline score: 2 | |
Oct 13, 2021 at 14:09 | comment | added | Tom J Nowell♦ | I don't have code to share, but hooks in the editor are well documented in the official handbook | |
Oct 13, 2021 at 13:03 | comment | added | Alex | Thanks, the wp_die was for illustration :) how do create a JS filter? Feel free to post as answer | |
Oct 12, 2021 at 15:28 | comment | added | Tom J Nowell♦ |
you'll also want to avoid wp_die , this might kill other block based areas or post types e.g. the widget block areas
|
|
Oct 12, 2021 at 15:27 | comment | added | Tom J Nowell♦ |
Doing this via PHP isn't the most reliable due to the poor API design of that filter. You're better off using a filter in JS to modify the block so that inserter is set to false in its supports section
|
|
Oct 12, 2021 at 15:11 | history | asked | Alex | CC BY-SA 4.0 |