├── .editorconfig
├── .eslintrc
├── .github
└── workflows
│ ├── README.md
│ ├── contributor-details.yml
│ ├── github-contributors.yml
│ ├── release-zips.yml
│ ├── scripts
│ ├── fetch_contributor_details.sh
│ └── fetch_contributors.sh
│ └── static-linting.yml
├── .gitignore
├── .husky
└── pre-commit
├── .markdownlintignore
├── .nvmrc
├── .prettierrc.js
├── .stylelintrc
├── .wp-env.json
├── LICENSE
├── README.md
├── _app
├── .gitignore
├── README.md
├── eslint.config.js
├── index.html
├── package.json
├── postcss.config.js
├── public
│ └── WordPress.png
├── src
│ ├── App.css
│ ├── App.tsx
│ ├── components
│ │ ├── features
│ │ │ ├── Pagination.tsx
│ │ │ ├── SampleCard.tsx
│ │ │ └── SearchBar.tsx
│ │ └── layout
│ │ │ ├── Header.tsx
│ │ │ ├── SampleGrid.tsx
│ │ │ └── Sidebar.tsx
│ ├── index.css
│ ├── main.tsx
│ ├── types
│ │ └── Example.ts
│ ├── utils
│ │ └── contributors.ts
│ └── vite-env.d.ts
├── tailwind.config.js
├── tsconfig.app.json
├── tsconfig.json
├── tsconfig.node.json
├── tsconfig.node.tsbuildinfo
├── vite.config.d.ts
├── vite.config.js
└── vite.config.ts
├── _assets
├── cli
│ ├── create-example-copy.gif
│ └── create-example-new.gif
├── demo-create-example-copy.tape
├── demo-create-example-new.tape
└── icon-wp.svg
├── _bin
├── README.md
├── src
│ ├── constants.ts
│ ├── index.ts
│ ├── services
│ │ ├── DatesService.ts
│ │ └── tableMarkdown.ts
│ ├── types
│ │ ├── config.ts
│ │ ├── errors.ts
│ │ └── example.ts
│ └── utils
│ │ ├── compose.ts
│ │ ├── errors.ts
│ │ ├── fileOperations.ts
│ │ ├── logging.ts
│ │ └── validation.ts
└── tsconfig.json
├── _data
├── README.md
├── contributors.json
├── examples.json
└── tags.json
├── _tests
├── e2e
│ ├── __snapshots__
│ │ ├── Block-added-to-block-editor-block-development-examples-basic-block-translations-3df23d-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-basic-esnext-a2ab62-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-block-dynamic-rendering-64756b-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-block-static-rendering-b16608-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-block-supports-6aa4dd-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-block-toolbar-ab967f-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-copyright-date-block-09aac3-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-counter-alpine-99def1-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-counter-jquery-99def1-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-counter-js-99def1-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-counter-react-99def1-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-counter-web-component-99def1-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-dynamic-block-b0bce7-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-editable-block-1b8c51-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-inner-blocks-dcd824-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-interactivity-api-block-833d15-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-meta-block-bb1e55-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-minimal-block-ca6eda-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-minimal-block-no-build-e621a6-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-recipe-card-744e8a-1-chromium.txt
│ │ ├── Block-added-to-block-editor-block-development-examples-settings-sidebar-82c525-1-chromium.txt
│ │ └── Block-added-to-block-editor-block-development-examples-stylesheets-79a4c3-1-chromium.txt
│ └── insertion.spec.js
└── utils
│ └── getBlocksRepo.js
├── composer.json
├── composer.lock
├── package.json
├── phpcs.xml
├── playwright.config.js
├── plugins
├── basic-block-translations-3df23d
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── languages
│ │ ├── .gitkeep
│ │ ├── block-development-examples-es_ES-dfbff627e6c248bcb3b61d7d06da9ca9.json
│ │ ├── block-development-examples.pot
│ │ ├── es_ES.mo
│ │ └── es_ES.po
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ └── save.js
├── basic-esnext-a2ab62
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── plugin.php
│ ├── screenshot.png
│ └── src
│ │ ├── README.md
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ └── save.js
├── block-dynamic-rendering-64756b
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style-index.css
│ │ ├── view.asset.php
│ │ └── view.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.scss
│ │ └── view.js
├── block-static-rendering-b16608
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── style-index.css
│ │ ├── view.asset.php
│ │ └── view.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── save.js
│ │ ├── style.scss
│ │ └── view.js
├── block-supports-6aa4dd
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ └── style-index.css
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── save.js
│ │ └── style.scss
├── block-toolbar-ab967f
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _assets
│ │ └── block-toolbar-snapshot.png
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.js
│ │ └── style-index.css
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── save.js
│ │ └── style.scss
├── copyright-date-block-09aac3
│ ├── .wp-env.json
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ └── render.php
│ ├── copyright-date-block.php
│ ├── package.json
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── save.js
│ │ └── style.scss
├── data-basics-59c8f8
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ └── blueprint.json
│ ├── build
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ └── style-index.css
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── components
│ │ ├── CreatePageButton.js
│ │ ├── CreatePageForm.js
│ │ ├── DeletePageButton.js
│ │ ├── EditPageForm.js
│ │ ├── Notifications.js
│ │ ├── PageEditButton.js
│ │ ├── PageForm.js
│ │ ├── PagesList.js
│ │ └── index.js
│ │ ├── index.js
│ │ └── style.scss
├── dynamic-block-b0bce7
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── render.php
│ │ └── style-index.css
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.scss
│ │ └── view.js
├── editable-block-1b8c51
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ └── blocks
│ │ │ ├── basic-editable-block-1b8c51
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── style-index.css
│ │ │ ├── basic-editable-block-no-build-1b8c51
│ │ │ ├── block.asset.php
│ │ │ ├── block.js
│ │ │ ├── block.json
│ │ │ ├── editor.css
│ │ │ └── style.css
│ │ │ └── enhanced-editable-block-1b8c51
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── style-index.css
│ ├── e2e
│ │ └── basic.spec.js
│ ├── languages
│ │ └── .gitkeep
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ └── blocks
│ │ ├── basic-editable-block-1b8c51
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.css
│ │ ├── index.js
│ │ ├── save.js
│ │ └── style.css
│ │ ├── basic-editable-block-no-build-1b8c51
│ │ ├── block.asset.php
│ │ ├── block.js
│ │ ├── block.json
│ │ ├── editor.css
│ │ └── style.css
│ │ └── enhanced-editable-block-1b8c51
│ │ ├── block.json
│ │ ├── css
│ │ ├── editor.css
│ │ └── style.css
│ │ ├── index.js
│ │ └── js
│ │ ├── edit.js
│ │ ├── save.js
│ │ ├── useCharLimit.js
│ │ └── withCharLimit.js
├── format-api-f14b86
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _assets
│ │ └── format-api-snapshot.png
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── format-api-f14b86.asset.php
│ │ └── format-api-f14b86.js
│ ├── package.json
│ ├── plugin.php
│ ├── src
│ │ └── format-api-f14b86.js
│ └── webpack.config.js
├── inner-blocks-dcd824
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.css.map
│ │ ├── index.js
│ │ └── index.js.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ └── save.js
├── interactive-blocks-demos-99def1
│ ├── .babelrc
│ ├── README.md
│ ├── _assets
│ │ └── interactive-blocks-talk-slides.pdf
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── counter-alpine-99def1
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── style-index.css
│ │ ├── counter-jquery-99def1
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ ├── style-index.css
│ │ │ ├── view.asset.php
│ │ │ └── view.js
│ │ ├── counter-js-99def1
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ ├── style-index.css
│ │ │ ├── view.asset.php
│ │ │ └── view.js
│ │ ├── counter-react-99def1
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ ├── style-index.css
│ │ │ ├── view.asset.php
│ │ │ └── view.js
│ │ └── counter-web-component-99def1
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ ├── style-index.css
│ │ │ ├── view.asset.php
│ │ │ └── view.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── counter-alpine-99def1
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── save.js
│ │ └── style.css
│ │ ├── counter-jquery-99def1
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── save.js
│ │ ├── style.css
│ │ └── view.js
│ │ ├── counter-js-99def1
│ │ ├── block.json
│ │ ├── docs
│ │ │ └── README.md
│ │ ├── edit.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── save.js
│ │ ├── style.css
│ │ └── view.js
│ │ ├── counter-react-99def1
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── save.js
│ │ ├── style.css
│ │ └── view.js
│ │ └── counter-web-component-99def1
│ │ ├── README.md
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── save.js
│ │ ├── style.css
│ │ └── view.js
├── interactivity-api-countdown-3cd73e
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style-index.css
│ │ ├── view.asset.php
│ │ └── view.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.scss
│ │ └── view.js
├── interactivity-api-quiz-1835fa
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ └── blocks
│ │ │ ├── quiz-1835fa
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.css.map
│ │ │ ├── index.js
│ │ │ ├── index.js.map
│ │ │ ├── render.php
│ │ │ ├── style-index.css
│ │ │ ├── style-index.css.map
│ │ │ ├── view.asset.php
│ │ │ ├── view.js
│ │ │ └── view.js.map
│ │ │ └── quiz-progress-1835fa
│ │ │ ├── block.json
│ │ │ ├── index.asset.php
│ │ │ ├── index.js
│ │ │ ├── index.js.map
│ │ │ ├── render.php
│ │ │ ├── view.asset.php
│ │ │ ├── view.js
│ │ │ └── view.js.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ └── blocks
│ │ ├── quiz-1835fa
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editControls.js
│ │ ├── editor.css
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.css
│ │ └── view.js
│ │ └── quiz-progress-1835fa
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ ├── render.php
│ │ └── view.js
├── interactivity-router-2f43f8
│ ├── .wp-env.json
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ ├── export.xml
│ │ └── images
│ │ │ ├── george-harrison.webp
│ │ │ ├── john-lennon.webp
│ │ │ ├── paul-mccartney.webp
│ │ │ └── ringo-starr.webp
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.css.map
│ │ ├── index.js
│ │ ├── index.js.map
│ │ ├── render.php
│ │ ├── style-index.css
│ │ ├── style-index.css.map
│ │ ├── view.asset.php
│ │ ├── view.js
│ │ └── view.js.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ ├── inspectorControls.js
│ │ ├── render.php
│ │ ├── save.js
│ │ ├── style.scss
│ │ └── view.js
├── meta-block-bb1e55
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ ├── index.js.map
│ │ ├── render.php
│ │ ├── style-index-rtl.css
│ │ ├── style-index.css
│ │ └── style-index.css.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ └── style.scss
├── minimal-block-ca6eda
│ ├── .wp-env.json
│ ├── README.md
│ ├── _assets
│ │ ├── block-json-and-js.png
│ │ └── index-php.png
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ └── index.js
├── minimal-block-no-build-e621a6
│ ├── README.md
│ ├── _playground
│ │ └── blueprint.json
│ ├── block.asset.php
│ ├── block.js
│ ├── block.json
│ ├── package.json
│ └── plugin.php
├── my-first-interactive-block
│ ├── .wp-env.json
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.css.map
│ │ ├── index.js
│ │ ├── index.js.map
│ │ ├── render.php
│ │ ├── style-index.css
│ │ ├── style-index.css.map
│ │ ├── view.asset.php
│ │ ├── view.js
│ │ └── view.js.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.scss
│ │ └── view.js
├── non-block-react-wp-data-56d6f3
│ ├── README.md
│ ├── _playground
│ │ └── blueprint.json
│ ├── build
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── components
│ │ ├── Counter.js
│ │ └── CounterList.js
│ │ ├── index.js
│ │ └── store
│ │ ├── actions.js
│ │ ├── index.js
│ │ ├── reducer.js
│ │ └── selectors.js
├── plugin-sidebar-9ee4a6
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _assets
│ │ └── screenshot.png
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── plugin-sidebar-9ee4a6.asset.php
│ │ └── plugin-sidebar-9ee4a6.js
│ ├── package.json
│ ├── plugin.php
│ ├── src
│ │ └── plugin-sidebar-9ee4a6.js
│ └── webpack.config.js
├── post-meta-modal-2502fb
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _assets
│ │ └── post-meta-modal.gif
│ ├── _playground
│ │ └── blueprint.json
│ ├── build
│ │ ├── index-rtl.css
│ │ ├── index.asset.php
│ │ ├── index.css
│ │ ├── index.css.map
│ │ ├── index.js
│ │ └── index.js.map
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── index.js
│ │ └── index.scss
├── post-meta-testimonial
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── build
│ │ └── post-meta-testimonial
│ │ │ ├── block.json
│ │ │ ├── index-rtl.css
│ │ │ ├── index.asset.php
│ │ │ ├── index.css
│ │ │ ├── index.css.map
│ │ │ ├── index.js
│ │ │ ├── index.js.map
│ │ │ ├── render.php
│ │ │ ├── style-index-rtl.css
│ │ │ ├── style-index.css
│ │ │ ├── style-index.css.map
│ │ │ ├── view.asset.php
│ │ │ ├── view.js
│ │ │ └── view.js.map
│ ├── package.json
│ ├── post-meta-testimonial.php
│ ├── readme.txt
│ └── src
│ │ └── post-meta-testimonial
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── editor.scss
│ │ ├── index.js
│ │ ├── render.php
│ │ ├── style.scss
│ │ └── view.js
├── recipe-card-744e8a
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ ├── export.xml
│ │ └── spaghetti.png
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ ├── index.js
│ │ └── style-index.css
│ ├── languages
│ │ └── .gitkeep
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ ├── save.js
│ │ └── style.scss
├── server-side-render-block-d26119
│ ├── .editorconfig
│ ├── .eslintrc
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ └── blueprint.json
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── server-side-render-block-d26119.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ └── index.js
├── settings-sidebar-82c525
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint.json
│ │ └── export.xml
│ ├── build
│ │ ├── block.json
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── block.json
│ │ ├── edit.js
│ │ ├── index.js
│ │ └── save.js
├── slotfill-2fb190
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _playground
│ │ ├── blueprint-slot1.json
│ │ ├── blueprint-slot2.json
│ │ └── blueprint.json
│ ├── build
│ │ ├── index.asset.php
│ │ └── index.js
│ ├── package.json
│ ├── plugin.php
│ └── src
│ │ ├── index.js
│ │ ├── slotfill-PluginDocumentSettingPanel-2fb190.js
│ │ └── slotfill-PluginSidebar-2fb190.js
└── stylesheets-79a4c3
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── _assets
│ ├── frontend-view.png
│ ├── source-code-html-output.png
│ └── source-code-style-html.png
│ ├── _playground
│ ├── blueprint.json
│ └── export.xml
│ ├── build
│ ├── block.json
│ ├── index.asset.php
│ ├── index.css
│ ├── index.js
│ └── style-index.css
│ ├── package.json
│ ├── plugin.php
│ └── src
│ ├── README.md
│ ├── block.json
│ ├── edit.js
│ ├── editor.scss
│ ├── index.js
│ ├── save.js
│ ├── style.scss
│ └── view.js
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── templates
└── block-examples
├── index.js
├── readmes
└── README-EXAMPLE.tpl.md
└── templates
├── block
├── $slug.js.mustache
├── edit.js.mustache
├── editor.scss.mustache
├── index.js.mustache
├── render.php.mustache
├── save.js.mustache
├── style.scss.mustache
└── view.js.mustache
└── plugin
├── $slug.php.mustache
├── .editorconfig.mustache
├── .eslintrc.mustache
├── .gitignore.mustache
├── README.md.mustache
└── webpack.config.js.mustache
/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest/globals": true
4 | },
5 | "plugins": [ "jest" ],
6 | "extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
7 | "ignorePatterns": [
8 | "_bin/**/*",
9 | "_app/**/*",
10 | "plugins/minimal-block-no-build-e621a6/**/*.js",
11 | "plugins/**/e2e/*.js",
12 | "build/**/*"
13 | ],
14 | "rules": {
15 | "@wordpress/i18n-text-domain": [
16 | "error",
17 | {
18 | "allowedTextDomain": "block-development-examples"
19 | }
20 | ],
21 | "no-console": "off",
22 | "jsdoc/no-undefined-types": "off"
23 | },
24 | "overrides": [
25 | {
26 | "files": [ "_app/**/*.js" ],
27 | "rules": {
28 | "import/no-unresolved": "off"
29 | }
30 | }
31 | ],
32 | "globals": {
33 | "jQuery": "readonly",
34 | "HTMLElement": true
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | npx lint-staged
5 |
--------------------------------------------------------------------------------
/.markdownlintignore:
--------------------------------------------------------------------------------
1 | _bin/
2 | node_modules/
3 | vendor/
4 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/*
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | // Import the default config file and expose it in the project root.
2 | // Configure arrays to display each element on a new line
3 | const config = {
4 | ...require( '@wordpress/prettier-config' ),
5 | overrides: [
6 | {
7 | files: [ '*.json' ],
8 | options: {
9 | parser: 'json',
10 | printWidth: 1,
11 | },
12 | },
13 | // Configure SCSS files to use double quotes
14 | {
15 | files: [ '*.scss' ],
16 | options: {
17 | singleQuote: false,
18 | },
19 | },
20 | ],
21 | };
22 | // Useful for editor integrations.
23 | module.exports = config;
24 |
--------------------------------------------------------------------------------
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [ "@wordpress/stylelint-config/scss" ],
3 | "ignoreFiles": [ "_app/**/*.css", "plugins/**/build/**/*.css" ],
4 | "rules": {
5 | "function-parentheses-space-inside": null,
6 | "selector-pseudo-class-parentheses-space-inside": null,
7 | "selector-class-pattern": null
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.wp-env.json:
--------------------------------------------------------------------------------
1 | {
2 | "phpVersion": "7.4",
3 | "plugins": [
4 | "https://downloads.wordpress.org/plugin/gutenberg.zip"
5 | ],
6 | "config": {
7 | "WP_DEBUG": true,
8 | "WP_DEBUG_LOG": true,
9 | "WP_DEBUG_DISPLAY": true,
10 | "SCRIPT_DEBUG": true
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_app/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/_app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Block Development Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_app/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/_app/public/WordPress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/_app/public/WordPress.png
--------------------------------------------------------------------------------
/_app/src/App.css:
--------------------------------------------------------------------------------
1 | #root {
2 | max-width: 1280px;
3 | margin: 0 auto;
4 | padding: 2rem;
5 | text-align: center;
6 | }
7 |
8 | .logo {
9 | height: 6em;
10 | padding: 1.5em;
11 | will-change: filter;
12 | transition: filter 300ms;
13 | }
14 | .logo:hover {
15 | filter: drop-shadow(0 0 2em #646cffaa);
16 | }
17 | .logo.react:hover {
18 | filter: drop-shadow(0 0 2em #61dafbaa);
19 | }
20 |
21 | @keyframes logo-spin {
22 | from {
23 | transform: rotate(0deg);
24 | }
25 | to {
26 | transform: rotate(360deg);
27 | }
28 | }
29 |
30 | @media (prefers-reduced-motion: no-preference) {
31 | a:nth-of-type(2) .logo {
32 | animation: logo-spin infinite 20s linear;
33 | }
34 | }
35 |
36 | .card {
37 | padding: 2em;
38 | }
39 |
40 | .read-the-docs {
41 | color: #888;
42 | }
43 |
--------------------------------------------------------------------------------
/_app/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | margin: 0;
7 | min-width: 320px;
8 | }
9 |
10 | code::after,
11 | code::before {
12 | content: "" !important;
13 | }
14 |
--------------------------------------------------------------------------------
/_app/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom/client";
3 | import App from "./App.tsx";
4 | import "./index.css";
5 |
6 | ReactDOM.createRoot(document.getElementById("root")!).render(
7 |
8 |
9 |
10 | );
11 |
--------------------------------------------------------------------------------
/_app/src/types/Example.ts:
--------------------------------------------------------------------------------
1 | export interface Example {
2 | slug: string;
3 | name: string;
4 | description: string;
5 | tags: string[];
6 | contributors: string[];
7 | created: string;
8 | lastModified: string;
9 | }
10 |
--------------------------------------------------------------------------------
/_app/src/utils/contributors.ts:
--------------------------------------------------------------------------------
1 | import contributors from "../data/contributors.json";
2 |
3 | export function getContributorInfo(username: string) {
4 | const contributor = contributors.find((c) => c.username === username);
5 | return {
6 | username,
7 | name: contributor?.name || username,
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/_app/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_app/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | export default {
3 | content: [ './index.html', './src/**/*.{js,ts,jsx,tsx}' ],
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [ require( '@tailwindcss/typography' ) ],
8 | };
9 |
--------------------------------------------------------------------------------
/_app/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4 | "target": "ES2020",
5 | "useDefineForClassFields": true,
6 | "lib": [
7 | "ES2020",
8 | "DOM",
9 | "DOM.Iterable"
10 | ],
11 | "module": "ESNext",
12 | "skipLibCheck": true,
13 |
14 | /* Bundler mode */
15 | "moduleResolution": "Bundler",
16 | "allowImportingTsExtensions": true,
17 | "isolatedModules": true,
18 | "moduleDetection": "force",
19 | "noEmit": true,
20 | "jsx": "react-jsx",
21 |
22 | /* Linting */
23 | "strict": true,
24 | "noUnusedLocals": true,
25 | "noUnusedParameters": true,
26 | "noFallthroughCasesInSwitch": true,
27 | "noUncheckedSideEffectImports": true
28 | },
29 | "include": [
30 | "src"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/_app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "useDefineForClassFields": true,
5 | "lib": ["ES2020", "DOM", "DOM.Iterable"],
6 | "module": "ESNext",
7 | "skipLibCheck": true,
8 | "moduleResolution": "bundler",
9 | "allowImportingTsExtensions": true,
10 | "resolveJsonModule": true,
11 | "isolatedModules": true,
12 | "noEmit": true,
13 | "jsx": "react-jsx",
14 | "strict": true,
15 | "noUnusedLocals": true,
16 | "noUnusedParameters": true,
17 | "noFallthroughCasesInSwitch": true
18 | },
19 | "include": ["src"],
20 | "references": [{ "path": "./tsconfig.node.json" }]
21 | }
22 |
--------------------------------------------------------------------------------
/_app/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/_app/vite.config.d.ts:
--------------------------------------------------------------------------------
1 | declare const _default: import('vite').UserConfig;
2 | export default _default;
3 |
--------------------------------------------------------------------------------
/_app/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import react from '@vitejs/plugin-react';
3 | export default defineConfig( {
4 | plugins: [ react() ],
5 | base: '/block-development-examples/',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | } );
10 |
--------------------------------------------------------------------------------
/_app/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import react from '@vitejs/plugin-react';
3 |
4 | export default defineConfig( {
5 | plugins: [ react() ],
6 | base: '/block-development-examples/',
7 | build: {
8 | outDir: 'dist',
9 | },
10 | } );
11 |
--------------------------------------------------------------------------------
/_assets/cli/create-example-copy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/_assets/cli/create-example-copy.gif
--------------------------------------------------------------------------------
/_assets/cli/create-example-new.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/_assets/cli/create-example-new.gif
--------------------------------------------------------------------------------
/_bin/src/types/config.ts:
--------------------------------------------------------------------------------
1 | export interface TableGenerationConfig {
2 | slug?: string;
3 | readmePath: string;
4 | options?: TableOptions;
5 | urls: UrlConfig;
6 | }
7 |
8 | export interface TableOptions {
9 | includeTags?: boolean;
10 | includeDescription?: boolean;
11 | includeLinks?: boolean;
12 | }
13 |
14 | export interface UrlConfig {
15 | wiki: string;
16 | assets: string;
17 | repo: string;
18 | exampleZip: string;
19 | playground: {
20 | base: string;
21 | withGutenberg: string;
22 | blueprint: string;
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/_bin/src/types/example.ts:
--------------------------------------------------------------------------------
1 | export interface Example {
2 | slug: string;
3 | name: string;
4 | description: string;
5 | tags: string[];
6 | contributors?: string[];
7 | folder?: string;
8 | id?: string;
9 | created?: string;
10 | lastModified?: string;
11 | }
12 |
13 | export interface Tag {
14 | slug: string;
15 | name: string;
16 | }
17 |
18 | export interface ProcessedTags {
19 | [ key: string ]: string;
20 | }
21 |
--------------------------------------------------------------------------------
/_bin/src/utils/compose.ts:
--------------------------------------------------------------------------------
1 | import { error } from './logging';
2 |
3 | /**
4 | * Composes a function with error handling
5 | * @param fn The function to compose with error handling
6 | */
7 | export const withErrorHandling = < T extends ( ...args: any[] ) => any >(
8 | fn: T
9 | ): T => {
10 | return ( ( ...args: Parameters< T > ): ReturnType< T > => {
11 | try {
12 | return fn( ...args );
13 | } catch ( err ) {
14 | error( `❌ ${ ( err as Error ).message }` );
15 | process.exit( 1 );
16 | throw err; // TypeScript needs this even though we exit
17 | }
18 | } ) as T;
19 | };
20 |
--------------------------------------------------------------------------------
/_bin/src/utils/logging.ts:
--------------------------------------------------------------------------------
1 | export const info = ( message: string ): void => {
2 | console.log( message );
3 | };
4 |
5 | export const error = ( message: string ): void => {
6 | console.error( message );
7 | };
8 |
--------------------------------------------------------------------------------
/_bin/src/utils/validation.ts:
--------------------------------------------------------------------------------
1 | import { TableGenerationConfig } from '../types/config';
2 | import { ValidationError } from '../types/errors';
3 |
4 | export const validateConfig = ( config: TableGenerationConfig ): void => {
5 | if ( ! config.readmePath ) {
6 | throw new ValidationError( 'readmePath is required in configuration' );
7 | }
8 |
9 | if ( config.slug && typeof config.slug !== 'string' ) {
10 | throw new ValidationError( 'slug must be a string when provided' );
11 | }
12 |
13 | if ( ! config.readmePath.endsWith( '.md' ) ) {
14 | throw new ValidationError( 'readmePath must point to a markdown file' );
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/_bin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2020",
4 | "module": "CommonJS",
5 | "outDir": "./dist",
6 | "rootDir": "./",
7 | "strict": true,
8 | "esModuleInterop": true,
9 | "skipLibCheck": true,
10 | "forceConsistentCasingInFileNames": true
11 | },
12 | "include": [ "./**/*.ts" ],
13 | "exclude": [ "node_modules", "dist" ]
14 | }
15 |
--------------------------------------------------------------------------------
/_data/contributors.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "username": "adamziel",
4 | "name": "Adam Zieliński"
5 | },
6 | {
7 | "username": "fai-sal",
8 | "name": "Faisal Ahmed"
9 | },
10 | {
11 | "username": "flexseth",
12 | "name": "Seth Miller"
13 | },
14 | {
15 | "username": "juanmaguitar",
16 | "name": "JuanMa"
17 | },
18 | {
19 | "username": "luisherranz",
20 | "name": "Luis Herranz"
21 | },
22 | {
23 | "username": "ndiego",
24 | "name": "Nick Diego"
25 | },
26 | {
27 | "username": "ryanwelcher",
28 | "name": "Ryan Welcher"
29 | }
30 | ]
31 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-basic-block-translations-3df23d-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Hello World!! (from the frontend).
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-basic-esnext-a2ab62-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Hello World, step 1 (from the frontend).
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-block-dynamic-rendering-64756b-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-block-static-rendering-b16608-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | 02 Block with Static Rendering – hello from the saved content!
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-block-supports-6aa4dd-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-block-toolbar-ab967f-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-copyright-date-block-09aac3-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | © 2023
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-counter-alpine-99def1-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-counter-jquery-99def1-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-counter-js-99def1-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-counter-react-99def1-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-counter-web-component-99def1-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Web Components Counter
Attributes
{
3 | "initial": 0,
4 | "increment": 5
5 | }
6 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-dynamic-block-b0bce7-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-editable-block-1b8c51-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-inner-blocks-dcd824-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-interactivity-api-block-833d15-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-meta-block-bb1e55-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-minimal-block-ca6eda-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Hello World - Frontend
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-minimal-block-no-build-e621a6-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Hello World - Frontend
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-recipe-card-744e8a-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-settings-sidebar-82c525-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/_tests/e2e/__snapshots__/Block-added-to-block-editor-block-development-examples-stylesheets-79a4c3-1-chromium.txt:
--------------------------------------------------------------------------------
1 |
2 | Hello World, step 2 (from the frontend, in red).
3 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wordpress/block-development-examples",
3 | "require-dev": {
4 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
5 | "squizlabs/php_codesniffer": "^3.6",
6 | "wp-coding-standards/wpcs": "^3.0"
7 | },
8 | "scripts": {
9 | "lint": "./vendor/bin/phpcs --standard=phpcs.xml",
10 | "fix": "./vendor/bin/phpcbf --standard=phpcs.xml"
11 | },
12 | "config": {
13 | "allow-plugins": {
14 | "squizlabs/php_codesniffer": true,
15 | "dealerdirect/phpcodesniffer-composer-installer": true,
16 | "wp-coding-standards/wpcs": true
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/phpcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | .
6 |
7 | */vendor/*
8 | */build/*
9 | */node_modules/*
10 | **/*.asset.php
11 |
12 |
--------------------------------------------------------------------------------
/playwright.config.js:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line import/no-unresolved
2 | import { defineConfig } from '@playwright/test';
3 |
4 | const baseConfig = require( '@wordpress/scripts/config/playwright.config.js' );
5 | const config = defineConfig( {
6 | ...baseConfig,
7 | testDir: './_tests/e2e',
8 | } );
9 | export default config;
10 |
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/basic-block-translations-3df23d",
5 | "title": "Basic block Translations",
6 | "textdomain": "block-development-examples",
7 | "icon": "smiley",
8 | "category": "widgets",
9 | "example": {},
10 | "editorScript": "file:./index.js",
11 | "keywords": [
12 | "3df23d"
13 | ]
14 | }
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'dac6e751c26d2f27648a');
2 |
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/build/index.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};e.d({},{V:()=>d});const o=window.wp.blocks,t=JSON.parse('{"UU":"block-development-examples/basic-block-translations-3df23d"}'),r=window.React,l=window.wp.i18n,n=window.wp.blockEditor,d={backgroundColor:"#900",color:"#fff",padding:"20px"},{UU:s}=t;(0,o.registerBlockType)(s,{edit:()=>{const e=(0,n.useBlockProps)({style:d});return(0,r.createElement)("div",{...e},(0,l.__)("Hello World!! (from the editor).","block-development-examples"))},save:()=>{const e=n.useBlockProps.save({style:d});return(0,r.createElement)("div",{...e},(0,l.__)("Hello World!! (from the frontend).","block-development-examples"))}})})();
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/languages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/basic-block-translations-3df23d/languages/.gitkeep
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/languages/block-development-examples-es_ES-dfbff627e6c248bcb3b61d7d06da9ca9.json:
--------------------------------------------------------------------------------
1 | {"translation-revision-date":"2023-10-10 11:04+0100","generator":"WP-CLI\/2.7.1","source":"build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"Hello World!! (from the editor).":["\u00a1\u00a1Hola Mundo!! (desde el editor)"],"Hello World!! (from the frontend).":["\u00a1\u00a1Hola Mundo!! (desde el frontend)"]}}}
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/languages/es_ES.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/basic-block-translations-3df23d/languages/es_ES.mo
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/basic-block-translations-3df23d",
5 | "title": "Basic block Translations",
6 | "textdomain": "block-development-examples",
7 | "icon": "smiley",
8 | "category": "widgets",
9 | "example": {},
10 | "editorScript": "file:./index.js",
11 | "keywords": [ "3df23d" ]
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/src/edit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { __ } from '@wordpress/i18n';
5 | import { useBlockProps } from '@wordpress/block-editor';
6 |
7 | /**
8 | * Internal dependencies
9 | */
10 | import { blockStyle } from './index';
11 |
12 | const Edit = () => {
13 | const blockProps = useBlockProps( { style: blockStyle } );
14 | return (
15 |
16 | { __(
17 | 'Hello World!! (from the editor).',
18 | 'block-development-examples'
19 | ) }
20 |
21 | );
22 | };
23 | export default Edit;
24 |
--------------------------------------------------------------------------------
/plugins/basic-block-translations-3df23d/src/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { __ } from '@wordpress/i18n';
5 | import { useBlockProps } from '@wordpress/block-editor';
6 |
7 | /**
8 | * Internal dependencies
9 | */
10 | import { blockStyle } from './index';
11 |
12 | const Save = () => {
13 | const blockProps = useBlockProps.save( { style: blockStyle } );
14 | return (
15 |
16 | { __(
17 | 'Hello World!! (from the frontend).',
18 | 'block-development-examples'
19 | ) }
20 |
21 | );
22 | };
23 | export default Save;
24 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/basic-esnext-a2ab62",
5 | "version": "0.1.0",
6 | "title": "Basic Esnext a2ab62",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "keywords": [
14 | "a2ab62"
15 | ]
16 | }
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '9a27c1f28749b329c7ff');
2 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/build/index.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};e.d({},{V:()=>s});const o=window.wp.blocks,t=JSON.parse('{"UU":"block-development-examples/basic-esnext-a2ab62"}'),r=window.React,l=window.wp.i18n,n=window.wp.blockEditor,s={backgroundColor:"#900",color:"#fff",padding:"20px"},{UU:c}=t;(0,o.registerBlockType)(c,{edit:()=>{const e=(0,n.useBlockProps)({style:s});return(0,r.createElement)("div",{...e},(0,l.__)("Hello World, step 1 (from the editor).","block-development-examples"))},save:()=>{const e=n.useBlockProps.save({style:s});return(0,r.createElement)("div",{...e},(0,l.__)("Hello World, step 1 (from the frontend).","block-development-examples"))}})})();
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/basic-esnext-a2ab62",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/basic-esnext-a2ab62/screenshot.png
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/src/README.md:
--------------------------------------------------------------------------------
1 | ### Basic Esnext a2ab62
2 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/basic-esnext-a2ab62",
5 | "version": "0.1.0",
6 | "title": "Basic Esnext a2ab62",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "keywords": [
14 | "a2ab62"
15 | ]
16 | }
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/src/edit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { __ } from '@wordpress/i18n';
5 | import { useBlockProps } from '@wordpress/block-editor';
6 |
7 | /**
8 | * Internal dependencies
9 | */
10 | import { blockStyle } from './index';
11 |
12 | const Edit = () => {
13 | const blockProps = useBlockProps( { style: blockStyle } );
14 | return (
15 |
16 | { __(
17 | 'Hello World, step 1 (from the editor).',
18 | 'block-development-examples'
19 | ) }
20 |
21 | );
22 | };
23 | export default Edit;
24 |
--------------------------------------------------------------------------------
/plugins/basic-esnext-a2ab62/src/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { __ } from '@wordpress/i18n';
5 | import { useBlockProps } from '@wordpress/block-editor';
6 |
7 | /**
8 | * Internal dependencies
9 | */
10 | import { blockStyle } from './index';
11 |
12 | const Save = () => {
13 | const blockProps = useBlockProps.save( { style: blockStyle } );
14 | return (
15 |
16 | { __(
17 | 'Hello World, step 1 (from the frontend).',
18 | 'block-development-examples'
19 | ) }
20 |
21 | );
22 | };
23 | export default Save;
24 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/block-dynamic-rendering-64756b",
5 | "version": "0.1.0",
6 | "title": "Block Dynamic Rendering",
7 | "category": "widgets",
8 | "icon": "smiley",
9 | "description": "Example block scaffolded with Create Block tool.",
10 | "example": {},
11 | "supports": {
12 | "html": false
13 | },
14 | "keywords": [
15 | "64756b"
16 | ],
17 | "textdomain": "01-block-dynamic",
18 | "editorScript": "file:./index.js",
19 | "editorStyle": "file:./index.css",
20 | "style": "file:./style-index.css",
21 | "render": "file:./render.php",
22 | "viewScript": "file:./view.js"
23 | }
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '78def22dbda6fea8738e');
2 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-dynamic-rendering-64756b{border:1px dotted red}
2 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/render.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
20 |
21 | >
22 |
23 |
24 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-dynamic-rendering-64756b{background-color:#21759b;color:#fff;padding:2px}
2 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => 'd5ed1a1e24c8249dbd8c');
2 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/build/view.js:
--------------------------------------------------------------------------------
1 | console.log("Hello World! (from create-block-block-dynamic-rendering)");
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/block-dynamic-rendering-64756b",
5 | "version": "0.1.0",
6 | "title": "Block Dynamic Rendering",
7 | "category": "widgets",
8 | "icon": "smiley",
9 | "description": "Example block scaffolded with Create Block tool.",
10 | "example": {},
11 | "supports": {
12 | "html": false
13 | },
14 | "keywords": [ "64756b" ],
15 | "textdomain": "01-block-dynamic",
16 | "editorScript": "file:./index.js",
17 | "editorStyle": "file:./index.css",
18 | "style": "file:./style-index.css",
19 | "render": "file:./render.php",
20 | "viewScript": "file:./view.js"
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/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-block-development-examples-block-dynamic-rendering-64756b {
8 | border: 1px dotted #f00;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/src/render.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
20 |
21 | >
22 |
23 |
24 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/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-block-development-examples-block-dynamic-rendering-64756b {
9 | background-color: #21759b;
10 | color: #fff;
11 | padding: 2px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/block-dynamic-rendering-64756b/src/view.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Use this file for JavaScript code that you want to run in the front-end
3 | * on posts/pages that contain this block.
4 | *
5 | * When this file is defined as the value of the `viewScript` property
6 | * in `block.json` it will be enqueued on the front end of the site.
7 | *
8 | * Example:
9 | *
10 | * ```js
11 | * {
12 | * "viewScript": "file:./view.js"
13 | * }
14 | * ```
15 | *
16 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script
17 | */
18 |
19 | /* eslint-disable no-console */
20 | console.log( 'Hello World! (from create-block-block-dynamic-rendering)' );
21 | /* eslint-enable no-console */
22 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/block-static-rendering-b16608",
5 | "version": "0.1.0",
6 | "title": "⭐️ Block with Static Rendering",
7 | "category": "widgets",
8 | "icon": "smiley",
9 | "description": "Example block scaffolded with Create Block tool.",
10 | "example": {},
11 | "keywords": [
12 | "b16608"
13 | ],
14 | "supports": {
15 | "html": false
16 | },
17 | "textdomain": "02-block-static",
18 | "editorScript": "file:./index.js",
19 | "editorStyle": "file:./index.css",
20 | "style": "file:./style-index.css",
21 | "viewScript": "file:./view.js"
22 | }
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '568d76548ebf72a732f0');
2 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-static-rendering-b16608{border:1px dotted red}
2 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-static-rendering-b16608{background-color:#21759b;color:#fff;padding:2px}
2 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => 'c60091ee7981f683d70c');
2 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/build/view.js:
--------------------------------------------------------------------------------
1 | console.log("Hello World! (from create-block-02-block-static block)");
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/block-static-rendering-b16608",
5 | "version": "0.1.0",
6 | "title": "⭐️ Block with Static Rendering",
7 | "category": "widgets",
8 | "icon": "smiley",
9 | "description": "Example block scaffolded with Create Block tool.",
10 | "example": {},
11 | "keywords": [ "b16608" ],
12 | "supports": {
13 | "html": false
14 | },
15 | "textdomain": "02-block-static",
16 | "editorScript": "file:./index.js",
17 | "editorStyle": "file:./index.css",
18 | "style": "file:./style-index.css",
19 | "viewScript": "file:./view.js"
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/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-block-development-examples-block-static-rendering-b16608 {
8 | border: 1px dotted #f00;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/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-block-development-examples-block-static-rendering-b16608 {
9 | background-color: #21759b;
10 | color: #fff;
11 | padding: 2px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/block-static-rendering-b16608/src/view.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Use this file for JavaScript code that you want to run in the front-end
3 | * on posts/pages that contain this block.
4 | *
5 | * When this file is defined as the value of the `viewScript` property
6 | * in `block.json` it will be enqueued on the front end of the site.
7 | *
8 | * Example:
9 | *
10 | * ```js
11 | * {
12 | * "viewScript": "file:./view.js"
13 | * }
14 | * ```
15 | *
16 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script
17 | */
18 |
19 | /* eslint-disable no-console */
20 | console.log( 'Hello World! (from create-block-02-block-static block)' );
21 | /* eslint-enable no-console */
22 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks'), 'version' => '0ea371913da20a87aa76');
2 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-supports-6aa4dd{background:#fcc;border:2px solid #c99;color:darkred;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/block-supports-6aa4dd",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/src/edit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 |
5 | import { useBlockProps, RichText } from '@wordpress/block-editor';
6 |
7 | const Edit = ( props ) => {
8 | const {
9 | attributes: { content },
10 | setAttributes,
11 | } = props;
12 |
13 | const blockProps = useBlockProps();
14 |
15 | const onChangeContent = ( newContent ) => {
16 | setAttributes( { content: newContent } );
17 | };
18 | return (
19 |
25 | );
26 | };
27 | export default Edit;
28 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/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-block-development-examples-block-supports-6aa4dd {
8 | color: #008000;
9 | background: #cfc;
10 | border: 2px solid #9c9;
11 | padding: 20px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/src/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { useBlockProps, RichText } from '@wordpress/block-editor';
5 |
6 | const Save = ( props ) => {
7 | const {
8 | attributes: { content },
9 | } = props;
10 | const blockProps = useBlockProps.save();
11 |
12 | return ;
13 | };
14 | export default Save;
15 |
--------------------------------------------------------------------------------
/plugins/block-supports-6aa4dd/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-block-development-examples-block-supports-6aa4dd {
9 | color: #8b0000;
10 | background: #fcc;
11 | border: 2px solid #c99;
12 | padding: 20px;
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/_assets/block-toolbar-snapshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/block-toolbar-ab967f/_assets/block-toolbar-snapshot.png
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-primitives'), 'version' => 'add3398d3a395b38fced');
2 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-toolbar-ab967f{background:#00a8db;border:2px solid #0d72b2;color:#fff;font-family:sans-serif;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-block-toolbar-ab967f{background:#fcc;border:2px solid #c99;color:darkred;font-family:sans-serif;padding:20px}.wp-block-block-development-examples-block-toolbar-ab967f.block-toolbar-ab967f-align-left{text-align:left}.wp-block-block-development-examples-block-toolbar-ab967f.block-toolbar-ab967f-align-center{text-align:center}.wp-block-block-development-examples-block-toolbar-ab967f.block-toolbar-ab967f-align-right{text-align:right}
2 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/block-toolbar-ab967f",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | },
17 | "dependencies": {
18 | "@wordpress/icons": "^9.48.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/block-toolbar-ab967f",
5 | "version": "0.1.0",
6 | "title": "Block Toolbar ab967f",
7 | "category": "widgets",
8 | "attributes": {
9 | "content": {
10 | "type": "string",
11 | "source": "html",
12 | "selector": "p"
13 | },
14 | "alignment": {
15 | "type": "string",
16 | "default": "none"
17 | }
18 | },
19 | "example": {
20 | "attributes": {
21 | "content": "Hello World",
22 | "alignment": "right"
23 | }
24 | },
25 | "textdomain": "block-development-examples",
26 | "editorScript": "file:./index.js",
27 | "editorStyle": "file:./index.css",
28 | "style": "file:./style-index.css",
29 | "keywords": [ "ab967f" ]
30 | }
31 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/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-block-development-examples-block-toolbar-ab967f {
8 | color: #fff;
9 | background: #00a8db;
10 | border: 2px solid #0d72b2;
11 | padding: 20px;
12 | font-family: sans-serif;
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/src/index.js:
--------------------------------------------------------------------------------
1 | import { registerBlockType } from '@wordpress/blocks';
2 |
3 | import Edit from './edit';
4 | import save from './save';
5 | import metadata from './block.json';
6 |
7 | registerBlockType( metadata.name, {
8 | edit: Edit,
9 | save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/src/save.js:
--------------------------------------------------------------------------------
1 | import { useBlockProps, RichText } from '@wordpress/block-editor';
2 |
3 | import './style.scss';
4 |
5 | export default function save( props ) {
6 | const blockProps = useBlockProps.save( {
7 | className: `block-toolbar-ab967f-align-${ props.attributes.alignment }`,
8 | } );
9 | return (
10 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/plugins/block-toolbar-ab967f/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-block-development-examples-block-toolbar-ab967f {
9 | color: #8b0000;
10 | background: #fcc;
11 | border: 2px solid #c99;
12 | padding: 20px;
13 | font-family: sans-serif;
14 |
15 | &.block-toolbar-ab967f-align-left {
16 | text-align: left;
17 | }
18 |
19 | &.block-toolbar-ab967f-align-center {
20 | text-align: center;
21 | }
22 |
23 | &.block-toolbar-ab967f-align-right {
24 | text-align: right;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/plugins/copyright-date-block-09aac3/.wp-env.json:
--------------------------------------------------------------------------------
1 | {
2 | "core": "WordPress/WordPress",
3 | "plugins": [
4 | "."
5 | ]
6 | }
--------------------------------------------------------------------------------
/plugins/copyright-date-block-09aac3/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '1e6596acca500e0d999e');
2 |
--------------------------------------------------------------------------------
/plugins/copyright-date-block-09aac3/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-block-development-examples-controls-a9cfe0 {
8 | color: #fff;
9 | background: #00a8db;
10 | border: 2px solid #0d72b2;
11 | padding: 20px;
12 | font-family: sans-serif;
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/copyright-date-block-09aac3/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-block-development-examples-controls-a9cfe0 {
9 | color: #8b0000;
10 | background: #fcc;
11 | border: 2px solid #c99;
12 | padding: 20px;
13 | font-family: sans-serif;
14 |
15 | &.controls-a9cfe0-align-left {
16 | text-align: left;
17 | }
18 |
19 | &.controls-a9cfe0-align-center {
20 | text-align: center;
21 | }
22 |
23 | &.controls-a9cfe0-align-right {
24 | text-align: right;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/_playground/blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "landingPage": "/wp-admin/admin.php?page=my-custom-gutenberg-app",
3 | "login": true,
4 | "steps": [
5 | {
6 | "step": "installPlugin",
7 | "pluginData": {
8 | "resource": "git:directory",
9 | "url": "https://github.com/WordPress/block-development-examples",
10 | "ref": "HEAD",
11 | "path": "plugins/data-basics-59c8f8"
12 | },
13 | "options": {
14 | "activate": true
15 | }
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-notices'), 'version' => '99cc9307aeb738cd8321');
2 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/data-basics-59c8f8",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/src/components/CreatePageButton.js:
--------------------------------------------------------------------------------
1 | import { useState } from '@wordpress/element';
2 | import { Button, Modal } from '@wordpress/components';
3 | import CreatePageForm from './CreatePageForm';
4 |
5 | export default function CreatePageButton() {
6 | const [ isOpen, setOpen ] = useState( false );
7 | const openModal = () => setOpen( true );
8 | const closeModal = () => setOpen( false );
9 | return (
10 | <>
11 |
14 | { isOpen && (
15 |
16 |
20 |
21 | ) }
22 | >
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/src/components/Notifications.js:
--------------------------------------------------------------------------------
1 | import { useSelect, useDispatch } from '@wordpress/data';
2 | import { store as noticesStore } from '@wordpress/notices';
3 | import { SnackbarList } from '@wordpress/components';
4 |
5 | export default function Notifications() {
6 | const notices = useSelect(
7 | ( select ) => select( noticesStore ).getNotices(),
8 | []
9 | );
10 | const { removeNotice } = useDispatch( noticesStore );
11 | const snackbarNotices = notices.filter(
12 | ( { type } ) => type === 'snackbar'
13 | );
14 | return (
15 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/src/components/PageEditButton.js:
--------------------------------------------------------------------------------
1 | import { Button, Modal } from '@wordpress/components';
2 | import { useState } from '@wordpress/element';
3 | import EditPageForm from './EditPageForm';
4 |
5 | export default function PageEditButton( { pageId } ) {
6 | const [ isOpen, setOpen ] = useState( false );
7 | const openModal = () => setOpen( true );
8 | const closeModal = () => setOpen( false );
9 | return (
10 | <>
11 |
14 | { isOpen && (
15 |
16 |
21 |
22 | ) }
23 | >
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/plugins/data-basics-59c8f8/src/components/index.js:
--------------------------------------------------------------------------------
1 | import Notifications from './Notifications';
2 | import CreatePageButton from './CreatePageButton';
3 | import PagesList from './PagesList';
4 |
5 | export { Notifications, CreatePageButton, PagesList };
6 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/dynamic-block-b0bce7",
5 | "version": "0.1.0",
6 | "title": "Dynamic Block b0bce7",
7 | "category": "widgets",
8 | "attributes": {
9 | "message": {
10 | "type": "string",
11 | "default": "Hello from a dynamic block!"
12 | }
13 | },
14 | "example": {
15 | "attributes": {
16 | "message": "Example Dynamic Block"
17 | }
18 | },
19 | "textdomain": "block-development-examples",
20 | "editorScript": "file:./index.js",
21 | "editorStyle": "file:./index.css",
22 | "style": "file:./style-index.css",
23 | "render": "file:./render.php",
24 | "keywords": [
25 | "b0bce7"
26 | ]
27 | }
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-i18n'), 'version' => 'fd913e51624f9e16decc');
2 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-dynamic-block-b0bce7{border:5px dashed #000}
2 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-dynamic-block-b0bce7{background-color:#21759b;color:#fff;padding:2px}
2 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/dynamic-block-b0bce7",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/dynamic-block-b0bce7",
5 | "version": "0.1.0",
6 | "title": "Dynamic Block b0bce7",
7 | "category": "widgets",
8 | "attributes": {
9 | "message": {
10 | "type": "string",
11 | "default": "Hello from a dynamic block!"
12 | }
13 | },
14 | "example": {
15 | "attributes": {
16 | "message": "Example Dynamic Block"
17 | }
18 | },
19 | "textdomain": "block-development-examples",
20 | "editorScript": "file:./index.js",
21 | "editorStyle": "file:./index.css",
22 | "style": "file:./style-index.css",
23 | "render": "file:./render.php",
24 | "keywords": [ "b0bce7" ]
25 | }
26 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/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-block-development-examples-dynamic-block-b0bce7 {
8 | border: 5px dashed #000;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/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-block-development-examples-dynamic-block-b0bce7 {
9 | background-color: #21759b;
10 | color: #fff;
11 | padding: 2px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/dynamic-block-b0bce7/src/view.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 | console.log(
3 | 'Hello World! (from block-development-examples-dynamic-block-b0bce7 block)'
4 | );
5 | /* eslint-enable no-console */
6 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 2,
4 | "name": "block-development-examples/basic-editable-block-1b8c51",
5 | "title": "Editable Block",
6 | "textdomain": "block-development-examples",
7 | "icon": "universal-access-alt",
8 | "category": "widgets",
9 | "keywords": [
10 | "1b8c51"
11 | ],
12 | "attributes": {
13 | "content": {
14 | "type": "string",
15 | "source": "html",
16 | "selector": "p"
17 | }
18 | },
19 | "example": {
20 | "attributes": {
21 | "content": "Hello world"
22 | }
23 | },
24 | "editorScript": "file:./index.js",
25 | "editorStyle": "file:./index.css",
26 | "style": "file:./style-index.css"
27 | }
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-1b8c51/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks'), 'version' => '2c06e06f124ad792f745');
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-1b8c51/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-basic-editable-block-1b8c51{background:#cfc;border:2px solid #9c9;color:green;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-1b8c51/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-basic-editable-block-1b8c51{background:#ccf8ff;border:2px solid #c99;color:#00198b;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-no-build-1b8c51/block.asset.php:
--------------------------------------------------------------------------------
1 | ["react", "wp-block-editor", "wp-blocks"],
3 | "version" => "jns4hjf256k63try7oq4",
4 | ];
5 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-no-build-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "title": "Editable Block No Build",
4 | "name": "block-development-examples/basic-editable-block-no-build-1b8c51",
5 | "category": "media",
6 | "icon": "universal-access-alt",
7 | "keywords": [ "1b8c51" ],
8 | "attributes": {
9 | "content": {
10 | "type": "string",
11 | "source": "html",
12 | "selector": "p"
13 | }
14 | },
15 | "example": {
16 | "attributes": {
17 | "content": "Hello world"
18 | }
19 | },
20 | "editorScript": "file:./block.js",
21 | "editorStyle": "file:./editor.css",
22 | "style": "file:./style.css"
23 | }
24 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-no-build-1b8c51/editor.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *after* common styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-no-build-1b8c51 {
6 | color: #008000;
7 | background: #cfc;
8 | border: 2px solid #9c9;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/basic-editable-block-no-build-1b8c51/style.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *before* editor styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-no-build-1b8c51 {
6 | color: #00198b;
7 | background: rgb(204, 248, 255);
8 | border: 2px solid #c99;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/enhanced-editable-block-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 2,
4 | "name": "block-development-examples/enhanced-editable-block-1b8c51",
5 | "title": "Enhanced Editable Block",
6 | "textdomain": "block-development-examples",
7 | "icon": "universal-access-alt",
8 | "category": "widgets",
9 | "keywords": [
10 | "1b8c51"
11 | ],
12 | "attributes": {
13 | "content": {
14 | "type": "string",
15 | "source": "html",
16 | "selector": "p"
17 | }
18 | },
19 | "example": {
20 | "attributes": {
21 | "content": "Hello world"
22 | }
23 | },
24 | "editorScript": "file:./index.js",
25 | "editorStyle": "file:./index.css",
26 | "style": "file:./style-index.css"
27 | }
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/enhanced-editable-block-1b8c51/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'e32ff09ed70b09071de1');
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/enhanced-editable-block-1b8c51/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-enhanced-editable-block-1b8c51{background:#cfc;border:2px solid #9c9;color:green;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/build/blocks/enhanced-editable-block-1b8c51/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-enhanced-editable-block-1b8c51{background:#ccf8ff;border:2px solid #c99;color:#00198b;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/languages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/editable-block-1b8c51/languages/.gitkeep
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 2,
4 | "name": "block-development-examples/basic-editable-block-1b8c51",
5 | "title": "Editable Block",
6 | "textdomain": "block-development-examples",
7 | "icon": "universal-access-alt",
8 | "category": "widgets",
9 | "keywords": [ "1b8c51" ],
10 | "attributes": {
11 | "content": {
12 | "type": "string",
13 | "source": "html",
14 | "selector": "p"
15 | }
16 | },
17 | "example": {
18 | "attributes": {
19 | "content": "Hello world"
20 | }
21 | },
22 | "editorScript": "file:./index.js",
23 | "editorStyle": "file:./index.css",
24 | "style": "file:./style-index.css"
25 | }
26 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51/edit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 |
5 | import { useBlockProps, RichText } from '@wordpress/block-editor';
6 |
7 | const Edit = ( props ) => {
8 | const {
9 | attributes: { content },
10 | setAttributes,
11 | } = props;
12 |
13 | const blockProps = useBlockProps();
14 |
15 | const onChangeContent = ( newContent ) => {
16 | setAttributes( { content: newContent } );
17 | };
18 | return (
19 |
25 | );
26 | };
27 | export default Edit;
28 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51/editor.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *after* common styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-1b8c51 {
6 | color: #008000;
7 | background: #cfc;
8 | border: 2px solid #9c9;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { useBlockProps, RichText } from '@wordpress/block-editor';
5 |
6 | const Save = ( props ) => {
7 | const {
8 | attributes: { content },
9 | } = props;
10 | const blockProps = useBlockProps.save();
11 |
12 | return ;
13 | };
14 | export default Save;
15 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-1b8c51/style.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *before* editor styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-1b8c51 {
6 | color: #00198b;
7 | background: rgb(204, 248, 255);
8 | border: 2px solid #c99;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-no-build-1b8c51/block.asset.php:
--------------------------------------------------------------------------------
1 | ["react", "wp-block-editor", "wp-blocks"],
3 | "version" => "jns4hjf256k63try7oq4",
4 | ];
5 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-no-build-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "title": "Editable Block No Build",
4 | "name": "block-development-examples/basic-editable-block-no-build-1b8c51",
5 | "category": "media",
6 | "icon": "universal-access-alt",
7 | "keywords": [ "1b8c51" ],
8 | "attributes": {
9 | "content": {
10 | "type": "string",
11 | "source": "html",
12 | "selector": "p"
13 | }
14 | },
15 | "example": {
16 | "attributes": {
17 | "content": "Hello world"
18 | }
19 | },
20 | "editorScript": "file:./block.js",
21 | "editorStyle": "file:./editor.css",
22 | "style": "file:./style.css"
23 | }
24 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-no-build-1b8c51/editor.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *after* common styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-no-build-1b8c51 {
6 | color: #008000;
7 | background: #cfc;
8 | border: 2px solid #9c9;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/basic-editable-block-no-build-1b8c51/style.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *before* editor styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-basic-editable-block-no-build-1b8c51 {
6 | color: #00198b;
7 | background: rgb(204, 248, 255);
8 | border: 2px solid #c99;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/block.json",
3 | "apiVersion": 2,
4 | "name": "block-development-examples/enhanced-editable-block-1b8c51",
5 | "title": "Enhanced Editable Block",
6 | "textdomain": "block-development-examples",
7 | "icon": "universal-access-alt",
8 | "category": "widgets",
9 | "keywords": [ "1b8c51" ],
10 | "attributes": {
11 | "content": {
12 | "type": "string",
13 | "source": "html",
14 | "selector": "p"
15 | }
16 | },
17 | "example": {
18 | "attributes": {
19 | "content": "Hello world"
20 | }
21 | },
22 | "editorScript": "file:./index.js",
23 | "editorStyle": "file:./index.css",
24 | "style": "file:./style-index.css"
25 | }
26 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51/css/editor.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *after* common styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-enhanced-editable-block-1b8c51 {
6 | color: #008000;
7 | background: #cfc;
8 | border: 2px solid #9c9;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51/css/style.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Note that these styles are loaded *before* editor styles, so that
3 | * editor-specific styles using the same selectors will take precedence.
4 | */
5 | .wp-block-block-development-examples-enhanced-editable-block-1b8c51 {
6 | color: #00198b;
7 | background: rgb(204, 248, 255);
8 | border: 2px solid #c99;
9 | padding: 20px;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51/js/edit.js:
--------------------------------------------------------------------------------
1 | import { useBlockProps, RichText } from '@wordpress/block-editor';
2 | import withCharLimit from './withCharLimit';
3 | const RichTextWithCharLimit = withCharLimit( 100 )( RichText );
4 |
5 | const Edit = ( props ) => {
6 | const {
7 | attributes: { content },
8 | setAttributes,
9 | } = props;
10 |
11 | const blockProps = useBlockProps();
12 |
13 | const onChangeContent = ( newContent ) => {
14 | setAttributes( { content: newContent } );
15 | };
16 |
17 | return (
18 |
19 |
24 |
25 | );
26 | };
27 | export default Edit;
28 |
--------------------------------------------------------------------------------
/plugins/editable-block-1b8c51/src/blocks/enhanced-editable-block-1b8c51/js/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { useBlockProps, RichText } from '@wordpress/block-editor';
5 |
6 | const Save = ( props ) => {
7 | const {
8 | attributes: { content },
9 | } = props;
10 | const blockProps = useBlockProps.save();
11 |
12 | return ;
13 | };
14 | export default Save;
15 |
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/_assets/format-api-snapshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/format-api-f14b86/_assets/format-api-snapshot.png
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/build/format-api-f14b86.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-i18n', 'wp-rich-text'), 'version' => '4300c82ad7051ed5691e');
2 |
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/build/format-api-f14b86.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";const t=window.React,e=window.wp.i18n,o=window.wp.richText,l=window.wp.blockEditor;(0,o.registerFormatType)("my-custom-format/sample-output",{title:(0,e.__)("Sample output","block-development-examples"),tagName:"samp",className:null,edit:({isActive:a,onChange:i,value:m})=>(0,t.createElement)(l.RichTextToolbarButton,{icon:"editor-code",title:(0,e.__)("Sample output","block-development-examples"),onClick:()=>{i((0,o.toggleFormat)(m,{type:"my-custom-format/sample-output"}))},isActive:a})})})();
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/format-api-f14b86",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "main": "build/index.js",
7 | "scripts": {
8 | "build": "wp-scripts build",
9 | "start": "wp-scripts start",
10 | "format": "wp-scripts format",
11 | "lint:css": "wp-scripts lint-style",
12 | "lint:js": "wp-scripts lint-js",
13 | "packages-update": "wp-scripts packages-update",
14 | "plugin-zip": "wp-scripts plugin-zip"
15 | },
16 | "files": [
17 | "*"
18 | ],
19 | "devDependencies": {
20 | "@wordpress/scripts": "^27.8.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/plugins/format-api-f14b86/webpack.config.js:
--------------------------------------------------------------------------------
1 | // Import the original config from the @wordpress/scripts package.
2 | const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
3 |
4 | // Import the helper to find and generate the entry points in the src directory
5 | const { getWebpackEntryPoints } = require( '@wordpress/scripts/utils/config' );
6 |
7 | // Add any a new entry point by extending the webpack config.
8 | module.exports = {
9 | ...defaultConfig,
10 | entry: {
11 | ...getWebpackEntryPoints(),
12 | 'format-api-f14b86': './src/format-api-f14b86.js',
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/inner-blocks-dcd824",
5 | "version": "0.1.0",
6 | "title": "Inner Blocks dcd824",
7 | "allowedBlocks": [
8 | "core/paragraph",
9 | "core/image",
10 | "core/heading"
11 | ],
12 | "category": "widgets",
13 | "example": {},
14 | "textdomain": "block-development-examples",
15 | "editorScript": "file:./index.js",
16 | "editorStyle": "file:./index.css",
17 | "keywords": [
18 | "dcd824"
19 | ]
20 | }
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks'), 'version' => '9b7307971c68ad1c7fc9');
2 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-inner-blocks-dcd824{border:2px solid #9c9;padding:10px}
2 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/build/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.css","mappings":";;;AAAA;EACC;EACA;AACD,C","sources":["webpack://@block-development-examples/inner-blocks-dcd824/./src/editor.scss"],"sourcesContent":[".wp-block-block-development-examples-inner-blocks-dcd824 {\n\tborder: 2px solid #9c9;\n\tpadding: 10px;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/build/index.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";const e=window.wp.blocks,o=window.React,r=window.wp.blockEditor,t=[["core/image",{}],["core/heading",{placeholder:"Book Title"}],["core/paragraph",{placeholder:"Summary"}]],c=JSON.parse('{"UU":"block-development-examples/inner-blocks-dcd824"}');(0,e.registerBlockType)(c.UU,{edit:()=>{const e=(0,r.useBlockProps)();return(0,o.createElement)("div",{...e},(0,o.createElement)(r.InnerBlocks,{template:t}))},save:()=>{const e=r.useBlockProps.save();return(0,o.createElement)("div",{...e},(0,o.createElement)(r.InnerBlocks.Content,null))}})})();
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/inner-blocks-dcd824",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/inner-blocks-dcd824",
5 | "version": "0.1.0",
6 | "title": "Inner Blocks dcd824",
7 | "allowedBlocks": [ "core/paragraph", "core/image", "core/heading" ],
8 | "category": "widgets",
9 | "example": {},
10 | "textdomain": "block-development-examples",
11 | "editorScript": "file:./index.js",
12 | "editorStyle": "file:./index.css",
13 | "keywords": [ "dcd824" ]
14 | }
15 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/src/edit.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress Dependencies
3 | */
4 | import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
5 | import './editor.scss';
6 |
7 | const MY_TEMPLATE = [
8 | [ 'core/image', {} ],
9 | [ 'core/heading', { placeholder: 'Book Title' } ],
10 | [ 'core/paragraph', { placeholder: 'Summary' } ],
11 | ];
12 |
13 | const Edit = () => {
14 | const blockProps = useBlockProps();
15 | return (
16 |
17 |
18 |
19 | );
20 | };
21 | export default Edit;
22 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/src/editor.scss:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-inner-blocks-dcd824 {
2 | border: 2px solid #9c9;
3 | padding: 10px;
4 | }
5 |
--------------------------------------------------------------------------------
/plugins/inner-blocks-dcd824/src/save.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
5 |
6 | const Save = () => {
7 | const blockProps = useBlockProps.save();
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 | export default Save;
15 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-react",
5 | {
6 | "throwIfNamespace": false
7 | }
8 | ]
9 | ]
10 | }
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/_assets/interactive-blocks-talk-slides.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactive-blocks-demos-99def1/_assets/interactive-blocks-talk-slides.pdf
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-alpine-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "name": "block-development-examples/counter-alpine-99def1",
4 | "title": "Counter (Alpine)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented with Alpine",
8 | "keywords": [
9 | "99def1"
10 | ],
11 | "textdomain": "block-development-examples",
12 | "attributes": {
13 | "initial": {
14 | "type": "number",
15 | "default": 0
16 | },
17 | "increment": {
18 | "type": "number",
19 | "default": 2
20 | }
21 | },
22 | "supports": {
23 | "align": true
24 | },
25 | "editorScript": "file:./index.js",
26 | "editorStyle": "file:./index.css",
27 | "style": "file:./style-index.css"
28 | }
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-alpine-99def1/index.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '0c6c59f44ff3bf4f625a');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-alpine-99def1/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-alpine-99def1{padding:1.1em}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-alpine-99def1/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-alpine-99def1{border:3px solid green;padding:1em}.wp-block-block-development-examples-counter-alpine-99def1 button{cursor:pointer}.wp-block-block-development-examples-counter-alpine-99def1 *{font-size:20px}.wp-block-block-development-examples-counter-alpine-99def1 button,.wp-block-block-development-examples-counter-alpine-99def1 input{font-size:30px;padding:10px}.wp-block-block-development-examples-counter-alpine-99def1 input{width:100px}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-jquery-99def1/index.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '5d8314fba7d167801859');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-jquery-99def1/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-jquery-99def1{padding:1.1em}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-jquery-99def1/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-jquery-99def1{border:3px solid brown;padding:1em}.wp-block-block-development-examples-counter-jquery-99def1 button{cursor:pointer}.wp-block-block-development-examples-counter-jquery-99def1 *{font-size:20px}.wp-block-block-development-examples-counter-jquery-99def1 button,.wp-block-block-development-examples-counter-jquery-99def1 input{font-size:30px;padding:10px}.wp-block-block-development-examples-counter-jquery-99def1 input{width:100px}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-jquery-99def1/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => '4769d77bb70c9084efe5');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-jquery-99def1/view.js:
--------------------------------------------------------------------------------
1 | window.addEventListener("load",(()=>{const e=jQuery,t=".wp-block-block-development-examples-counter-jquery-99def1",n=e(t+"__value"),a=parseInt(n.attr("step"));e(t+"__increment").click((()=>{const e=parseInt(n.val());n.val(e+a)})),e(t+"__decrement").click((()=>{const e=parseInt(n.val());n.val(e-a)}))}));
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-js-99def1/index.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '3a721c5f96a5fba73c26');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-js-99def1/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-js-99def1{padding:1.1em}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-js-99def1/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-js-99def1{border:3px solid orange;padding:1em}.wp-block-block-development-examples-counter-js-99def1 button{cursor:pointer}.wp-block-block-development-examples-counter-js-99def1 *{font-size:20px}.wp-block-block-development-examples-counter-js-99def1 button,.wp-block-block-development-examples-counter-js-99def1 input{font-size:30px;padding:10px}.wp-block-block-development-examples-counter-js-99def1 input{width:100px}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-js-99def1/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => '599ac259459d6d0631fa');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-js-99def1/view.js:
--------------------------------------------------------------------------------
1 | window.addEventListener("load",(()=>{const e=".wp-block-block-development-examples-counter-js-99def1",t=document.querySelector(e+"__increment"),n=document.querySelector(e+"__decrement"),c=document.querySelector(e+"__value");t.addEventListener("click",(()=>{c.value=parseInt(c.value)+parseInt(c.step)})),n.addEventListener("click",(()=>{c.value=parseInt(c.value)-parseInt(c.step)}))}));
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-react-99def1/index.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => 'ea07ac7b119c1de4314d');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-react-99def1/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-react-99def1{padding:1.1em}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-react-99def1/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-react-99def1{border:3px solid red;padding:1em}.wp-block-block-development-examples-counter-react-99def1 button{cursor:pointer}.wp-block-block-development-examples-counter-react-99def1 *{font-size:20px}.wp-block-block-development-examples-counter-react-99def1 button,.wp-block-block-development-examples-counter-react-99def1 input{font-size:30px;padding:10px}.wp-block-block-development-examples-counter-react-99def1 input{width:100px}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-react-99def1/view.asset.php:
--------------------------------------------------------------------------------
1 | array('react-dom', 'wp-element'), 'version' => '53d543009662bd4d65cd');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-react-99def1/view.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";const e=window.ReactDOM,t=window.wp.element,n=({attributes:e})=>{const[n,c]=(0,t.useState)(e.initial);return React.createElement(React.Fragment,null,React.createElement("button",{onClick:()=>c(n-e.increment)},"-"),React.createElement("input",{width:"5",type:"number",readOnly:!0,value:n}),React.createElement("button",{onClick:()=>c(n+e.increment)},"+"))};window.addEventListener("load",(function(){document.querySelectorAll(".wp-block-block-development-examples-counter-react-99def1 .counter-contaner").forEach((t=>{const c=JSON.parse(t.dataset.gutenbergAttributes);(0,e.createRoot)(t).render(React.createElement(n,{attributes:c}))}))}),!1)})();
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-web-component-99def1/index.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-block-editor', 'wp-blocks', 'wp-components'), 'version' => '3641b0bf0c0e317ea8ae');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-web-component-99def1/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-web-component-99def1{padding:1.1em}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-web-component-99def1/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-web-component-99def1{border:3px solid #00f;padding:1em}.wp-block-block-development-examples-counter-web-component-99def1 button{cursor:pointer}.wp-block-block-development-examples-counter-web-component-99def1 *{font-size:20px}.wp-block-block-development-examples-counter-web-component-99def1 button,.wp-block-block-development-examples-counter-web-component-99def1 input{font-size:30px;padding:10px}.wp-block-block-development-examples-counter-web-component-99def1 input{width:100px}
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/build/counter-web-component-99def1/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => 'bb3a2bdaf434c9176a2f');
2 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-alpine-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "name": "block-development-examples/counter-alpine-99def1",
4 | "title": "Counter (Alpine)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented with Alpine",
8 | "keywords": [ "99def1"],
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "initial": {
12 | "type": "number",
13 | "default": 0
14 | },
15 | "increment": {
16 | "type": "number",
17 | "default": 2
18 | }
19 | },
20 | "supports": {
21 | "align": true
22 | },
23 | "editorScript": "file:./index.js",
24 | "editorStyle": "file:./index.css",
25 | "style": "file:./style-index.css"
26 | }
27 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-alpine-99def1/index.css:
--------------------------------------------------------------------------------
1 | /* Styles only for the Editor */
2 |
3 | .wp-block-block-development-examples-counter-alpine-99def1 {
4 | padding: 1.1em;
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-alpine-99def1/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 | import './style.css';
3 | import { registerBlockType } from '@wordpress/blocks';
4 | import Edit from './edit';
5 | import Save from './save';
6 |
7 | registerBlockType( 'block-development-examples/counter-alpine-99def1', {
8 | edit: Edit,
9 | save: Save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-alpine-99def1/save.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/no-unknown-property */
2 | import { useBlockProps } from '@wordpress/block-editor';
3 |
4 | const Save = ( { attributes } ) => (
5 |
9 |
Alpine Counter
10 |
11 | Attributes
12 |
13 | { JSON.stringify( attributes, null, 2 ) }
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | );
22 |
23 | export default Save;
24 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-alpine-99def1/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-alpine-99def1 {
2 | border-style: solid;
3 | border-width: 3px;
4 | border-color: #008000;
5 | padding: 1em;
6 | }
7 |
8 | .wp-block-block-development-examples-counter-alpine-99def1 button {
9 | cursor: pointer;
10 | }
11 |
12 | .wp-block-block-development-examples-counter-alpine-99def1 * {
13 | font-size: 20px;
14 | }
15 |
16 | .wp-block-block-development-examples-counter-alpine-99def1 input,
17 | .wp-block-block-development-examples-counter-alpine-99def1 button {
18 | font-size: 30px;
19 | padding: 10px;
20 | }
21 |
22 | .wp-block-block-development-examples-counter-alpine-99def1 input {
23 | width: 100px;
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-jquery-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "name": "block-development-examples/counter-jquery-99def1",
4 | "title": "Counter (jQuery)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented with jQuery",
8 | "keywords": [ "99def1"],
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "initial": {
12 | "type": "number",
13 | "default": 0
14 | },
15 | "increment": {
16 | "type": "number",
17 | "default": 1
18 | }
19 | },
20 | "supports": {
21 | "align": true
22 | },
23 | "editorScript": "file:./index.js",
24 | "editorStyle": "file:./index.css",
25 | "style": "file:./style-index.css",
26 | "viewScript": ["file:./view.js"]
27 | }
28 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-jquery-99def1/index.css:
--------------------------------------------------------------------------------
1 | /* Styles only for the Editor */
2 |
3 | .wp-block-block-development-examples-counter-jquery-99def1 {
4 | padding: 1.1em;
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-jquery-99def1/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 | import './style.css';
3 | import { registerBlockType } from '@wordpress/blocks';
4 | import Edit from './edit';
5 | import Save from './save';
6 |
7 | registerBlockType( 'block-development-examples/counter-jquery-99def1', {
8 | edit: Edit,
9 | save: Save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-jquery-99def1/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-jquery-99def1 {
2 | border-style: solid;
3 | border-width: 3px;
4 | border-color: #a52a2a;
5 | padding: 1em;
6 | }
7 |
8 | .wp-block-block-development-examples-counter-jquery-99def1 button {
9 | cursor: pointer;
10 | }
11 |
12 | .wp-block-block-development-examples-counter-jquery-99def1 * {
13 | font-size: 20px;
14 | }
15 |
16 | .wp-block-block-development-examples-counter-jquery-99def1 input,
17 | .wp-block-block-development-examples-counter-jquery-99def1 button {
18 | font-size: 30px;
19 | padding: 10px;
20 | }
21 |
22 | .wp-block-block-development-examples-counter-jquery-99def1 input {
23 | width: 100px;
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-jquery-99def1/view.js:
--------------------------------------------------------------------------------
1 | window.addEventListener( 'load', () => {
2 | const $ = jQuery;
3 | const blockClassPrefix =
4 | '.wp-block-block-development-examples-counter-jquery-99def1';
5 | const $input = $( blockClassPrefix + '__value' );
6 | const step = parseInt( $input.attr( 'step' ) );
7 |
8 | $( blockClassPrefix + '__increment' ).click( () => {
9 | const currentValue = parseInt( $input.val() );
10 | $input.val( currentValue + step );
11 | } );
12 | $( blockClassPrefix + '__decrement' ).click( () => {
13 | const currentValue = parseInt( $input.val() );
14 | $input.val( currentValue - step );
15 | } );
16 | } );
17 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-js-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "name": "block-development-examples/counter-js-99def1",
4 | "title": "Counter (JS)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented in JavaScript",
8 | "keywords": [ "99def1"],
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "initial": {
12 | "type": "number",
13 | "default": 0
14 | },
15 | "increment": {
16 | "type": "number",
17 | "default": 3
18 | }
19 | },
20 | "supports": {
21 | "align": true
22 | },
23 | "editorScript": "file:./index.js",
24 | "editorStyle": "file:./index.css",
25 | "style": "file:./style-index.css",
26 | "viewScript": "file:./view.js"
27 | }
28 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-js-99def1/index.css:
--------------------------------------------------------------------------------
1 | /* Styles only for the Editor */
2 |
3 | .wp-block-block-development-examples-counter-js-99def1 {
4 | padding: 1.1em;
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-js-99def1/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 | import './style.css';
3 | import { registerBlockType } from '@wordpress/blocks';
4 | import Edit from './edit';
5 | import Save from './save';
6 |
7 | registerBlockType( 'block-development-examples/counter-js-99def1', {
8 | edit: Edit,
9 | save: Save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-js-99def1/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-js-99def1 {
2 | border-style: solid;
3 | border-width: 3px;
4 | border-color: #ffa500;
5 | padding: 1em;
6 | }
7 |
8 | .wp-block-block-development-examples-counter-js-99def1 button {
9 | cursor: pointer;
10 | }
11 |
12 | .wp-block-block-development-examples-counter-js-99def1 * {
13 | font-size: 20px;
14 | }
15 |
16 | .wp-block-block-development-examples-counter-js-99def1 input,
17 | .wp-block-block-development-examples-counter-js-99def1 button {
18 | font-size: 30px;
19 | padding: 10px;
20 | }
21 |
22 | .wp-block-block-development-examples-counter-js-99def1 input {
23 | width: 100px;
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-js-99def1/view.js:
--------------------------------------------------------------------------------
1 | window.addEventListener( 'load', () => {
2 | const blockClassPrefix =
3 | '.wp-block-block-development-examples-counter-js-99def1';
4 | const incrementButton = document.querySelector(
5 | blockClassPrefix + '__increment'
6 | );
7 | const decrementButton = document.querySelector(
8 | blockClassPrefix + '__decrement'
9 | );
10 | const valueBox = document.querySelector( blockClassPrefix + '__value' );
11 |
12 | incrementButton.addEventListener( 'click', () => {
13 | valueBox.value = parseInt( valueBox.value ) + parseInt( valueBox.step );
14 | } );
15 | decrementButton.addEventListener( 'click', () => {
16 | valueBox.value = parseInt( valueBox.value ) - parseInt( valueBox.step );
17 | } );
18 | } );
19 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-react-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "name": "block-development-examples/counter-react-99def1",
4 | "title": "Counter (React)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented in React",
8 | "keywords": [ "99def1"],
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "initial": {
12 | "type": "number",
13 | "default": 0
14 | },
15 | "increment": {
16 | "type": "number",
17 | "default": 4
18 | }
19 | },
20 | "supports": {
21 | "align": true
22 | },
23 | "editorScript": "file:./index.js",
24 | "editorStyle": "file:./index.css",
25 | "style": "file:./style-index.css",
26 | "viewScript": "file:./view.js"
27 | }
28 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-react-99def1/index.css:
--------------------------------------------------------------------------------
1 | /* Styles only for the Editor */
2 |
3 | .wp-block-block-development-examples-counter-react-99def1 {
4 | padding: 1.1em;
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-react-99def1/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 | import './style.css';
3 | import { registerBlockType } from '@wordpress/blocks';
4 | import Edit from './edit';
5 | import Save from './save';
6 |
7 | registerBlockType( 'block-development-examples/counter-react-99def1', {
8 | edit: Edit,
9 | save: Save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-react-99def1/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-react-99def1 {
2 | border-style: solid;
3 | border-width: 3px;
4 | border-color: #f00;
5 | padding: 1em;
6 | }
7 |
8 | .wp-block-block-development-examples-counter-react-99def1 button {
9 | cursor: pointer;
10 | }
11 |
12 | .wp-block-block-development-examples-counter-react-99def1 * {
13 | font-size: 20px;
14 | }
15 |
16 | .wp-block-block-development-examples-counter-react-99def1 input,
17 | .wp-block-block-development-examples-counter-react-99def1 button {
18 | font-size: 30px;
19 | padding: 10px;
20 | }
21 |
22 | .wp-block-block-development-examples-counter-react-99def1 input {
23 | width: 100px;
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/README.md
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 2,
3 | "name": "block-development-examples/counter-web-component-99def1",
4 | "title": "Counter (Web Components)",
5 | "category": "media",
6 | "icon": "smiley",
7 | "description": "This is the final counter, implemented in Web Components",
8 | "keywords": [ "99def1"],
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "initial": {
12 | "type": "number",
13 | "default": 0
14 | },
15 | "increment": {
16 | "type": "number",
17 | "default": 5
18 | }
19 | },
20 | "supports": {
21 | "align": true
22 | },
23 | "editorScript": "file:./index.js",
24 | "editorStyle": "file:./index.css",
25 | "style": "file:./style-index.css",
26 | "viewScript": "file:./view.js"
27 | }
28 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/index.css:
--------------------------------------------------------------------------------
1 | /* Styles only for the Editor */
2 |
3 | .wp-block-block-development-examples-counter-web-component-99def1 {
4 | padding: 1.1em;
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 | import './style.css';
3 | import { registerBlockType } from '@wordpress/blocks';
4 | import Edit from './edit';
5 | import Save from './save';
6 |
7 | registerBlockType( 'block-development-examples/counter-web-component-99def1', {
8 | edit: Edit,
9 | save: Save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/save.js:
--------------------------------------------------------------------------------
1 | import { useBlockProps } from '@wordpress/block-editor';
2 |
3 | const Save = ( { attributes } ) => {
4 | return (
5 |
6 |
Web Components Counter
7 |
8 | Attributes
9 |
10 | { JSON.stringify( attributes, null, 2 ) }
11 |
12 |
13 |
14 |
18 |
19 | );
20 | };
21 |
22 | export default Save;
23 |
--------------------------------------------------------------------------------
/plugins/interactive-blocks-demos-99def1/src/counter-web-component-99def1/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-counter-web-component-99def1 {
2 | border-style: solid;
3 | border-width: 3px;
4 | border-color: #00f;
5 | padding: 1em;
6 | }
7 |
8 | .wp-block-block-development-examples-counter-web-component-99def1 button {
9 | cursor: pointer;
10 | }
11 |
12 | .wp-block-block-development-examples-counter-web-component-99def1 * {
13 | font-size: 20px;
14 | }
15 |
16 | .wp-block-block-development-examples-counter-web-component-99def1 input,
17 | .wp-block-block-development-examples-counter-web-component-99def1 button {
18 | font-size: 30px;
19 | padding: 10px;
20 | }
21 |
22 | .wp-block-block-development-examples-counter-web-component-99def1 input {
23 | width: 100px;
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-primitives'), 'version' => '76c149a55e144ef52ce1');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-interactivity-api-countdown-3cd73e{align-items:center;display:flex;font-size:36px;font-weight:700;justify-content:space-evenly}
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/build/view.asset.php:
--------------------------------------------------------------------------------
1 | array('@wordpress/interactivity'), 'version' => '96ab58c67f54a1a04972', 'type' => 'module');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/interactivity-api-countdown-3cd73e",
3 | "version": "0.1.0",
4 | "description": "Countdown created with the Interactivity API",
5 | "author": "The WordPress Contributors",
6 | "license": "GPL-2.0-or-later",
7 | "scripts": {
8 | "build": "wp-scripts build --experimental-modules",
9 | "start": "wp-scripts start --experimental-modules",
10 | "plugin-zip": "wp-scripts plugin-zip"
11 | },
12 | "files": [
13 | "*"
14 | ],
15 | "dependencies": {
16 | "@wordpress/i18n": "^4.57.0",
17 | "@wordpress/icons": "^9.48.0"
18 | },
19 | "devDependencies": {
20 | "@wordpress/scripts": "^27.8.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/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-block-development-examples-interactivity-api-countdown-3cd73e {
8 | border: 1px dotted #f00;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/src/index.js:
--------------------------------------------------------------------------------
1 | import { registerBlockType } from '@wordpress/blocks';
2 |
3 | import Edit from './edit';
4 | import metadata from './block.json';
5 | import './style.scss';
6 |
7 | registerBlockType( metadata.name, {
8 | edit: Edit,
9 | } );
10 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-countdown-3cd73e/src/style.scss:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-interactivity-api-countdown-3cd73e {
2 | display: flex;
3 | align-items: center;
4 | justify-content: space-evenly;
5 | font-weight: 700;
6 | font-size: 36px;
7 | }
8 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-1835fa/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '0b0bc71182e0769c19e7');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-1835fa/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"blocks/quiz-1835fa/index.css","mappings":";;;AAAA;CACC,eAAe;AAChB","sources":["webpack://@block-development-examples/interactivity-api-quiz-1835fa/./src/blocks/quiz-1835fa/editor.css"],"sourcesContent":[".wp-block-block-development-examples-quiz-1835fa .rich-text {\n\tdisplay: inline;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-1835fa/style-index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"blocks/quiz-1835fa/style-index.css","mappings":";;;AAAA;CACC,yBAAyB;CACzB,yBAAyB;AAC1B","sources":["webpack://@block-development-examples/interactivity-api-quiz-1835fa/./src/blocks/quiz-1835fa/style.css"],"sourcesContent":[".wp-block-block-development-examples-quiz-1835fa .active {\n\tborder: 2px solid #006400;\n\tbackground-color: #90ee90;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-1835fa/view.asset.php:
--------------------------------------------------------------------------------
1 | array('@wordpress/interactivity'), 'version' => '0962df9620f12b5ef7aa', 'type' => 'module');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-progress-1835fa/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/quiz-progress-1835fa",
5 | "version": "1.0.0",
6 | "title": "Quiz Progress",
7 | "category": "widgets",
8 | "keywords": [
9 | "1835fa"
10 | ],
11 | "icon": "smiley",
12 | "description": "Show the quiz progress and check the answers",
13 | "supports": {
14 | "interactivity": true
15 | },
16 | "textdomain": "block-development-examples",
17 | "editorScript": "file:./index.js",
18 | "render": "file:./render.php",
19 | "viewScriptModule": "file:./view.js"
20 | }
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-progress-1835fa/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '14dcf7d2be3f423d158b');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/build/blocks/quiz-progress-1835fa/view.asset.php:
--------------------------------------------------------------------------------
1 | array('@wordpress/interactivity'), 'version' => 'cf49e150a40a14d5cb92', 'type' => 'module');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-1835fa/editor.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-quiz-1835fa .rich-text {
2 | display: inline;
3 | }
4 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-1835fa/index.js:
--------------------------------------------------------------------------------
1 | import { registerBlockType } from '@wordpress/blocks';
2 | import './style.css';
3 | import Edit from './edit';
4 | import metadata from './block.json';
5 |
6 | registerBlockType( metadata.name, {
7 | edit: Edit,
8 | } );
9 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-1835fa/style.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-quiz-1835fa .active {
2 | border: 2px solid #006400;
3 | background-color: #90ee90;
4 | }
5 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-progress-1835fa/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/quiz-progress-1835fa",
5 | "version": "1.0.0",
6 | "title": "Quiz Progress",
7 | "category": "widgets",
8 | "keywords": [ "1835fa" ],
9 | "icon": "smiley",
10 | "description": "Show the quiz progress and check the answers",
11 | "supports": {
12 | "interactivity": true
13 | },
14 | "textdomain": "block-development-examples",
15 | "editorScript": "file:./index.js",
16 | "render": "file:./render.php",
17 | "viewScriptModule": "file:./view.js"
18 | }
19 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-progress-1835fa/edit.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | import { __ } from '@wordpress/i18n';
3 | import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
4 |
5 | export default function Edit() {
6 | return (
7 |
8 |
9 |
10 | { __( 'Exercises', 'block-development-examples' ) }:{ ' ' }
11 | { ' ' }
12 | 3
13 |
14 |
15 |
16 | { __( 'Answered', 'block-development-examples' ) }:{ ' ' }
17 | { ' ' }
18 | 0
19 |
20 |
21 |
22 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/plugins/interactivity-api-quiz-1835fa/src/blocks/quiz-progress-1835fa/index.js:
--------------------------------------------------------------------------------
1 | import { registerBlockType } from '@wordpress/blocks';
2 | import { InnerBlocks } from '@wordpress/block-editor';
3 | import Edit from './edit';
4 | import metadata from './block.json';
5 |
6 | registerBlockType( metadata.name, {
7 | edit: Edit,
8 | save: () => ,
9 | } );
10 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/.wp-env.json:
--------------------------------------------------------------------------------
1 | {
2 | "core": "WordPress/WordPress",
3 | "themes": [ "WordPress/twentytwentyfour" ],
4 | "plugins": [ "." ]
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/_playground/images/george-harrison.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactivity-router-2f43f8/_playground/images/george-harrison.webp
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/_playground/images/john-lennon.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactivity-router-2f43f8/_playground/images/john-lennon.webp
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/_playground/images/paul-mccartney.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactivity-router-2f43f8/_playground/images/paul-mccartney.webp
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/_playground/images/ringo-starr.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/interactivity-router-2f43f8/_playground/images/ringo-starr.webp
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'd5b9c976efea236bb3c3');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/build/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AADD,C","sources":["webpack://@block-development-examples/interactivity-router-2f43f8/./src/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n\n.wp-block-block-development-examples-interactivity-router-2f43f8 input[type=\"text\"] {\n\tfont-size: 1em;\n\tcolor: inherit;\n\tbackground: inherit;\n\tborder: 0;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-interactivity-router-2f43f8{background:rgba(0,255,8,.102);padding:1em}.wp-block-block-development-examples-interactivity-router-2f43f8 nav{font-weight:700}.wp-block-block-development-examples-interactivity-router-2f43f8 nav a{padding-right:1em}.wp-block-block-development-examples-interactivity-router-2f43f8 .box-content{border:2px solid #005700}.wp-block-block-development-examples-interactivity-router-2f43f8 .debug-info{font-size:.7em;margin-top:4em}.wp-block-block-development-examples-interactivity-router-2f43f8 .debug-info code{background-color:#f0f094}
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/build/view.asset.php:
--------------------------------------------------------------------------------
1 | array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'a6894f5f2021fc41944c', 'type' => 'module');
2 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/build/view.js:
--------------------------------------------------------------------------------
1 | import*as e from"@wordpress/interactivity";var r={438:e=>{e.exports=import("@wordpress/interactivity-router")}},t={};function o(e){var i=t[e];if(void 0!==i)return i.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);const i=(s={store:()=>e.store},n={},o.d(n,s),n),{state:a}=(0,i.store)("router-2f43f8",{state:{urlRegionDisplay:window.location.href},actions:{*navigate(e){e.preventDefault();const{actions:r}=yield Promise.resolve().then(o.bind(o,438));a.urlRegionDisplay=e.target.href,yield r.navigate(e.target.href)}}});var s,n;
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/src/edit.js:
--------------------------------------------------------------------------------
1 | import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
2 | import { EditInspectorControls } from './inspectorControls';
3 |
4 | export default function Edit( props ) {
5 | const blockProps = useBlockProps();
6 | return (
7 | <>
8 |
9 |
10 |
11 |
12 | >
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/src/save.js:
--------------------------------------------------------------------------------
1 | import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';
2 |
3 | const Save = () => {
4 | const blockProps = useBlockProps.save();
5 | return (
6 |
7 |
8 |
9 | );
10 | };
11 | export default Save;
12 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/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-block-development-examples-interactivity-router-2f43f8 {
9 | background: #00ff081a;
10 | padding: 1em;
11 |
12 | nav {
13 | font-weight: 700;
14 |
15 | a {
16 | padding-right: 1em;
17 | }
18 | }
19 |
20 | .box-content {
21 | border: 2px solid rgb( 0, 87, 0 );
22 | }
23 |
24 | .debug-info {
25 | font-size: 0.7em;
26 | margin-top: 4em;
27 |
28 | code {
29 | background-color: rgb( 240, 240, 148 );
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/plugins/interactivity-router-2f43f8/src/view.js:
--------------------------------------------------------------------------------
1 | import { store } from '@wordpress/interactivity';
2 |
3 | const { state } = store( 'router-2f43f8', {
4 | state: {
5 | urlRegionDisplay: window.location.href,
6 | },
7 | actions: {
8 | *navigate( e ) {
9 | e.preventDefault();
10 | const { actions } = yield import(
11 | '@wordpress/interactivity-router'
12 | );
13 | state.urlRegionDisplay = e.target.href;
14 | yield actions.navigate( e.target.href );
15 | },
16 | },
17 | } );
18 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/meta-block-bb1e55",
5 | "version": "0.1.0",
6 | "title": "Meta Block bb1e55",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "render": "file:./render.php",
14 | "keywords": [
15 | "bb1e55"
16 | ]
17 | }
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data'), 'version' => '975309ede196c8e95dc3');
2 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/build/render.php:
--------------------------------------------------------------------------------
1 | ID, 'myguten_meta_block_field', true );
11 | ?>
12 | >
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/build/style-index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://@block-development-examples/meta-block-bb1e55/./src/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-block-development-examples-meta-block-bb1e55 {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/meta-block-bb1e55",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/meta-block-bb1e55",
5 | "version": "0.1.0",
6 | "title": "Meta Block bb1e55",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "render": "file:./render.php",
14 | "keywords": [
15 | "bb1e55"
16 | ]
17 | }
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/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-block-development-examples-meta-block-bb1e55 {
8 | border: 1px dotted #f00;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/src/render.php:
--------------------------------------------------------------------------------
1 | ID, 'myguten_meta_block_field', true );
11 | ?>
12 |
13 | >
14 |
15 |
16 |
--------------------------------------------------------------------------------
/plugins/meta-block-bb1e55/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-block-development-examples-meta-block-bb1e55 {
9 | background-color: #21759b;
10 | color: #fff;
11 | padding: 2px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/.wp-env.json:
--------------------------------------------------------------------------------
1 | {
2 | "core": "WordPress/WordPress",
3 | "plugins": [
4 | "."
5 | ]
6 | }
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/_assets/block-json-and-js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/minimal-block-ca6eda/_assets/block-json-and-js.png
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/_assets/index-php.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/minimal-block-ca6eda/_assets/index-php.png
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "title": "Minimal Gutenberg Block ca6eda",
4 | "name": "block-development-examples/minimal-block-ca6eda",
5 | "category": "media",
6 | "icon": "smiley",
7 | "keywords": [
8 | "ca6eda"
9 | ],
10 | "editorScript": "file:./index.js"
11 | }
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks'), 'version' => '0752a58d06699a7461e3');
2 |
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/build/index.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";const e=window.React,o=window.wp.blocks,l=window.wp.blockEditor,c=JSON.parse('{"UU":"block-development-examples/minimal-block-ca6eda"}');(0,o.registerBlockType)(c.UU,{edit:()=>(0,e.createElement)("p",{...(0,l.useBlockProps)()},"Hello World - Block Editor"),save:()=>(0,e.createElement)("p",{...l.useBlockProps.save()},"Hello World - Frontend")})})();
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/minimal-block-ca6eda",
3 | "description": "",
4 | "version": "0.1.0",
5 | "scripts": {
6 | "build": "wp-scripts build",
7 | "plugin-zip": "wp-scripts plugin-zip",
8 | "start": "wp-scripts start",
9 | "env": "wp-env start"
10 | },
11 | "devDependencies": {
12 | "@wordpress/env": "^9.9.0",
13 | "@wordpress/scripts": "^27.8.0"
14 | },
15 | "files": [ "*" ]
16 | }
17 |
--------------------------------------------------------------------------------
/plugins/minimal-block-ca6eda/plugin.php:
--------------------------------------------------------------------------------
1 | Hello World - Block Editor
;
6 | const save = () => Hello World - Frontend
;
7 |
8 | registerBlockType( metadata.name, {
9 | edit: Edit,
10 | save,
11 | } );
12 |
--------------------------------------------------------------------------------
/plugins/minimal-block-no-build-e621a6/block.asset.php:
--------------------------------------------------------------------------------
1 | array('wp-blocks'),'version' => '0.1');
--------------------------------------------------------------------------------
/plugins/minimal-block-no-build-e621a6/block.js:
--------------------------------------------------------------------------------
1 | (function (blocks, element) {
2 | var el = element.createElement;
3 |
4 | blocks.registerBlockType("block-development-examples/minimal-block-no-build-e621a6", {
5 | edit: function () {
6 | return el("p", {} , "Hello World - Block Editor");
7 | },
8 | save: function () {
9 | return el("p", {} , "Hello World - Frontend");
10 | },
11 | });
12 | })(window.wp.blocks, window.wp.element);
13 |
--------------------------------------------------------------------------------
/plugins/minimal-block-no-build-e621a6/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": 3,
3 | "title": "Minimal Block No Build e621a6",
4 | "name": "block-development-examples/minimal-block-no-build-e621a6",
5 | "category": "media",
6 | "icon": "smiley",
7 | "editorScript": "file:./block.js"
8 | }
--------------------------------------------------------------------------------
/plugins/minimal-block-no-build-e621a6/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/minimal-block-no-build-e621a6",
3 | "description": "",
4 | "version": "0.1.0",
5 | "scripts": {
6 | "plugin-zip": "wp-scripts plugin-zip"
7 | },
8 | "devDependencies": {
9 | "@wordpress/scripts": "^27.8.0"
10 | },
11 | "files": [ "*" ]
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/minimal-block-no-build-e621a6/plugin.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '7e7ba0c454d3ca3b473e');
2 |
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/build/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;EACA;EACA;EACA;AAAD,C","sources":["webpack://my-first-interactive-block/./src/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-my-first-interactive-block input[type=\"text\"] {\n\tfont-size: 1em;\n\tcolor: inherit;\n\tbackground: inherit;\n\tborder: 0;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/build/style-index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD;AAEC;EACC;EACA;AAAF;AAEE;EACC;EACA;EACA;AAAH;AAGE;EACC;AADH,C","sources":["webpack://my-first-interactive-block/./src/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-my-first-interactive-block {\n\tfont-size: 1em;\n\tbackground: #ffff001a;\n\tpadding: 1em;\n\n\t&.dark-theme {\n\t\tbackground: #333;\n\t\tcolor: #fff;\n\n\t\tbutton {\n\t\t\tbackground: #555;\n\t\t\tcolor: #fff;\n\t\t\tborder: 1px solid #777;\n\t\t}\n\n\t\tp {\n\t\t\tcolor: #ddd;\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/build/view.asset.php:
--------------------------------------------------------------------------------
1 | array('@wordpress/interactivity'), 'version' => 'dcfafed077db25fc045e', 'type' => 'module');
2 |
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "create-block/my-first-interactive-block",
5 | "version": "0.1.0",
6 | "title": "My First Interactive Block",
7 | "category": "widgets",
8 | "icon": "media-interactive",
9 | "description": "An interactive block with the Interactivity API.",
10 | "example": {},
11 | "supports": {
12 | "interactivity": true
13 | },
14 | "textdomain": "my-first-interactive-block",
15 | "editorScript": "file:./index.js",
16 | "editorStyle": "file:./index.css",
17 | "style": "file:./style-index.css",
18 | "render": "file:./render.php",
19 | "viewScriptModule": "file:./view.js"
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/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-create-block-my-first-interactive-block input[type="text"] {
8 | font-size: 1em;
9 | color: inherit;
10 | background: inherit;
11 | border: 0;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/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-create-block-my-first-interactive-block {
9 | font-size: 1em;
10 | background: #ffff001a;
11 | padding: 1em;
12 |
13 | &.dark-theme {
14 | background: #333;
15 | color: #fff;
16 |
17 | button {
18 | background: #555;
19 | color: #fff;
20 | border: 1px solid #777;
21 | }
22 |
23 | p {
24 | color: #ddd;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/plugins/my-first-interactive-block/src/view.js:
--------------------------------------------------------------------------------
1 | /**
2 | * WordPress dependencies
3 | */
4 | import { store, getContext } from '@wordpress/interactivity';
5 |
6 | const { state } = store( 'create-block', {
7 | state: {
8 | get themeText() {
9 | return state.isDark ? state.darkText : state.lightText;
10 | },
11 | },
12 | actions: {
13 | toggleOpen() {
14 | const context = getContext();
15 | context.isOpen = ! context.isOpen;
16 | },
17 | toggleTheme() {
18 | state.isDark = ! state.isDark;
19 | },
20 | },
21 | callbacks: {
22 | logIsOpen: () => {
23 | const { isOpen } = getContext();
24 | // Log the value of `isOpen` each time it changes.
25 | console.log( `Is open: ${ isOpen }` );
26 | },
27 | },
28 | } );
29 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/_playground/blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://playground.wordpress.net/blueprint-schema.json",
3 | "landingPage": "/wp-admin/admin.php?page=react-example",
4 | "login": true,
5 | "steps": [
6 | {
7 | "step": "installPlugin",
8 | "pluginData": {
9 | "resource": "git:directory",
10 | "url": "https://github.com/WordPress/block-development-examples",
11 | "ref": "HEAD",
12 | "path": "plugins/non-block-react-wp-data-56d6f3"
13 | },
14 | "options": {
15 | "activate": true
16 | }
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('lodash', 'react', 'wp-compose', 'wp-data', 'wp-element'), 'version' => 'b4531cc6a3ca4955c45b');
2 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/src/index.js:
--------------------------------------------------------------------------------
1 | // Import dependencies
2 | import { render } from '@wordpress/element';
3 |
4 | import './store';
5 | import CounterList from './components/CounterList';
6 |
7 | // Render component in DOM
8 | const wrapper = document.getElementById( 'react-example-wrapper' );
9 | render( , wrapper );
10 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/src/store/actions.js:
--------------------------------------------------------------------------------
1 | export function addCounter( counterId ) {
2 | return {
3 | type: 'ADD_COUNTER',
4 | counterId,
5 | };
6 | }
7 |
8 | export function removeCounter( counterId ) {
9 | return {
10 | type: 'REMOVE_COUNTER',
11 | counterId,
12 | };
13 | }
14 |
15 | export function setCounterValue( counterId, value ) {
16 | return {
17 | type: 'SET_COUNTER_VALUE',
18 | counterId,
19 | value,
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/src/store/index.js:
--------------------------------------------------------------------------------
1 | // Load dependencies
2 | import { registerStore } from '@wordpress/data';
3 |
4 | import reducer from './reducer';
5 | import * as actions from './actions';
6 | import * as selectors from './selectors';
7 |
8 | registerStore( 'react-example/counters', {
9 | actions,
10 | reducer,
11 | selectors,
12 | } );
13 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/src/store/reducer.js:
--------------------------------------------------------------------------------
1 | import { map, find, without } from 'lodash';
2 |
3 | export default function reducer( state = [], action ) {
4 | switch ( action.type ) {
5 | case 'ADD_COUNTER':
6 | return [ ...state, { id: action.counterId, value: 0 } ];
7 |
8 | case 'REMOVE_COUNTER':
9 | return without( state, find( state, { id: action.counterId } ) );
10 |
11 | case 'SET_COUNTER_VALUE':
12 | return map( state, ( counter ) =>
13 | counter.id === action.counterId
14 | ? { ...counter, value: action.value }
15 | : counter
16 | );
17 | }
18 |
19 | return state;
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/non-block-react-wp-data-56d6f3/src/store/selectors.js:
--------------------------------------------------------------------------------
1 | import { map, find } from 'lodash';
2 |
3 | export function getCounterIds( state ) {
4 | return map( state, 'id' );
5 | }
6 |
7 | export function getCounterValue( state, counterId ) {
8 | const counter = find( state, { id: counterId } ) || {};
9 | return counter.value;
10 | }
11 |
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/_assets/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/plugin-sidebar-9ee4a6/_assets/screenshot.png
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/build/plugin-sidebar-9ee4a6.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-components', 'wp-core-data', 'wp-edit-post', 'wp-plugins'), 'version' => '1dcd9c17d46100183a2b');
2 |
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/build/plugin-sidebar-9ee4a6.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";const e=window.React,n=window.wp.plugins,t=window.wp.editPost,l=window.wp.components,i=window.wp.coreData,o=()=>{const[n,t]=(0,i.useEntityProp)("postType","post","meta");return(0,e.createElement)(l.PanelBody,null,(0,e.createElement)(l.TextControl,{label:"Meta Block Field",value:n?.sidebar_plugin_meta_block_field||"",onChange:e=>t({...n,sidebar_plugin_meta_block_field:e})}))};(0,n.registerPlugin)("plugin-sidebar-9ee4a6",{render:()=>(0,e.createElement)(t.PluginSidebar,null,(0,e.createElement)(o,null))})})();
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/plugin-sidebar-9ee4a6",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/plugin-sidebar-9ee4a6/webpack.config.js:
--------------------------------------------------------------------------------
1 | // Import the original config from the @wordpress/scripts package.
2 | const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
3 |
4 | // Import the helper to find and generate the entry points in the src directory
5 | const { getWebpackEntryPoints } = require( '@wordpress/scripts/utils/config' );
6 |
7 | // Add any a new entry point by extending the webpack config.
8 | module.exports = {
9 | ...defaultConfig,
10 | entry: {
11 | ...getWebpackEntryPoints(),
12 | 'plugin-sidebar-9ee4a6': './src/plugin-sidebar-9ee4a6.js',
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/_assets/post-meta-modal.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/post-meta-modal-2502fb/_assets/post-meta-modal.gif
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/_playground/blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://playground.wordpress.net/blueprint-schema.json",
3 | "landingPage": "/wp-admin/post.php?post=1&action=edit",
4 | "login": true,
5 | "steps": [
6 | {
7 | "step": "installPlugin",
8 | "pluginData": {
9 | "resource": "git:directory",
10 | "url": "https://github.com/WordPress/block-development-examples",
11 | "ref": "HEAD",
12 | "path": "plugins/post-meta-modal-2502fb"
13 | },
14 | "options": {
15 | "activate": true
16 | }
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-commands', 'wp-components', 'wp-core-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => 'e753f67a7eb36c143967');
2 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/build/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.css","mappings":";;;AAAA;;EAAA;AAOE;EACC;EACA;EACA;AAHH,C","sources":["webpack://@block-development-examples/post-meta-modal-2502fb/./src/index.scss"],"sourcesContent":["/**\n * Editor-specific styles.\n */\n.post-meta-modal-2502fb-container {\n\n\t.components-modal__content {\n\n\t\t> div:not( .components-modal__header ) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 16px;\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/post-meta-modal-2502fb",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | },
17 | "description": "Post Meta Modal",
18 | "dependencies": {
19 | "@wordpress/icons": "^9.48.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/post-meta-modal-2502fb/src/index.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Editor-specific styles.
3 | */
4 | .post-meta-modal-2502fb-container {
5 |
6 | .components-modal__content {
7 |
8 | > div:not( .components-modal__header ) {
9 | display: flex;
10 | flex-direction: column;
11 | gap: 16px;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/build/post-meta-testimonial/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-core-data', 'wp-i18n'), 'version' => 'ad1fa289c8661a8cb6a1');
2 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/build/post-meta-testimonial/index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"post-meta-testimonial/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://post-meta-testimonial/./src/post-meta-testimonial/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-tutorial-post-meta-testimonial {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/build/post-meta-testimonial/style-index.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"post-meta-testimonial/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD,C","sources":["webpack://post-meta-testimonial/./src/post-meta-testimonial/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-tutorial-post-meta-testimonial {\n\tborder-left: 0.25em solid;\n\tmargin: 0 0 1.75em;\n\tpadding-left: 1em;\n\tborder-width: 1px;\n}\n"],"names":[],"sourceRoot":""}
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/build/post-meta-testimonial/view.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => '9af11b3596dfdd247855');
2 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "post-meta-testimonial",
3 | "version": "0.1.0",
4 | "description": "A block quote style testimonial that saves to post meta.",
5 | "author": "The WordPress Contributors",
6 | "license": "GPL-2.0-or-later",
7 | "main": "build/index.js",
8 | "scripts": {
9 | "build": "wp-scripts build --webpack-copy-php",
10 | "format": "wp-scripts format",
11 | "lint:css": "wp-scripts lint-style",
12 | "lint:js": "wp-scripts lint-js",
13 | "packages-update": "wp-scripts packages-update",
14 | "plugin-zip": "wp-scripts plugin-zip",
15 | "start": "wp-scripts start --webpack-copy-php"
16 | },
17 | "devDependencies": {
18 | "@wordpress/scripts": "^30.11.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/src/post-meta-testimonial/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-tutorial-post-meta-testimonial {
8 | border: 1px dotted #f00;
9 | }
10 |
--------------------------------------------------------------------------------
/plugins/post-meta-testimonial/src/post-meta-testimonial/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-tutorial-post-meta-testimonial {
9 | border-left: 0.25em solid;
10 | margin: 0 0 1.75em;
11 | padding-left: 1em;
12 | border-width: 1px;
13 | }
14 |
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/_playground/blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "landingPage": "/wp-admin/post.php?post=10&action=edit",
3 | "login": true,
4 | "steps": [
5 | {
6 | "step": "installPlugin",
7 | "pluginData": {
8 | "resource": "git:directory",
9 | "url": "https://github.com/WordPress/block-development-examples",
10 | "ref": "HEAD",
11 | "path": "plugins/recipe-card-744e8a"
12 | },
13 | "options": {
14 | "activate": true
15 | }
16 | },
17 | {
18 | "step": "resetData"
19 | },
20 | {
21 | "step": "importWxr",
22 | "file": {
23 | "resource": "url",
24 | "url": "https://raw.githubusercontent.com/WordPress/block-development-examples/trunk/plugins/recipe-card-744e8a/_playground/export.xml"
25 | }
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/_playground/spaghetti.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/recipe-card-744e8a/_playground/spaghetti.png
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '2d66d6bc277e6e87d014');
2 |
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/languages/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/recipe-card-744e8a/languages/.gitkeep
--------------------------------------------------------------------------------
/plugins/recipe-card-744e8a/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/recipe-card-744e8a",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
3 | "settings": {
4 | "jest": {
5 | "version": 26
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/_playground/blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://playground.wordpress.net/blueprint-schema.json",
3 | "landingPage": "/wp-admin/post-new.php",
4 | "login": true,
5 | "preferredVersions": {
6 | "php": "8.0",
7 | "wp": "latest"
8 | },
9 | "steps": [
10 | {
11 | "step": "installPlugin",
12 | "pluginData": {
13 | "resource": "git:directory",
14 | "url": "https://github.com/WordPress/block-development-examples",
15 | "ref": "HEAD",
16 | "path": "plugins/server-side-render-block-d26119"
17 | },
18 | "options": {
19 | "activate": true
20 | }
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/server-side-render-block-d26119",
5 | "version": "0.1.0",
6 | "title": "Server Side Render Block d26119",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "label": {
12 | "type": "string"
13 | }
14 | },
15 | "editorScript": "file:./index.js",
16 | "keywords": [
17 | "d26119"
18 | ]
19 | }
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-server-side-render'), 'version' => '151013776f47b0212a6b');
2 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/server-side-render-block-d26119",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^26.15.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/server-side-render-block-d26119",
5 | "version": "0.1.0",
6 | "title": "Server Side Render Block d26119",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "attributes": {
11 | "label": {
12 | "type": "string"
13 | }
14 | },
15 | "editorScript": "file:./index.js",
16 | "keywords": [
17 | "d26119"
18 | ]
19 | }
--------------------------------------------------------------------------------
/plugins/server-side-render-block-d26119/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 | * Internal dependencies
10 | */
11 | import Edit from './edit';
12 | import metadata from './block.json';
13 |
14 | /**
15 | * Every block starts by registering a new block type definition.
16 | *
17 | * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
18 | */
19 | registerBlockType( metadata.name, {
20 | /**
21 | * @see ./edit.js
22 | */
23 | edit: Edit,
24 | } );
25 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/settings-sidebar-82c525",
5 | "version": "0.1.0",
6 | "title": "Settings Sidebar 82c525",
7 | "category": "widgets",
8 | "example": {},
9 | "attributes": {
10 | "message": {
11 | "type": "string",
12 | "source": "text",
13 | "selector": "div",
14 | "default": ""
15 | },
16 | "bg_color": {
17 | "type": "string",
18 | "default": "#000000"
19 | },
20 | "text_color": {
21 | "type": "string",
22 | "default": "#ffffff"
23 | }
24 | },
25 | "textdomain": "block-development-examples",
26 | "editorScript": "file:./index.js",
27 | "keywords": [
28 | "82c525"
29 | ]
30 | }
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '4cb1f737a40f9bc620b7');
2 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/settings-sidebar-82c525",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | },
17 | "dependencies": {
18 | "@wordpress/icons": "^9.48.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/settings-sidebar-82c525",
5 | "version": "0.1.0",
6 | "title": "Settings Sidebar 82c525",
7 | "category": "widgets",
8 | "example": {},
9 | "attributes": {
10 | "message": {
11 | "type": "string",
12 | "source": "text",
13 | "selector": "div",
14 | "default": ""
15 | },
16 | "bg_color": {
17 | "type": "string",
18 | "default": "#000000"
19 | },
20 | "text_color": {
21 | "type": "string",
22 | "default": "#ffffff"
23 | }
24 | },
25 | "textdomain": "block-development-examples",
26 | "editorScript": "file:./index.js",
27 | "keywords": [
28 | "82c525"
29 | ]
30 | }
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/src/index.js:
--------------------------------------------------------------------------------
1 | import { registerBlockType } from '@wordpress/blocks';
2 |
3 | import Edit from './edit';
4 | import save from './save';
5 | import metadata from './block.json';
6 |
7 | registerBlockType( metadata.name, {
8 | edit: Edit,
9 | save,
10 | } );
11 |
--------------------------------------------------------------------------------
/plugins/settings-sidebar-82c525/src/save.js:
--------------------------------------------------------------------------------
1 | import { useBlockProps } from '@wordpress/block-editor';
2 |
3 | export default function save( { attributes } ) {
4 | return (
5 |
12 | { attributes.message }
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/plugins/slotfill-2fb190/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/slotfill-2fb190/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/slotfill-2fb190/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '23e31183eaca6f986533');
2 |
--------------------------------------------------------------------------------
/plugins/slotfill-2fb190/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/slotfill-2fb190",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/slotfill-2fb190/src/index.js:
--------------------------------------------------------------------------------
1 | import { registerSlotFillWithPluginDocumentSettingPanel } from './slotfill-PluginDocumentSettingPanel-2fb190';
2 | import { registerSlotFillWithPluginSidebar } from './slotfill-PluginSidebar-2fb190';
3 |
4 | const slotFillExamples = {
5 | PluginSidebar: registerSlotFillWithPluginSidebar,
6 | PluginDocumentSettingPanel: registerSlotFillWithPluginDocumentSettingPanel,
7 | };
8 |
9 | const { slotFill2FB190ExampleLoad } = window;
10 |
11 | if ( slotFill2FB190ExampleLoad ) {
12 | console.log( 'individualExample', slotFill2FB190ExampleLoad );
13 | slotFillExamples[ slotFill2FB190ExampleLoad ]();
14 | } else {
15 | console.log( 'running all Examples' );
16 | for ( const example in slotFillExamples ) {
17 | slotFillExamples[ example ]();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/.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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/.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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/_assets/frontend-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/stylesheets-79a4c3/_assets/frontend-view.png
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/_assets/source-code-html-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/stylesheets-79a4c3/_assets/source-code-html-output.png
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/_assets/source-code-style-html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/block-development-examples/6cf9e72a0ae1ae55fcdd0347356bed673393aa9d/plugins/stylesheets-79a4c3/_assets/source-code-style-html.png
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/build/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/stylesheets-79a4c3",
5 | "version": "0.1.0",
6 | "title": "Stylesheets 79a4c3",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "keywords": [
14 | "79a4c3"
15 | ]
16 | }
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/build/index.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '0466a7809d358ed3ec70');
2 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/build/index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-stylesheets-79a4c3{background:#cfc;border:2px solid #9c9;color:green;padding:20px}
2 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/build/style-index.css:
--------------------------------------------------------------------------------
1 | .wp-block-block-development-examples-stylesheets-79a4c3{background:#fcc;border:2px solid #c99;color:darkred;padding:20px}.wp-block-block-development-examples-stylesheets-79a4c3.has-perspective{transform:perspective(400px) rotate3d(1,-1,0,8deg)}.wp-block-block-development-examples-stylesheets-79a4c3.has-perspective:hover{transform:perspective(400px) rotate3d(1,-1,0,-8deg)}
2 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@block-development-examples/stylesheets-79a4c3",
3 | "version": "0.1.0",
4 | "author": "The WordPress Contributors",
5 | "license": "GPL-2.0-or-later",
6 | "scripts": {
7 | "build": "wp-scripts build",
8 | "start": "wp-scripts start",
9 | "plugin-zip": "wp-scripts plugin-zip"
10 | },
11 | "files": [
12 | "*"
13 | ],
14 | "devDependencies": {
15 | "@wordpress/scripts": "^27.8.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/src/README.md:
--------------------------------------------------------------------------------
1 | ### Stylesheets 79a4c3
2 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/src/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schemas.wp.org/trunk/block.json",
3 | "apiVersion": 3,
4 | "name": "block-development-examples/stylesheets-79a4c3",
5 | "version": "0.1.0",
6 | "title": "Stylesheets 79a4c3",
7 | "category": "widgets",
8 | "example": {},
9 | "textdomain": "block-development-examples",
10 | "editorScript": "file:./index.js",
11 | "editorStyle": "file:./index.css",
12 | "style": "file:./style-index.css",
13 | "keywords": [
14 | "79a4c3"
15 | ]
16 | }
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/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-block-development-examples-stylesheets-79a4c3 {
8 | color: #008000;
9 | background: #cfc;
10 | border: 2px solid #9c9;
11 | padding: 20px;
12 | }
13 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/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-block-development-examples-stylesheets-79a4c3 {
9 | color: #8b0000;
10 | background: #fcc;
11 | border: 2px solid #c99;
12 | padding: 20px;
13 |
14 | &.has-perspective {
15 | transform: perspective( 400px ) rotate3d( 1, -1, 0, 8deg );
16 | }
17 |
18 | &.has-perspective:hover {
19 | transform: perspective( 400px ) rotate3d( 1, -1, 0, -8deg );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/plugins/stylesheets-79a4c3/src/view.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-console */
2 | console.log(
3 | 'Hello World! (from block-development-examples-stylesheets-79a4c3 block)'
4 | );
5 | /* eslint-enable no-console */
6 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - "plugins/**"
--------------------------------------------------------------------------------
/templates/block-examples/readmes/README-EXAMPLE.tpl.md:
--------------------------------------------------------------------------------
1 | The goal of this example is to ...
2 |
3 |
4 |
5 |
6 |
7 | ## Understanding the Example Code
8 |
9 | Overview of the code in bullet point form.
10 |
11 | ## Related resources
12 |
13 | Bulleted list of references
14 |
15 | ---
16 |
17 | > **Note**
18 | > Check the [Start Guide for local development with the examples](https://github.com/WordPress/block-development-examples/wiki/Examples#start-guide-for-local-development-with-the-examples)
19 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/block/$slug.js.mustache:
--------------------------------------------------------------------------------
1 | {{#isNon-blockVariant}}
2 | /**
3 | * WordPress dependencies
4 | */
5 |
6 | /**
7 | * Internal dependencies
8 | */
9 | {{/isNon-blockVariant}}
10 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/block/editor.scss.mustache:
--------------------------------------------------------------------------------
1 | {{^isNon-blockVariant}}
2 | /**
3 | * The following styles get applied inside the editor only.
4 | *
5 | * Replace them with your own styles or remove the file completely.
6 | */
7 |
8 | .wp-block-{{namespace}}-{{slug}} {
9 | border: 1px dotted #f00;
10 | }
11 | {{/isNon-blockVariant}}
12 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/block/render.php.mustache:
--------------------------------------------------------------------------------
1 | {{^isNon-blockVariant}}
2 | {{#isDynamicVariant}}
3 |
12 | >
13 |
14 |
15 | {{/isDynamicVariant}}
16 | {{/isNon-blockVariant}}
17 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/block/style.scss.mustache:
--------------------------------------------------------------------------------
1 | {{^isNon-blockVariant}}
2 | /**
3 | * The following styles get applied both on the front of your site
4 | * and in the editor.
5 | *
6 | * Replace them with your own styles or remove the file completely.
7 | */
8 |
9 | .wp-block-{{namespace}}-{{slug}} {
10 | background-color: #21759b;
11 | color: #fff;
12 | padding: 2px;
13 | }
14 | {{/isNon-blockVariant}}
15 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/block/view.js.mustache:
--------------------------------------------------------------------------------
1 | {{^isNon-blockVariant}}
2 | /* eslint-disable no-console */
3 | console.log("Hello World! (from {{namespace}}-{{slug}} block)");
4 | /* eslint-enable no-console */
5 | {{/isNon-blockVariant}}
6 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/plugin/.editorconfig.mustache:
--------------------------------------------------------------------------------
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 |
16 | [*.{yml,yaml}]
17 | indent_style = space
18 | indent_size = 2
19 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/plugin/.eslintrc.mustache:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
3 | "settings": {
4 | "jest": {
5 | "version": 26
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/plugin/.gitignore.mustache:
--------------------------------------------------------------------------------
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 | # Output of `wp-scripts plugin-zip`
27 | *.zip
28 |
29 | # dotenv environment variables file
30 | .env
31 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/plugin/README.md.mustache:
--------------------------------------------------------------------------------
1 | # {{title}}
2 |
3 | The goal of this example is to ...
4 |
5 |
6 |
7 |
8 |
9 | ## Understanding the Example Code
10 |
11 | Overview of the code in bullet point form.
12 |
13 | ## Related resources
14 |
15 | Bulleted list of references
16 |
17 | ----
18 |
19 | > **Note**
20 | > Check the [Start Guide for local development with the examples](https://github.com/WordPress/block-development-examples/wiki/Examples#start-guide-for-local-development-with-the-examples)
21 |
22 |
--------------------------------------------------------------------------------
/templates/block-examples/templates/plugin/webpack.config.js.mustache:
--------------------------------------------------------------------------------
1 | {{#isNon-blockVariant}}
2 | // Import the original config from the @wordpress/scripts package.
3 | const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
4 |
5 | // Import the helper to find and generate the entry points in the src directory
6 | const { getWebpackEntryPoints } = require( '@wordpress/scripts/utils/config' );
7 |
8 | // Add any a new entry point by extending the webpack config.
9 | module.exports = {
10 | ...defaultConfig,
11 | entry: {
12 | ...getWebpackEntryPoints(),
13 | '{{slug}}': './src/{{slug}}.js'
14 | },
15 | };
16 | {{/isNon-blockVariant}}
17 |
--------------------------------------------------------------------------------