diff options
Diffstat (limited to 'plugins/jetpack/extensions/blocks/amazon/amazon.php')
-rw-r--r-- | plugins/jetpack/extensions/blocks/amazon/amazon.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/jetpack/extensions/blocks/amazon/amazon.php b/plugins/jetpack/extensions/blocks/amazon/amazon.php new file mode 100644 index 00000000..a368ab79 --- /dev/null +++ b/plugins/jetpack/extensions/blocks/amazon/amazon.php @@ -0,0 +1,26 @@ +<?php +/** + * Amazon Block. + * + * @since 8.x + * + * @package Jetpack + */ + +jetpack_register_block( + 'jetpack/amazon', + array( 'render_callback' => 'jetpack_amazon_block_load_assets' ) +); + +/** + * Amazon block registration/dependency declaration. + * + * @param array $attr Array containing the Amazon block attributes. + * @param string $content String containing the Amazon block content. + * + * @return string + */ +function jetpack_amazon_block_load_assets( $attr, $content ) { + Jetpack_Gutenberg::load_assets_as_required( 'amazon' ); + return $content; +} |