moderntribe / square-one

Modern Tribe's legacy WordPress framework for the classic editor.
GNU General Public License v2.0
89 stars 20 forks source link

Allow hiding certain embed variation instead of hiding whole embed block #1071

Closed MlKilderkin closed 1 year ago

MlKilderkin commented 1 year ago

What does this do/fix?

Allow hiding embed variation of block instead of completely disable embed block The idea came from HRI project where we should show embed block and Youtube embeds only

Tests

Does this have tests?

MlKilderkin commented 1 year ago

Thanks for looking into this, @MlKilderkin . As I understand the Embed block, this just "hides" the embed inserter button in the admin interface. It doesn't actually prevent an editor from dropping an embed URL for any of the oEmbed services into the editor and seeing it transformed into an Embed. Effectively, there's no way to actually eliminate the possibility of embedding from any oEmbed source as long as any subset of variations for embed block are enabled.

Knowing this, I'd prefer to not limit embeds at all rather than selectively "hiding" some sources form the inserter.

That's correct. It is just button removal from blocks list. You can still use any embeds.

No problem with that. I'll just close the PR