PluginProbe
BeyondWords – AI audio for publishers / 7.0.0
BeyondWords – AI audio for publishers v7.0.0
7.1.0 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.7.0 All 43 releases
speechkit / src / editor / components / block-attributes / isBeyondwordsSupportedBlock.js

isBeyondwordsSupportedBlock.js in BeyondWords – AI audio for publishers 7.0.0, at src/editor/components/block-attributes/isBeyondwordsSupportedBlock.js

46 lines 988 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Check if a block is supported by BeyondWords.
3 *
4 * Only content blocks that can be read aloud get attributes and controls.
5 *
6 * @param {string} name Block name.
7 * @return {boolean} Whether the block is supported by BeyondWords.
8 */
9 export function isBeyondwordsSupportedBlock( name ) {
10 if ( ! name ) {
11 return false;
12 }
13
14 // Skip internal/UI blocks
15 if ( name.startsWith( '__' ) ) {
16 return false;
17 }
18
19 // Skip reusable blocks and template parts (these are containers)
20 if (
21 name.startsWith( 'core/block' ) ||
22 name.startsWith( 'core/template' )
23 ) {
24 return false;
25 }
26
27 const excludedBlocks = [
28 'beyondwords/player', // The Player block embeds the player itself
29 'core/freeform', // Classic editor
30 'core/legacy-widget',
31 'core/widget-area',
32 'core/navigation',
33 'core/navigation-link',
34 'core/navigation-submenu',
35 'core/site-logo',
36 'core/site-title',
37 'core/site-tagline',
38 ];
39
40 if ( excludedBlocks.includes( name ) ) {
41 return false;
42 }
43
44 return true;
45 }
46