| 1 |
const root = window.wpApiSettings.root; |
| 2 |
|
| 3 |
// A list of blocks we support installing |
| 4 |
export const downloadableBlocksManifest = { |
| 5 |
'contact-form-7': { |
| 6 |
id: 'contact-form-7', |
| 7 |
name: 'contact-form-7/contact-form-selector', |
| 8 |
title: 'Contact Form 7', |
| 9 |
// Links should be presented as it is used internally by Getenberg to decide to install or activate the plugin |
| 10 |
// https://github.com/WordPress/gutenberg/blob/8b7b04ab0c95abd52fb0ef6c7cbb7ec6b440ea23/packages/block-directory/src/store/actions.js#L64C1-L81C5 |
| 11 |
// https://github.com/WordPress/gutenberg/blob/843fa85f07003fef70f3d687c4005987444d201a/packages/block-directory/src/store/utils/get-plugin-url.js#L8C1-L17C2 |
| 12 |
links: { |
| 13 |
// we want gutenberg to make sure the plugin is activated since we install it beforehand via our own API |
| 14 |
'wp:plugin': [ |
| 15 |
{ |
| 16 |
href: `${root}wp/v2/plugins/contact-form-7/wp-contact-form-7`, |
| 17 |
}, |
| 18 |
], |
| 19 |
}, |
| 20 |
}, |
| 21 |
simplybook: { |
| 22 |
id: 'simplybook', |
| 23 |
name: 'simplybook/widget', |
| 24 |
title: 'SimplyBook', |
| 25 |
// Links should be presented as it is used internally by Getenberg to decide to install or activate the plugin |
| 26 |
// https://github.com/WordPress/gutenberg/blob/8b7b04ab0c95abd52fb0ef6c7cbb7ec6b440ea23/packages/block-directory/src/store/actions.js#L64C1-L81C5 |
| 27 |
// https://github.com/WordPress/gutenberg/blob/843fa85f07003fef70f3d687c4005987444d201a/packages/block-directory/src/store/utils/get-plugin-url.js#L8C1-L17C2 |
| 28 |
links: { |
| 29 |
// we want gutenberg to make sure the plugin is activated since we install it beforehand via our own API |
| 30 |
'wp:plugin': [ |
| 31 |
{ |
| 32 |
href: `${root}wp/v2/plugins/simplybook/simplybook`, |
| 33 |
}, |
| 34 |
], |
| 35 |
}, |
| 36 |
}, |
| 37 |
}; |
| 38 |
|