├── blocks ├── hero │ ├── build │ │ ├── index.asset.php │ │ ├── index.css │ │ ├── style-index.css │ │ ├── index.css.map │ │ ├── style-index.css.map │ │ ├── index.js.map │ │ └── index.js │ ├── src │ │ ├── editor.scss │ │ ├── style.scss │ │ ├── save.js │ │ ├── index.js │ │ └── edit.js │ └── block.json └── buy-button │ ├── build │ ├── index.asset.php │ ├── index.css │ ├── style-index.css │ ├── index.css.map │ ├── style-index.css.map │ ├── index.js.map │ └── index.js │ ├── src │ ├── editor.scss │ ├── style.scss │ ├── save.js │ ├── index.js │ └── edit.js │ └── block.json ├── .editorconfig ├── .gitignore ├── package.json ├── multiple-blocks-plugin.php ├── readme.md └── readme.txt /blocks/hero/build/index.asset.php: -------------------------------------------------------------------------------- 1 | array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '2c4d7261254ded36ea6e4dc9ec92dc8a'); -------------------------------------------------------------------------------- /blocks/buy-button/build/index.asset.php: -------------------------------------------------------------------------------- 1 | array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'ce3a844ce289c120278cdcb2d938be64'); -------------------------------------------------------------------------------- /blocks/hero/src/editor.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied inside the editor only. 3 | * 4 | * Replace them with your own styles or remove the file completely. 5 | */ 6 | 7 | .wp-block-multiple-blocks-plugin-hero { 8 | border: 1px dotted #f00; 9 | } 10 | -------------------------------------------------------------------------------- /blocks/buy-button/src/editor.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied inside the editor only. 3 | * 4 | * Replace them with your own styles or remove the file completely. 5 | */ 6 | 7 | .wp-block-multiple-blocks-plugin-buy-button { 8 | border: 1px dotted #f00; 9 | } 10 | -------------------------------------------------------------------------------- /blocks/hero/build/index.css: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied inside the editor only. 3 | * 4 | * Replace them with your own styles or remove the file completely. 5 | */ 6 | .wp-block-multiple-blocks-plugin-hero { 7 | border: 1px dotted #f00; 8 | } 9 | 10 | /*# sourceMappingURL=index.css.map*/ -------------------------------------------------------------------------------- /blocks/buy-button/build/index.css: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied inside the editor only. 3 | * 4 | * Replace them with your own styles or remove the file completely. 5 | */ 6 | .wp-block-multiple-blocks-plugin-buy-button { 7 | border: 1px dotted #f00; 8 | } 9 | 10 | /*# sourceMappingURL=index.css.map*/ -------------------------------------------------------------------------------- /blocks/hero/src/style.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied both on the front of your site 3 | * and in the editor. 4 | * 5 | * Replace them with your own styles or remove the file completely. 6 | */ 7 | 8 | .wp-block-multiple-blocks-plugin-hero { 9 | background-color: #21759b; 10 | color: #fff; 11 | padding: 2px; 12 | } 13 | -------------------------------------------------------------------------------- /blocks/buy-button/src/style.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied both on the front of your site 3 | * and in the editor. 4 | * 5 | * Replace them with your own styles or remove the file completely. 6 | */ 7 | 8 | .wp-block-multiple-blocks-plugin-buy-button { 9 | background-color: #21759b; 10 | color: #fff; 11 | padding: 2px; 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | -------------------------------------------------------------------------------- /blocks/hero/build/style-index.css: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied both on the front of your site 3 | * and in the editor. 4 | * 5 | * Replace them with your own styles or remove the file completely. 6 | */ 7 | .wp-block-multiple-blocks-plugin-hero { 8 | background-color: #21759b; 9 | color: #fff; 10 | padding: 2px; 11 | } 12 | 13 | /*# sourceMappingURL=style-index.css.map*/ -------------------------------------------------------------------------------- /blocks/buy-button/build/style-index.css: -------------------------------------------------------------------------------- 1 | /** 2 | * The following styles get applied both on the front of your site 3 | * and in the editor. 4 | * 5 | * Replace them with your own styles or remove the file completely. 6 | */ 7 | .wp-block-multiple-blocks-plugin-buy-button { 8 | background-color: #21759b; 9 | color: #fff; 10 | padding: 2px; 11 | } 12 | 13 | /*# sourceMappingURL=style-index.css.map*/ -------------------------------------------------------------------------------- /blocks/hero/build/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./blocks/hero/src/editor.scss"],"names":[],"mappings":"AAAA;;;;EAAA;AAMA;EACC;AAAD,C","file":"index.css","sourcesContent":["/**\r\n * The following styles get applied inside the editor only.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n.wp-block-multiple-blocks-plugin-hero {\r\n\tborder: 1px dotted #f00;\r\n}\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /blocks/buy-button/build/index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./blocks/buy-button/src/editor.scss"],"names":[],"mappings":"AAAA;;;;EAAA;AAMA;EACC;AAAD,C","file":"index.css","sourcesContent":["/**\r\n * The following styles get applied inside the editor only.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n.wp-block-multiple-blocks-plugin-buy-button {\r\n\tborder: 1px dotted #f00;\r\n}\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Coverage directory used by tools like istanbul 9 | coverage 10 | 11 | # Compiled binary addons (https://nodejs.org/api/addons.html) 12 | build/Release 13 | 14 | # Dependency directories 15 | node_modules/ 16 | 17 | # Optional npm cache directory 18 | .npm 19 | 20 | # Optional eslint cache 21 | .eslintcache 22 | 23 | # Output of 'npm pack' 24 | *.tgz 25 | 26 | # dotenv environment variables file 27 | .env 28 | -------------------------------------------------------------------------------- /blocks/hero/build/style-index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./blocks/hero/src/style.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","file":"style-index.css","sourcesContent":["/**\r\n * The following styles get applied both on the front of your site\r\n * and in the editor.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n.wp-block-multiple-blocks-plugin-hero {\r\n\tbackground-color: #21759b;\r\n\tcolor: #fff;\r\n\tpadding: 2px;\r\n}\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /blocks/hero/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiVersion": 2, 3 | "name": "multiple-blocks-plugin/hero", 4 | "version": "0.1.0", 5 | "title": "Hero Block", 6 | "category": "widgets", 7 | "icon": "smiley", 8 | "description": "Example block written with ESNext standard and JSX support – build step required.", 9 | "supports": { 10 | "html": false 11 | }, 12 | "textdomain": "multiple-blocks-plugin", 13 | "editorScript": "file:./build/index.js", 14 | "editorStyle": "file:./build/index.css", 15 | "style": "file:./build/style-index.css" 16 | } -------------------------------------------------------------------------------- /blocks/buy-button/build/style-index.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./blocks/buy-button/src/style.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","file":"style-index.css","sourcesContent":["/**\r\n * The following styles get applied both on the front of your site\r\n * and in the editor.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n.wp-block-multiple-blocks-plugin-buy-button {\r\n\tbackground-color: #21759b;\r\n\tcolor: #fff;\r\n\tpadding: 2px;\r\n}\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /blocks/buy-button/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiVersion": 2, 3 | "name": "multiple-blocks-plugin/buy-button", 4 | "version": "0.1.0", 5 | "title": "Buy Button", 6 | "category": "widgets", 7 | "icon": "smiley", 8 | "description": "Example block written with ESNext standard and JSX support – build step required.", 9 | "supports": { 10 | "html": false 11 | }, 12 | "textdomain": "multiple-blocks-plugin", 13 | "editorScript": "file:./build/index.js", 14 | "editorStyle": "file:./build/index.css", 15 | "style": "file:./build/style-index.css" 16 | } -------------------------------------------------------------------------------- /blocks/hero/src/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Retrieves the translation of text. 3 | * 4 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 5 | */ 6 | import { __ } from '@wordpress/i18n'; 7 | 8 | /** 9 | * React hook that is used to mark the block wrapper element. 10 | * It provides all the necessary props like the class name. 11 | * 12 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 13 | */ 14 | import { useBlockProps } from '@wordpress/block-editor'; 15 | 16 | /** 17 | * The save function defines the way in which the different attributes should 18 | * be combined into the final markup, which is then serialized by the block 19 | * editor into `post_content`. 20 | * 21 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save 22 | * 23 | * @return {WPElement} Element to render. 24 | */ 25 | export default function save() { 26 | return ( 27 |
28 | { __( 29 | 'Multiple Blocks Plugin – hello from the saved content!', 30 | 'multiple-blocks-plugin' 31 | ) } 32 |
33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /blocks/buy-button/src/save.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Retrieves the translation of text. 3 | * 4 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 5 | */ 6 | import { __ } from '@wordpress/i18n'; 7 | 8 | /** 9 | * React hook that is used to mark the block wrapper element. 10 | * It provides all the necessary props like the class name. 11 | * 12 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 13 | */ 14 | import { useBlockProps } from '@wordpress/block-editor'; 15 | 16 | /** 17 | * The save function defines the way in which the different attributes should 18 | * be combined into the final markup, which is then serialized by the block 19 | * editor into `post_content`. 20 | * 21 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save 22 | * 23 | * @return {WPElement} Element to render. 24 | */ 25 | export default function save() { 26 | return ( 27 |28 | { __( 29 | 'Multiple Blocks Plugin – hello from the saved content!', 30 | 'multiple-blocks-plugin' 31 | ) } 32 |
33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /blocks/hero/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Registers a new block provided a unique name and an object defining its behavior. 3 | * 4 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 5 | */ 6 | import { registerBlockType } from '@wordpress/blocks'; 7 | 8 | /** 9 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 10 | * All files containing `style` keyword are bundled together. The code used 11 | * gets applied both to the front of your site and to the editor. 12 | * 13 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 14 | */ 15 | import './style.scss'; 16 | 17 | /** 18 | * Internal dependencies 19 | */ 20 | import Edit from './edit'; 21 | import save from './save'; 22 | 23 | /** 24 | * Every block starts by registering a new block type definition. 25 | * 26 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 27 | */ 28 | registerBlockType( 'multiple-blocks-plugin/hero', { 29 | /** 30 | * @see ./edit.js 31 | */ 32 | edit: Edit, 33 | 34 | /** 35 | * @see ./save.js 36 | */ 37 | save, 38 | } ); 39 | -------------------------------------------------------------------------------- /blocks/buy-button/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Registers a new block provided a unique name and an object defining its behavior. 3 | * 4 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 5 | */ 6 | import { registerBlockType } from '@wordpress/blocks'; 7 | 8 | /** 9 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 10 | * All files containing `style` keyword are bundled together. The code used 11 | * gets applied both to the front of your site and to the editor. 12 | * 13 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 14 | */ 15 | import './style.scss'; 16 | 17 | /** 18 | * Internal dependencies 19 | */ 20 | import Edit from './edit'; 21 | import save from './save'; 22 | 23 | /** 24 | * Every block starts by registering a new block type definition. 25 | * 26 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 27 | */ 28 | registerBlockType( 'multiple-blocks-plugin/buy-button', { 29 | /** 30 | * @see ./edit.js 31 | */ 32 | edit: Edit, 33 | 34 | /** 35 | * @see ./save.js 36 | */ 37 | save, 38 | } ); 39 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multiple-blocks-plugin", 3 | "version": "0.1.0", 4 | "description": "Example block written with ESNext standard and JSX support – build step required.", 5 | "author": "The WordPress Contributors", 6 | "license": "GPL-2.0-or-later", 7 | "main": "build/index.js", 8 | "scripts": { 9 | "build": "wp-scripts build", 10 | "format": "wp-scripts format", 11 | "lint:css": "wp-scripts lint-style", 12 | "lint:js": "wp-scripts lint-js", 13 | "start": "wp-scripts start", 14 | "packages-update": "wp-scripts packages-update", 15 | "start:buy-button": "wp-scripts start blocks/buy-button/src/index.js --output-path=blocks/buy-button/build/", 16 | "build:buy-button": "wp-scripts build blocks/buy-button/src/index.js --output-path=blocks/buy-button/build/", 17 | "start:hero": "wp-scripts start blocks/hero/src/index.js --output-path=blocks/hero/build/", 18 | "build:hero": "wp-scripts build blocks/hero/src/index.js --output-path=blocks/hero/build/" 19 | }, 20 | "dependencies": { 21 | "@wordpress/block-editor": "^7.0.0", 22 | "@wordpress/blocks": "^11.0.0", 23 | "@wordpress/i18n": "^4.2.1" 24 | }, 25 | "devDependencies": { 26 | "@wordpress/scripts": "^17.1.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /multiple-blocks-plugin.php: -------------------------------------------------------------------------------- 1 | 35 | { __( 36 | 'Multiple Blocks Plugin – hello from the editor!', 37 | 'multiple-blocks-plugin' 38 | ) } 39 | 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /blocks/buy-button/src/edit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Retrieves the translation of text. 3 | * 4 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 5 | */ 6 | import { __ } from '@wordpress/i18n'; 7 | 8 | /** 9 | * React hook that is used to mark the block wrapper element. 10 | * It provides all the necessary props like the class name. 11 | * 12 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 13 | */ 14 | import { useBlockProps } from '@wordpress/block-editor'; 15 | 16 | /** 17 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 18 | * Those files can contain any CSS code that gets applied to the editor. 19 | * 20 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 21 | */ 22 | import './editor.scss'; 23 | 24 | /** 25 | * The edit function describes the structure of your block in the context of the 26 | * editor. This represents what the editor will render when the block is used. 27 | * 28 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit 29 | * 30 | * @return {WPElement} Element to render. 31 | */ 32 | export default function Edit() { 33 | return ( 34 |35 | { __( 36 | 'Multiple Blocks Plugin – hello from the editor!', 37 | 'multiple-blocks-plugin' 38 | ) } 39 |
40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Multiple blocks plugin 2 | 3 | This is an implementation of the fantastic `@wordpress/create-block` package, with some restructuring to support multiple blocks in a single WordPress plugin. 4 | 5 | I strongly recommend to read the [official guide](https://developer.wordpress.org/block-editor/handbook/tutorials/create-block/), [the docs](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/), and check out [the article](https://gziolo.pl/2020/12/22/how-to-start-block-development-with-scaffolding/) from it's creator Greg Ziółkowski. 6 | 7 | ## Follow the tutorial 8 | This project was built to support the [tutorial found here](https://dev.to/rmorse/how-to-create-a-multiple-block-plugin-for-wordpress-mpm) - which uses the WordPress recommended way of creating a block plugin and teaches you how to add additional blocks should you need them. 9 | 10 | If you prefer not to follow along, you can continue with the standard setup: 11 | 12 | ## Installation 13 | 14 | 1. Clone the project to your desired location 15 | 2. Open the command line in the project folder and install the packages: 16 | 17 | ```bash 18 | npm install 19 | ``` 20 | 3. Grab a coffee 21 | 22 | ## Usage 23 | 24 | Run the scripts for the included **buy-button** block 25 | ```shell 26 | npm run start:buy-button 27 | npm run build:buy-button 28 | ``` 29 | 30 | Run the scripts for the included **hero** block 31 | ```shell 32 | npm run start:hero 33 | npm run build:hero 34 | ``` 35 | 36 | ## Contributing 37 | Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. 38 | 39 | ## License 40 | Everyone is permitted to copy and distribute verbatim or modified copies of this license software, and changing it is allowed - for any purpose. No credit is needed whatsoever. 41 | 42 | Your WordPress plugin should have a [GPL2 or Later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) license, though. 43 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Multiple Blocks Plugin === 2 | Contributors: The WordPress Contributors 3 | Tags: block 4 | Tested up to: 5.8.0 5 | Stable tag: 0.1.0 6 | License: GPL-2.0-or-later 7 | License URI: https://www.gnu.org/licenses/gpl-2.0.html 8 | 9 | Example block written with ESNext standard and JSX support – build step required. 10 | 11 | == Description == 12 | 13 | This is the long description. No limit, and you can use Markdown (as well as in the following sections). 14 | 15 | For backwards compatibility, if this section is missing, the full length of the short description will be used, and 16 | Markdown parsed. 17 | 18 | == Installation == 19 | 20 | This section describes how to install the plugin and get it working. 21 | 22 | e.g. 23 | 24 | 1. Upload the plugin files to the `/wp-content/plugins/multiple-blocks-plugin` directory, or install the plugin through the WordPress plugins screen directly. 25 | 1. Activate the plugin through the 'Plugins' screen in WordPress 26 | 27 | 28 | == Frequently Asked Questions == 29 | 30 | = A question that someone might have = 31 | 32 | An answer to that question. 33 | 34 | = What about foo bar? = 35 | 36 | Answer to foo bar dilemma. 37 | 38 | == Screenshots == 39 | 40 | 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from 41 | the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets 42 | directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` 43 | (or jpg, jpeg, gif). 44 | 2. This is the second screen shot 45 | 46 | == Changelog == 47 | 48 | = 0.1.0 = 49 | * Release 50 | 51 | == Arbitrary section == 52 | 53 | You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated 54 | plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or 55 | "installation." Arbitrary sections will be shown below the built-in sections outlined above. 56 | -------------------------------------------------------------------------------- /blocks/hero/build/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./blocks/hero/src/edit.js","webpack:///./blocks/hero/src/editor.scss?309c","webpack:///./blocks/hero/src/index.js","webpack:///./blocks/hero/src/save.js","webpack:///external [\"wp\",\"blockEditor\"]","webpack:///external [\"wp\",\"blocks\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]"],"names":["Edit","useBlockProps","__","registerBlockType","edit","save"],"mappings":";;;;;;;;;;;;;;;;;;;QAAA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASA,IAAT,GAAgB;AAC9B,SACC,8EAAQC,6EAAa,EAArB,EACGC,0DAAE,CACH,iDADG,EAEH,wBAFG,CADL,CADD;AAQA,C;;;;;;;;;;;;ACxCD;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AACAC,2EAAiB,CAAE,6BAAF,EAAiC;AACjD;AACD;AACA;AACCC,MAAI,EAAEJ,6CAJ2C;;AAMjD;AACD;AACA;AACCK,qDAAIA;AAT6C,CAAjC,CAAjB,C;;;;;;;;;;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASA,IAAT,GAAgB;AAC9B,SACC,8EAAQJ,qEAAa,CAACI,IAAd,EAAR,EACGH,0DAAE,CACH,wDADG,EAEH,wBAFG,CADL,CADD;AAQA,C;;;;;;;;;;;ACjCD,aAAa,8CAA8C,EAAE,I;;;;;;;;;;;ACA7D,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,uCAAuC,EAAE,I","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp_multiple_blocks_plugin\"] = window[\"webpackJsonp_multiple_blocks_plugin\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./blocks/hero/src/index.js\",\"style-index\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","/**\r\n * Retrieves the translation of text.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\n\r\n/**\r\n * React hook that is used to mark the block wrapper element.\r\n * It provides all the necessary props like the class name.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps\r\n */\r\nimport { useBlockProps } from '@wordpress/block-editor';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * Those files can contain any CSS code that gets applied to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './editor.scss';\r\n\r\n/**\r\n * The edit function describes the structure of your block in the context of the\r\n * editor. This represents what the editor will render when the block is used.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit\r\n *\r\n * @return {WPElement} Element to render.\r\n */\r\nexport default function Edit() {\r\n\treturn (\r\n\t\t\r\n\t\t\t{ __(\r\n\t\t\t\t'Multiple Blocks Plugin – hello from the editor!',\r\n\t\t\t\t'multiple-blocks-plugin'\r\n\t\t\t) }\r\n\t\t
\r\n\t);\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","/**\r\n * Registers a new block provided a unique name and an object defining its behavior.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nimport { registerBlockType } from '@wordpress/blocks';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * All files containing `style` keyword are bundled together. The code used\r\n * gets applied both to the front of your site and to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './style.scss';\r\n\r\n/**\r\n * Internal dependencies\r\n */\r\nimport Edit from './edit';\r\nimport save from './save';\r\n\r\n/**\r\n * Every block starts by registering a new block type definition.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nregisterBlockType( 'multiple-blocks-plugin/hero', {\r\n\t/**\r\n\t * @see ./edit.js\r\n\t */\r\n\tedit: Edit,\r\n\r\n\t/**\r\n\t * @see ./save.js\r\n\t */\r\n\tsave,\r\n} );\r\n","/**\r\n * Retrieves the translation of text.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\n\r\n/**\r\n * React hook that is used to mark the block wrapper element.\r\n * It provides all the necessary props like the class name.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps\r\n */\r\nimport { useBlockProps } from '@wordpress/block-editor';\r\n\r\n/**\r\n * The save function defines the way in which the different attributes should\r\n * be combined into the final markup, which is then serialized by the block\r\n * editor into `post_content`.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save\r\n *\r\n * @return {WPElement} Element to render.\r\n */\r\nexport default function save() {\r\n\treturn (\r\n\t\t\r\n\t\t\t{ __(\r\n\t\t\t\t'Multiple Blocks Plugin – hello from the saved content!',\r\n\t\t\t\t'multiple-blocks-plugin'\r\n\t\t\t) }\r\n\t\t
\r\n\t);\r\n}\r\n","(function() { module.exports = window[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = window[\"wp\"][\"blocks\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());"],"sourceRoot":""} -------------------------------------------------------------------------------- /blocks/buy-button/build/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./blocks/buy-button/src/edit.js","webpack:///./blocks/buy-button/src/editor.scss?fc92","webpack:///./blocks/buy-button/src/index.js","webpack:///./blocks/buy-button/src/save.js","webpack:///external [\"wp\",\"blockEditor\"]","webpack:///external [\"wp\",\"blocks\"]","webpack:///external [\"wp\",\"element\"]","webpack:///external [\"wp\",\"i18n\"]"],"names":["Edit","useBlockProps","__","registerBlockType","edit","save"],"mappings":";;;;;;;;;;;;;;;;;;;QAAA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASA,IAAT,GAAgB;AAC9B,SACC,8EAAQC,6EAAa,EAArB,EACGC,0DAAE,CACH,iDADG,EAEH,wBAFG,CADL,CADD;AAQA,C;;;;;;;;;;;;ACxCD;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;AACAC,2EAAiB,CAAE,mCAAF,EAAuC;AACvD;AACD;AACA;AACCC,MAAI,EAAEJ,6CAJiD;;AAMvD;AACD;AACA;AACCK,qDAAIA;AATmD,CAAvC,CAAjB,C;;;;;;;;;;;;;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASA,IAAT,GAAgB;AAC9B,SACC,8EAAQJ,qEAAa,CAACI,IAAd,EAAR,EACGH,0DAAE,CACH,wDADG,EAEH,wBAFG,CADL,CADD;AAQA,C;;;;;;;;;;;ACjCD,aAAa,8CAA8C,EAAE,I;;;;;;;;;;;ACA7D,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,uCAAuC,EAAE,I","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp_multiple_blocks_plugin\"] = window[\"webpackJsonp_multiple_blocks_plugin\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./blocks/buy-button/src/index.js\",\"style-index\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","/**\r\n * Retrieves the translation of text.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\n\r\n/**\r\n * React hook that is used to mark the block wrapper element.\r\n * It provides all the necessary props like the class name.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps\r\n */\r\nimport { useBlockProps } from '@wordpress/block-editor';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * Those files can contain any CSS code that gets applied to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './editor.scss';\r\n\r\n/**\r\n * The edit function describes the structure of your block in the context of the\r\n * editor. This represents what the editor will render when the block is used.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit\r\n *\r\n * @return {WPElement} Element to render.\r\n */\r\nexport default function Edit() {\r\n\treturn (\r\n\t\t\r\n\t\t\t{ __(\r\n\t\t\t\t'Multiple Blocks Plugin – hello from the editor!',\r\n\t\t\t\t'multiple-blocks-plugin'\r\n\t\t\t) }\r\n\t\t
\r\n\t);\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","/**\r\n * Registers a new block provided a unique name and an object defining its behavior.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nimport { registerBlockType } from '@wordpress/blocks';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * All files containing `style` keyword are bundled together. The code used\r\n * gets applied both to the front of your site and to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './style.scss';\r\n\r\n/**\r\n * Internal dependencies\r\n */\r\nimport Edit from './edit';\r\nimport save from './save';\r\n\r\n/**\r\n * Every block starts by registering a new block type definition.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nregisterBlockType( 'multiple-blocks-plugin/buy-button', {\r\n\t/**\r\n\t * @see ./edit.js\r\n\t */\r\n\tedit: Edit,\r\n\r\n\t/**\r\n\t * @see ./save.js\r\n\t */\r\n\tsave,\r\n} );\r\n","/**\r\n * Retrieves the translation of text.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\n\r\n/**\r\n * React hook that is used to mark the block wrapper element.\r\n * It provides all the necessary props like the class name.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps\r\n */\r\nimport { useBlockProps } from '@wordpress/block-editor';\r\n\r\n/**\r\n * The save function defines the way in which the different attributes should\r\n * be combined into the final markup, which is then serialized by the block\r\n * editor into `post_content`.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save\r\n *\r\n * @return {WPElement} Element to render.\r\n */\r\nexport default function save() {\r\n\treturn (\r\n\t\t\r\n\t\t\t{ __(\r\n\t\t\t\t'Multiple Blocks Plugin – hello from the saved content!',\r\n\t\t\t\t'multiple-blocks-plugin'\r\n\t\t\t) }\r\n\t\t
\r\n\t);\r\n}\r\n","(function() { module.exports = window[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = window[\"wp\"][\"blocks\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());"],"sourceRoot":""} -------------------------------------------------------------------------------- /blocks/hero/build/index.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp_multiple_blocks_plugin"] = window["webpackJsonp_multiple_blocks_plugin"] || []).push([["style-index"],{ 2 | 3 | /***/ "./blocks/hero/src/style.scss": 4 | /*!************************************!*\ 5 | !*** ./blocks/hero/src/style.scss ***! 6 | \************************************/ 7 | /*! no exports provided */ 8 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 9 | 10 | "use strict"; 11 | __webpack_require__.r(__webpack_exports__); 12 | // extracted by mini-css-extract-plugin 13 | 14 | 15 | /***/ }) 16 | 17 | }]); 18 | 19 | /******/ (function(modules) { // webpackBootstrap 20 | /******/ // install a JSONP callback for chunk loading 21 | /******/ function webpackJsonpCallback(data) { 22 | /******/ var chunkIds = data[0]; 23 | /******/ var moreModules = data[1]; 24 | /******/ var executeModules = data[2]; 25 | /******/ 26 | /******/ // add "moreModules" to the modules object, 27 | /******/ // then flag all "chunkIds" as loaded and fire callback 28 | /******/ var moduleId, chunkId, i = 0, resolves = []; 29 | /******/ for(;i < chunkIds.length; i++) { 30 | /******/ chunkId = chunkIds[i]; 31 | /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { 32 | /******/ resolves.push(installedChunks[chunkId][0]); 33 | /******/ } 34 | /******/ installedChunks[chunkId] = 0; 35 | /******/ } 36 | /******/ for(moduleId in moreModules) { 37 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 38 | /******/ modules[moduleId] = moreModules[moduleId]; 39 | /******/ } 40 | /******/ } 41 | /******/ if(parentJsonpFunction) parentJsonpFunction(data); 42 | /******/ 43 | /******/ while(resolves.length) { 44 | /******/ resolves.shift()(); 45 | /******/ } 46 | /******/ 47 | /******/ // add entry modules from loaded chunk to deferred list 48 | /******/ deferredModules.push.apply(deferredModules, executeModules || []); 49 | /******/ 50 | /******/ // run deferred modules when all chunks ready 51 | /******/ return checkDeferredModules(); 52 | /******/ }; 53 | /******/ function checkDeferredModules() { 54 | /******/ var result; 55 | /******/ for(var i = 0; i < deferredModules.length; i++) { 56 | /******/ var deferredModule = deferredModules[i]; 57 | /******/ var fulfilled = true; 58 | /******/ for(var j = 1; j < deferredModule.length; j++) { 59 | /******/ var depId = deferredModule[j]; 60 | /******/ if(installedChunks[depId] !== 0) fulfilled = false; 61 | /******/ } 62 | /******/ if(fulfilled) { 63 | /******/ deferredModules.splice(i--, 1); 64 | /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); 65 | /******/ } 66 | /******/ } 67 | /******/ 68 | /******/ return result; 69 | /******/ } 70 | /******/ 71 | /******/ // The module cache 72 | /******/ var installedModules = {}; 73 | /******/ 74 | /******/ // object to store loaded and loading chunks 75 | /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 76 | /******/ // Promise = chunk loading, 0 = chunk loaded 77 | /******/ var installedChunks = { 78 | /******/ "index": 0 79 | /******/ }; 80 | /******/ 81 | /******/ var deferredModules = []; 82 | /******/ 83 | /******/ // The require function 84 | /******/ function __webpack_require__(moduleId) { 85 | /******/ 86 | /******/ // Check if module is in cache 87 | /******/ if(installedModules[moduleId]) { 88 | /******/ return installedModules[moduleId].exports; 89 | /******/ } 90 | /******/ // Create a new module (and put it into the cache) 91 | /******/ var module = installedModules[moduleId] = { 92 | /******/ i: moduleId, 93 | /******/ l: false, 94 | /******/ exports: {} 95 | /******/ }; 96 | /******/ 97 | /******/ // Execute the module function 98 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 99 | /******/ 100 | /******/ // Flag the module as loaded 101 | /******/ module.l = true; 102 | /******/ 103 | /******/ // Return the exports of the module 104 | /******/ return module.exports; 105 | /******/ } 106 | /******/ 107 | /******/ 108 | /******/ // expose the modules object (__webpack_modules__) 109 | /******/ __webpack_require__.m = modules; 110 | /******/ 111 | /******/ // expose the module cache 112 | /******/ __webpack_require__.c = installedModules; 113 | /******/ 114 | /******/ // define getter function for harmony exports 115 | /******/ __webpack_require__.d = function(exports, name, getter) { 116 | /******/ if(!__webpack_require__.o(exports, name)) { 117 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 118 | /******/ } 119 | /******/ }; 120 | /******/ 121 | /******/ // define __esModule on exports 122 | /******/ __webpack_require__.r = function(exports) { 123 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 124 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 125 | /******/ } 126 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 127 | /******/ }; 128 | /******/ 129 | /******/ // create a fake namespace object 130 | /******/ // mode & 1: value is a module id, require it 131 | /******/ // mode & 2: merge all properties of value into the ns 132 | /******/ // mode & 4: return value when already ns object 133 | /******/ // mode & 8|1: behave like require 134 | /******/ __webpack_require__.t = function(value, mode) { 135 | /******/ if(mode & 1) value = __webpack_require__(value); 136 | /******/ if(mode & 8) return value; 137 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 138 | /******/ var ns = Object.create(null); 139 | /******/ __webpack_require__.r(ns); 140 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 141 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 142 | /******/ return ns; 143 | /******/ }; 144 | /******/ 145 | /******/ // getDefaultExport function for compatibility with non-harmony modules 146 | /******/ __webpack_require__.n = function(module) { 147 | /******/ var getter = module && module.__esModule ? 148 | /******/ function getDefault() { return module['default']; } : 149 | /******/ function getModuleExports() { return module; }; 150 | /******/ __webpack_require__.d(getter, 'a', getter); 151 | /******/ return getter; 152 | /******/ }; 153 | /******/ 154 | /******/ // Object.prototype.hasOwnProperty.call 155 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 156 | /******/ 157 | /******/ // __webpack_public_path__ 158 | /******/ __webpack_require__.p = ""; 159 | /******/ 160 | /******/ var jsonpArray = window["webpackJsonp_multiple_blocks_plugin"] = window["webpackJsonp_multiple_blocks_plugin"] || []; 161 | /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); 162 | /******/ jsonpArray.push = webpackJsonpCallback; 163 | /******/ jsonpArray = jsonpArray.slice(); 164 | /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); 165 | /******/ var parentJsonpFunction = oldJsonpFunction; 166 | /******/ 167 | /******/ 168 | /******/ // add entry module to deferred list 169 | /******/ deferredModules.push(["./blocks/hero/src/index.js","style-index"]); 170 | /******/ // run deferred modules when ready 171 | /******/ return checkDeferredModules(); 172 | /******/ }) 173 | /************************************************************************/ 174 | /******/ ({ 175 | 176 | /***/ "./blocks/hero/src/edit.js": 177 | /*!*********************************!*\ 178 | !*** ./blocks/hero/src/edit.js ***! 179 | \*********************************/ 180 | /*! exports provided: default */ 181 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 182 | 183 | "use strict"; 184 | __webpack_require__.r(__webpack_exports__); 185 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; }); 186 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 187 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 188 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); 189 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); 190 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); 191 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); 192 | /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./blocks/hero/src/editor.scss"); 193 | 194 | 195 | /** 196 | * Retrieves the translation of text. 197 | * 198 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 199 | */ 200 | 201 | /** 202 | * React hook that is used to mark the block wrapper element. 203 | * It provides all the necessary props like the class name. 204 | * 205 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 206 | */ 207 | 208 | 209 | /** 210 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 211 | * Those files can contain any CSS code that gets applied to the editor. 212 | * 213 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 214 | */ 215 | 216 | 217 | /** 218 | * The edit function describes the structure of your block in the context of the 219 | * editor. This represents what the editor will render when the block is used. 220 | * 221 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit 222 | * 223 | * @return {WPElement} Element to render. 224 | */ 225 | 226 | function Edit() { 227 | return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["useBlockProps"])(), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Multiple Blocks Plugin – hello from the editor!', 'multiple-blocks-plugin')); 228 | } 229 | 230 | /***/ }), 231 | 232 | /***/ "./blocks/hero/src/editor.scss": 233 | /*!*************************************!*\ 234 | !*** ./blocks/hero/src/editor.scss ***! 235 | \*************************************/ 236 | /*! no exports provided */ 237 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 238 | 239 | "use strict"; 240 | __webpack_require__.r(__webpack_exports__); 241 | // extracted by mini-css-extract-plugin 242 | 243 | 244 | /***/ }), 245 | 246 | /***/ "./blocks/hero/src/index.js": 247 | /*!**********************************!*\ 248 | !*** ./blocks/hero/src/index.js ***! 249 | \**********************************/ 250 | /*! no exports provided */ 251 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 252 | 253 | "use strict"; 254 | __webpack_require__.r(__webpack_exports__); 255 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); 256 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); 257 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./blocks/hero/src/style.scss"); 258 | /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./blocks/hero/src/edit.js"); 259 | /* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./blocks/hero/src/save.js"); 260 | /** 261 | * Registers a new block provided a unique name and an object defining its behavior. 262 | * 263 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 264 | */ 265 | 266 | /** 267 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 268 | * All files containing `style` keyword are bundled together. The code used 269 | * gets applied both to the front of your site and to the editor. 270 | * 271 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 272 | */ 273 | 274 | 275 | /** 276 | * Internal dependencies 277 | */ 278 | 279 | 280 | 281 | /** 282 | * Every block starts by registering a new block type definition. 283 | * 284 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 285 | */ 286 | 287 | Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["registerBlockType"])('multiple-blocks-plugin/hero', { 288 | /** 289 | * @see ./edit.js 290 | */ 291 | edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"], 292 | 293 | /** 294 | * @see ./save.js 295 | */ 296 | save: _save__WEBPACK_IMPORTED_MODULE_3__["default"] 297 | }); 298 | 299 | /***/ }), 300 | 301 | /***/ "./blocks/hero/src/save.js": 302 | /*!*********************************!*\ 303 | !*** ./blocks/hero/src/save.js ***! 304 | \*********************************/ 305 | /*! exports provided: default */ 306 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 307 | 308 | "use strict"; 309 | __webpack_require__.r(__webpack_exports__); 310 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return save; }); 311 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 312 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 313 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); 314 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); 315 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); 316 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); 317 | 318 | 319 | /** 320 | * Retrieves the translation of text. 321 | * 322 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 323 | */ 324 | 325 | /** 326 | * React hook that is used to mark the block wrapper element. 327 | * It provides all the necessary props like the class name. 328 | * 329 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 330 | */ 331 | 332 | 333 | /** 334 | * The save function defines the way in which the different attributes should 335 | * be combined into the final markup, which is then serialized by the block 336 | * editor into `post_content`. 337 | * 338 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save 339 | * 340 | * @return {WPElement} Element to render. 341 | */ 342 | 343 | function save() { 344 | return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["useBlockProps"].save(), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Multiple Blocks Plugin – hello from the saved content!', 'multiple-blocks-plugin')); 345 | } 346 | 347 | /***/ }), 348 | 349 | /***/ "@wordpress/block-editor": 350 | /*!*************************************!*\ 351 | !*** external ["wp","blockEditor"] ***! 352 | \*************************************/ 353 | /*! no static exports found */ 354 | /***/ (function(module, exports) { 355 | 356 | (function() { module.exports = window["wp"]["blockEditor"]; }()); 357 | 358 | /***/ }), 359 | 360 | /***/ "@wordpress/blocks": 361 | /*!********************************!*\ 362 | !*** external ["wp","blocks"] ***! 363 | \********************************/ 364 | /*! no static exports found */ 365 | /***/ (function(module, exports) { 366 | 367 | (function() { module.exports = window["wp"]["blocks"]; }()); 368 | 369 | /***/ }), 370 | 371 | /***/ "@wordpress/element": 372 | /*!*********************************!*\ 373 | !*** external ["wp","element"] ***! 374 | \*********************************/ 375 | /*! no static exports found */ 376 | /***/ (function(module, exports) { 377 | 378 | (function() { module.exports = window["wp"]["element"]; }()); 379 | 380 | /***/ }), 381 | 382 | /***/ "@wordpress/i18n": 383 | /*!******************************!*\ 384 | !*** external ["wp","i18n"] ***! 385 | \******************************/ 386 | /*! no static exports found */ 387 | /***/ (function(module, exports) { 388 | 389 | (function() { module.exports = window["wp"]["i18n"]; }()); 390 | 391 | /***/ }) 392 | 393 | /******/ }); 394 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /blocks/buy-button/build/index.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp_multiple_blocks_plugin"] = window["webpackJsonp_multiple_blocks_plugin"] || []).push([["style-index"],{ 2 | 3 | /***/ "./blocks/buy-button/src/style.scss": 4 | /*!******************************************!*\ 5 | !*** ./blocks/buy-button/src/style.scss ***! 6 | \******************************************/ 7 | /*! no exports provided */ 8 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 9 | 10 | "use strict"; 11 | __webpack_require__.r(__webpack_exports__); 12 | // extracted by mini-css-extract-plugin 13 | 14 | 15 | /***/ }) 16 | 17 | }]); 18 | 19 | /******/ (function(modules) { // webpackBootstrap 20 | /******/ // install a JSONP callback for chunk loading 21 | /******/ function webpackJsonpCallback(data) { 22 | /******/ var chunkIds = data[0]; 23 | /******/ var moreModules = data[1]; 24 | /******/ var executeModules = data[2]; 25 | /******/ 26 | /******/ // add "moreModules" to the modules object, 27 | /******/ // then flag all "chunkIds" as loaded and fire callback 28 | /******/ var moduleId, chunkId, i = 0, resolves = []; 29 | /******/ for(;i < chunkIds.length; i++) { 30 | /******/ chunkId = chunkIds[i]; 31 | /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { 32 | /******/ resolves.push(installedChunks[chunkId][0]); 33 | /******/ } 34 | /******/ installedChunks[chunkId] = 0; 35 | /******/ } 36 | /******/ for(moduleId in moreModules) { 37 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { 38 | /******/ modules[moduleId] = moreModules[moduleId]; 39 | /******/ } 40 | /******/ } 41 | /******/ if(parentJsonpFunction) parentJsonpFunction(data); 42 | /******/ 43 | /******/ while(resolves.length) { 44 | /******/ resolves.shift()(); 45 | /******/ } 46 | /******/ 47 | /******/ // add entry modules from loaded chunk to deferred list 48 | /******/ deferredModules.push.apply(deferredModules, executeModules || []); 49 | /******/ 50 | /******/ // run deferred modules when all chunks ready 51 | /******/ return checkDeferredModules(); 52 | /******/ }; 53 | /******/ function checkDeferredModules() { 54 | /******/ var result; 55 | /******/ for(var i = 0; i < deferredModules.length; i++) { 56 | /******/ var deferredModule = deferredModules[i]; 57 | /******/ var fulfilled = true; 58 | /******/ for(var j = 1; j < deferredModule.length; j++) { 59 | /******/ var depId = deferredModule[j]; 60 | /******/ if(installedChunks[depId] !== 0) fulfilled = false; 61 | /******/ } 62 | /******/ if(fulfilled) { 63 | /******/ deferredModules.splice(i--, 1); 64 | /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); 65 | /******/ } 66 | /******/ } 67 | /******/ 68 | /******/ return result; 69 | /******/ } 70 | /******/ 71 | /******/ // The module cache 72 | /******/ var installedModules = {}; 73 | /******/ 74 | /******/ // object to store loaded and loading chunks 75 | /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched 76 | /******/ // Promise = chunk loading, 0 = chunk loaded 77 | /******/ var installedChunks = { 78 | /******/ "index": 0 79 | /******/ }; 80 | /******/ 81 | /******/ var deferredModules = []; 82 | /******/ 83 | /******/ // The require function 84 | /******/ function __webpack_require__(moduleId) { 85 | /******/ 86 | /******/ // Check if module is in cache 87 | /******/ if(installedModules[moduleId]) { 88 | /******/ return installedModules[moduleId].exports; 89 | /******/ } 90 | /******/ // Create a new module (and put it into the cache) 91 | /******/ var module = installedModules[moduleId] = { 92 | /******/ i: moduleId, 93 | /******/ l: false, 94 | /******/ exports: {} 95 | /******/ }; 96 | /******/ 97 | /******/ // Execute the module function 98 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 99 | /******/ 100 | /******/ // Flag the module as loaded 101 | /******/ module.l = true; 102 | /******/ 103 | /******/ // Return the exports of the module 104 | /******/ return module.exports; 105 | /******/ } 106 | /******/ 107 | /******/ 108 | /******/ // expose the modules object (__webpack_modules__) 109 | /******/ __webpack_require__.m = modules; 110 | /******/ 111 | /******/ // expose the module cache 112 | /******/ __webpack_require__.c = installedModules; 113 | /******/ 114 | /******/ // define getter function for harmony exports 115 | /******/ __webpack_require__.d = function(exports, name, getter) { 116 | /******/ if(!__webpack_require__.o(exports, name)) { 117 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 118 | /******/ } 119 | /******/ }; 120 | /******/ 121 | /******/ // define __esModule on exports 122 | /******/ __webpack_require__.r = function(exports) { 123 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 124 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 125 | /******/ } 126 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); 127 | /******/ }; 128 | /******/ 129 | /******/ // create a fake namespace object 130 | /******/ // mode & 1: value is a module id, require it 131 | /******/ // mode & 2: merge all properties of value into the ns 132 | /******/ // mode & 4: return value when already ns object 133 | /******/ // mode & 8|1: behave like require 134 | /******/ __webpack_require__.t = function(value, mode) { 135 | /******/ if(mode & 1) value = __webpack_require__(value); 136 | /******/ if(mode & 8) return value; 137 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 138 | /******/ var ns = Object.create(null); 139 | /******/ __webpack_require__.r(ns); 140 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 141 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 142 | /******/ return ns; 143 | /******/ }; 144 | /******/ 145 | /******/ // getDefaultExport function for compatibility with non-harmony modules 146 | /******/ __webpack_require__.n = function(module) { 147 | /******/ var getter = module && module.__esModule ? 148 | /******/ function getDefault() { return module['default']; } : 149 | /******/ function getModuleExports() { return module; }; 150 | /******/ __webpack_require__.d(getter, 'a', getter); 151 | /******/ return getter; 152 | /******/ }; 153 | /******/ 154 | /******/ // Object.prototype.hasOwnProperty.call 155 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 156 | /******/ 157 | /******/ // __webpack_public_path__ 158 | /******/ __webpack_require__.p = ""; 159 | /******/ 160 | /******/ var jsonpArray = window["webpackJsonp_multiple_blocks_plugin"] = window["webpackJsonp_multiple_blocks_plugin"] || []; 161 | /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); 162 | /******/ jsonpArray.push = webpackJsonpCallback; 163 | /******/ jsonpArray = jsonpArray.slice(); 164 | /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); 165 | /******/ var parentJsonpFunction = oldJsonpFunction; 166 | /******/ 167 | /******/ 168 | /******/ // add entry module to deferred list 169 | /******/ deferredModules.push(["./blocks/buy-button/src/index.js","style-index"]); 170 | /******/ // run deferred modules when ready 171 | /******/ return checkDeferredModules(); 172 | /******/ }) 173 | /************************************************************************/ 174 | /******/ ({ 175 | 176 | /***/ "./blocks/buy-button/src/edit.js": 177 | /*!***************************************!*\ 178 | !*** ./blocks/buy-button/src/edit.js ***! 179 | \***************************************/ 180 | /*! exports provided: default */ 181 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 182 | 183 | "use strict"; 184 | __webpack_require__.r(__webpack_exports__); 185 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; }); 186 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 187 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 188 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); 189 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); 190 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); 191 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); 192 | /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./blocks/buy-button/src/editor.scss"); 193 | 194 | 195 | /** 196 | * Retrieves the translation of text. 197 | * 198 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 199 | */ 200 | 201 | /** 202 | * React hook that is used to mark the block wrapper element. 203 | * It provides all the necessary props like the class name. 204 | * 205 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 206 | */ 207 | 208 | 209 | /** 210 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 211 | * Those files can contain any CSS code that gets applied to the editor. 212 | * 213 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 214 | */ 215 | 216 | 217 | /** 218 | * The edit function describes the structure of your block in the context of the 219 | * editor. This represents what the editor will render when the block is used. 220 | * 221 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit 222 | * 223 | * @return {WPElement} Element to render. 224 | */ 225 | 226 | function Edit() { 227 | return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["useBlockProps"])(), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Multiple Blocks Plugin – hello from the editor!', 'multiple-blocks-plugin')); 228 | } 229 | 230 | /***/ }), 231 | 232 | /***/ "./blocks/buy-button/src/editor.scss": 233 | /*!*******************************************!*\ 234 | !*** ./blocks/buy-button/src/editor.scss ***! 235 | \*******************************************/ 236 | /*! no exports provided */ 237 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 238 | 239 | "use strict"; 240 | __webpack_require__.r(__webpack_exports__); 241 | // extracted by mini-css-extract-plugin 242 | 243 | 244 | /***/ }), 245 | 246 | /***/ "./blocks/buy-button/src/index.js": 247 | /*!****************************************!*\ 248 | !*** ./blocks/buy-button/src/index.js ***! 249 | \****************************************/ 250 | /*! no exports provided */ 251 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 252 | 253 | "use strict"; 254 | __webpack_require__.r(__webpack_exports__); 255 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); 256 | /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); 257 | /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./blocks/buy-button/src/style.scss"); 258 | /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./blocks/buy-button/src/edit.js"); 259 | /* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./blocks/buy-button/src/save.js"); 260 | /** 261 | * Registers a new block provided a unique name and an object defining its behavior. 262 | * 263 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 264 | */ 265 | 266 | /** 267 | * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. 268 | * All files containing `style` keyword are bundled together. The code used 269 | * gets applied both to the front of your site and to the editor. 270 | * 271 | * @see https://www.npmjs.com/package/@wordpress/scripts#using-css 272 | */ 273 | 274 | 275 | /** 276 | * Internal dependencies 277 | */ 278 | 279 | 280 | 281 | /** 282 | * Every block starts by registering a new block type definition. 283 | * 284 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ 285 | */ 286 | 287 | Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["registerBlockType"])('multiple-blocks-plugin/buy-button', { 288 | /** 289 | * @see ./edit.js 290 | */ 291 | edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"], 292 | 293 | /** 294 | * @see ./save.js 295 | */ 296 | save: _save__WEBPACK_IMPORTED_MODULE_3__["default"] 297 | }); 298 | 299 | /***/ }), 300 | 301 | /***/ "./blocks/buy-button/src/save.js": 302 | /*!***************************************!*\ 303 | !*** ./blocks/buy-button/src/save.js ***! 304 | \***************************************/ 305 | /*! exports provided: default */ 306 | /***/ (function(module, __webpack_exports__, __webpack_require__) { 307 | 308 | "use strict"; 309 | __webpack_require__.r(__webpack_exports__); 310 | /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return save; }); 311 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); 312 | /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); 313 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); 314 | /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); 315 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); 316 | /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); 317 | 318 | 319 | /** 320 | * Retrieves the translation of text. 321 | * 322 | * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/ 323 | */ 324 | 325 | /** 326 | * React hook that is used to mark the block wrapper element. 327 | * It provides all the necessary props like the class name. 328 | * 329 | * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps 330 | */ 331 | 332 | 333 | /** 334 | * The save function defines the way in which the different attributes should 335 | * be combined into the final markup, which is then serialized by the block 336 | * editor into `post_content`. 337 | * 338 | * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#save 339 | * 340 | * @return {WPElement} Element to render. 341 | */ 342 | 343 | function save() { 344 | return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["useBlockProps"].save(), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Multiple Blocks Plugin – hello from the saved content!', 'multiple-blocks-plugin')); 345 | } 346 | 347 | /***/ }), 348 | 349 | /***/ "@wordpress/block-editor": 350 | /*!*************************************!*\ 351 | !*** external ["wp","blockEditor"] ***! 352 | \*************************************/ 353 | /*! no static exports found */ 354 | /***/ (function(module, exports) { 355 | 356 | (function() { module.exports = window["wp"]["blockEditor"]; }()); 357 | 358 | /***/ }), 359 | 360 | /***/ "@wordpress/blocks": 361 | /*!********************************!*\ 362 | !*** external ["wp","blocks"] ***! 363 | \********************************/ 364 | /*! no static exports found */ 365 | /***/ (function(module, exports) { 366 | 367 | (function() { module.exports = window["wp"]["blocks"]; }()); 368 | 369 | /***/ }), 370 | 371 | /***/ "@wordpress/element": 372 | /*!*********************************!*\ 373 | !*** external ["wp","element"] ***! 374 | \*********************************/ 375 | /*! no static exports found */ 376 | /***/ (function(module, exports) { 377 | 378 | (function() { module.exports = window["wp"]["element"]; }()); 379 | 380 | /***/ }), 381 | 382 | /***/ "@wordpress/i18n": 383 | /*!******************************!*\ 384 | !*** external ["wp","i18n"] ***! 385 | \******************************/ 386 | /*! no static exports found */ 387 | /***/ (function(module, exports) { 388 | 389 | (function() { module.exports = window["wp"]["i18n"]; }()); 390 | 391 | /***/ }) 392 | 393 | /******/ }); 394 | //# sourceMappingURL=index.js.map --------------------------------------------------------------------------------