Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"extends": [ "@wordpress/stylelint-config/scss" ],
"ignoreFiles": [ "_app/**/*.css", "plugins/**/build/**/*.css" ],
"rules": {
"function-parentheses-space-inside": null,
"selector-pseudo-class-parentheses-space-inside": null,
"selector-class-pattern": null
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/markdown-table": "^2.0.0",
"@types/node": "^22.10.2",
"@wordpress/env": "^8.11.0",
"@wordpress/scripts": "^27.8.0",
"@wordpress/scripts": "^30.26.0",
"clean-webpack-plugin": "^4.0.0",
"gh-pages": "^6.1.1",
"husky": "^8.0.0",
Expand Down
20 changes: 20 additions & 0 deletions plugins/basic-block-translations-3df23d/build/blocks-manifest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'build' => array(
'$schema' => 'https://json.schemastore.org/block.json',
'apiVersion' => 3,
'name' => 'block-development-examples/basic-block-translations-3df23d',
'title' => 'Basic block Translations',
'textdomain' => 'block-development-examples',
'icon' => 'smiley',
'category' => 'widgets',
'example' => array(

),
'editorScript' => 'file:./index.js',
'keywords' => array(
'3df23d'
)
)
);
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'dac6e751c26d2f27648a');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'c4c3b106157925b1e1f6');
2 changes: 1 addition & 1 deletion plugins/basic-block-translations-3df23d/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions plugins/basic-block-translations-3df23d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"main": "build/index.js",
"scripts": {
"build": "wp-scripts build",
"build": "wp-scripts build --blocks-manifest",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format": "wp-scripts format",
Expand All @@ -16,14 +16,14 @@
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip",
"start": "wp-scripts start",
"start": "wp-scripts start --blocks-manifest",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js",
"make-pot": "wp i18n make-pot . languages/awp.pot --slug=awp --domain=awp --exclude=node_modules,src",
"make-json": "wp i18n make-json languages/ --no-purge"
},
"devDependencies": {
"@wordpress/scripts": "^27.8.0"
"@wordpress/scripts": "^30.26.0"
},
"files": [
"*"
Expand Down
40 changes: 35 additions & 5 deletions plugins/basic-block-translations-3df23d/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,45 @@ function basic_block_3df23d___load_textdomain() {
add_action( 'init', 'basic_block_3df23d___load_textdomain' );

/**
* Registers all block assets so that they can be enqueued through Gutenberg in
* the corresponding context.
* Registers the block using a `blocks-manifest.php` file, which improves the performance of block type registration.
* Behind the scenes, it also registers all assets so they can be enqueued
* through the block editor in the corresponding context.
*
* Passes translations to JavaScript.
*
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
function basic_block_3df23d___register_block() {

// Register the block by passing the location of block.json to register_block_type.
register_block_type( __DIR__ . '/build' );
/**
* Registers the block(s) metadata from the `blocks-manifest.php` and registers the block type(s)
* based on the registered block metadata.
* Added in WordPress 6.8 to simplify the block metadata registration process added in WordPress 6.7.
*
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
*/
if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
} else {
/**
* Registers the block(s) metadata from the `blocks-manifest.php` file.
* Added to WordPress 6.7 to improve the performance of block type registration.
*
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
}
/**
* Registers the block type(s) in the `blocks-manifest.php` file.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
foreach ( array_keys( $manifest_data ) as $block_type ) {
register_block_type( __DIR__ . "/build/{$block_type}" );
}
}

if ( function_exists( 'wp_set_script_translations' ) ) {
/**
Expand Down
22 changes: 22 additions & 0 deletions plugins/basic-esnext-a2ab62/build/blocks-manifest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'build' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'block-development-examples/basic-esnext-a2ab62',
'version' => '0.1.0',
'title' => 'Basic Esnext a2ab62',
'category' => 'widgets',
'example' => array(

),
'textdomain' => 'block-development-examples',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'keywords' => array(
'a2ab62'
)
)
);
2 changes: 1 addition & 1 deletion plugins/basic-esnext-a2ab62/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '9a27c1f28749b329c7ff');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '69548a5a434111c46881');
2 changes: 1 addition & 1 deletion plugins/basic-esnext-a2ab62/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions plugins/basic-esnext-a2ab62/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"scripts": {
"build": "wp-scripts build",
"start": "wp-scripts start",
"build": "wp-scripts build --blocks-manifest",
"start": "wp-scripts start --blocks-manifest",
"plugin-zip": "wp-scripts plugin-zip"
},
"files": [
"*"
],
"devDependencies": {
"@wordpress/scripts": "^27.8.0"
"@wordpress/scripts": "^30.26.0"
}
}
38 changes: 34 additions & 4 deletions plugins/basic-esnext-a2ab62/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,43 @@
*/

/**
* Registers the block using the metadata loaded from the `block.json` file.
* Behind the scenes, it registers also all assets so they can be enqueued
* Registers the block using a `blocks-manifest.php` file, which improves the performance of block type registration.
* Behind the scenes, it also registers all assets so they can be enqueued
* through the block editor in the corresponding context.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
function basic_esnext_a2ab62__register_block() {
register_block_type( __DIR__ . '/build' );
/**
* Registers the block(s) metadata from the `blocks-manifest.php` and registers the block type(s)
* based on the registered block metadata.
* Added in WordPress 6.8 to simplify the block metadata registration process added in WordPress 6.7.
*
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
*/
if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
return;
}

/**
* Registers the block(s) metadata from the `blocks-manifest.php` file.
* Added to WordPress 6.7 to improve the performance of block type registration.
*
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
}
/**
* Registers the block type(s) in the `blocks-manifest.php` file.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
foreach ( array_keys( $manifest_data ) as $block_type ) {
register_block_type( __DIR__ . "/build/{$block_type}" );
}
}
add_action( 'init', 'basic_esnext_a2ab62__register_block' );
29 changes: 29 additions & 0 deletions plugins/block-dynamic-rendering-64756b/build/blocks-manifest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'build' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'block-development-examples/block-dynamic-rendering-64756b',
'version' => '0.1.0',
'title' => 'Block Dynamic Rendering',
'category' => 'widgets',
'icon' => 'smiley',
'description' => 'Example block scaffolded with Create Block tool.',
'example' => array(

),
'supports' => array(
'html' => false
),
'keywords' => array(
'64756b'
),
'textdomain' => '01-block-dynamic',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'render' => 'file:./render.php',
'viewScript' => 'file:./view.js'
)
);
1 change: 1 addition & 0 deletions plugins/block-dynamic-rendering-64756b/build/index-rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-block-development-examples-block-dynamic-rendering-64756b{border:1px dotted red}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '78def22dbda6fea8738e');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'ed9fb1e3b3c2fc77137c');
2 changes: 1 addition & 1 deletion plugins/block-dynamic-rendering-64756b/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-block-development-examples-block-dynamic-rendering-64756b{background-color:#21759b;color:#fff;padding:2px}
6 changes: 3 additions & 3 deletions plugins/block-dynamic-rendering-64756b/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"main": "build/index.js",
"scripts": {
"build": "wp-scripts build",
"build": "wp-scripts build --blocks-manifest",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format": "wp-scripts format",
Expand All @@ -16,12 +16,12 @@
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip",
"start": "wp-scripts start",
"start": "wp-scripts start --blocks-manifest",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js"
},
"devDependencies": {
"@wordpress/scripts": "^27.8.0"
"@wordpress/scripts": "^30.26.0"
},
"files": [
"*"
Expand Down
38 changes: 34 additions & 4 deletions plugins/block-dynamic-rendering-64756b/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,43 @@
*/

/**
* Registers the block using the metadata loaded from the `block.json` file.
* Behind the scenes, it registers also all assets so they can be enqueued
* Registers the block using a `blocks-manifest.php` file, which improves the performance of block type registration.
* Behind the scenes, it also registers all assets so they can be enqueued
* through the block editor in the corresponding context.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
function block_dynamic_rendering_64756b___register_block() {
register_block_type( __DIR__ . '/build' );
/**
* Registers the block(s) metadata from the `blocks-manifest.php` and registers the block type(s)
* based on the registered block metadata.
* Added in WordPress 6.8 to simplify the block metadata registration process added in WordPress 6.7.
*
* @see https://make.wordpress.org/core/2025/03/13/more-efficient-block-type-registration-in-6-8/
*/
if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
wp_register_block_types_from_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
return;
}

/**
* Registers the block(s) metadata from the `blocks-manifest.php` file.
* Added to WordPress 6.7 to improve the performance of block type registration.
*
* @see https://make.wordpress.org/core/2024/10/17/new-block-type-registration-apis-to-improve-performance-in-wordpress-6-7/
*/
if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
wp_register_block_metadata_collection( __DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php' );
}
/**
* Registers the block type(s) in the `blocks-manifest.php` file.
*
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
foreach ( array_keys( $manifest_data ) as $block_type ) {
register_block_type( __DIR__ . "/build/{$block_type}" );
}
}
add_action( 'init', 'block_dynamic_rendering_64756b___register_block' );
28 changes: 28 additions & 0 deletions plugins/block-static-rendering-b16608/build/blocks-manifest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'build' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'block-development-examples/block-static-rendering-b16608',
'version' => '0.1.0',
'title' => '⭐️ Block with Static Rendering',
'category' => 'widgets',
'icon' => 'smiley',
'description' => 'Example block scaffolded with Create Block tool.',
'example' => array(

),
'keywords' => array(
'b16608'
),
'supports' => array(
'html' => false
),
'textdomain' => '02-block-static',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'viewScript' => 'file:./view.js'
)
);
1 change: 1 addition & 0 deletions plugins/block-static-rendering-b16608/build/index-rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wp-block-block-development-examples-block-static-rendering-b16608{border:1px dotted red}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '568d76548ebf72a732f0');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '4aaf75ae7449abb3e6c0');
Loading