Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused useSplit after #54543 #63825

Closed
wants to merge 16 commits into from
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ test/gutenberg-test-themes/twentytwentyone
test/gutenberg-test-themes/twentytwentythree
test/gutenberg-test-themes/twentytwentyfour
packages/react-native-editor/src/setup-local.js
.idea
development/core
development/themes
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"favorites.resources": [
{
"filePath": "packages/blocks",
"group": "Default"
},
{
"filePath": "packages/block-editor",
"group": "Default"
}
]
}
14 changes: 11 additions & 3 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{
"$schema": "./schemas/json/wp-env.json",
"core": "WordPress/WordPress",
"core": "./development/core",
"plugins": [ "." ],
"themes": [ "./test/emptytheme" ],
"env": {
"development": {
"mappings": {
"wp-content/plugins/hooked-block": "./development/plugins/hooked-block",
"wp-content/plugins/suspended-block": "./development/plugins/suspended-block",
"wp-content/plugins/interactivity-api": "./development/plugins/interactivity-api",
"wp-content/plugins/nested-block-editor": "./development/plugins/nested-block-editor",
"wp-content/themes/twentytwentyfour": "./development/themes/twentytwentyfour"
}
},
"tests": {
"mappings": {
"wp-content/plugins/gutenberg": ".",
"wp-content/mu-plugins": "./packages/e2e-tests/mu-plugins",
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins",
"wp-content/themes/gutenberg-test-themes": "./test/gutenberg-test-themes",
"wp-content/themes/gutenberg-test-themes/twentytwentyone": "https://downloads.wordpress.org/theme/twentytwentyone.2.1.zip",
"wp-content/themes/gutenberg-test-themes/twentytwentythree": "https://downloads.wordpress.org/theme/twentytwentythree.1.3.zip",
"wp-content/themes/gutenberg-test-themes/twentytwentyfour": "https://downloads.wordpress.org/theme/twentytwentyfour.1.0.zip"
"wp-content/themes/gutenberg-test-themes/twentytwentythree": "https://downloads.wordpress.org/theme/twentytwentythree.1.3.zip"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions development/core
Submodule core added at 13eb32
21 changes: 21 additions & 0 deletions development/plugins/hooked-block/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "my-plugin/hooked-block",
"title": "Hooked Block",
"category": "text",
"parent": [],
"icon": "smiley",
"description": "Block for inserting dummy content.",
"keywords": [ "dummy", "content" ],
"attributes": {
"content": {
"type": "string",
"default": "Hooked Block Dummy Content"
}
},
"blockHooks": {
"core/paragraph": "after",
"core/column": "firstChild"
}
}
18 changes: 18 additions & 0 deletions development/plugins/hooked-block/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

/**
* Plugin Name: Hooked Block
*/

declare(strict_types=1);

add_action('init', function () {
register_block_type_from_metadata(__DIR__ . '/block.json', [
'render_callback' => function ($attributes, $content) {
return "<small>{$attributes['content']}</small>";
}
]);
wp_enqueue_script('hooked-block', plugins_url('src/index.js', __FILE__), ['wp-blocks', 'wp-element'],'', [
'in_footer' => true
]);
});
9 changes: 9 additions & 0 deletions development/plugins/hooked-block/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
wp.blocks.registerBlockType( 'my-plugin/hooked-block', {
edit: ( props ) => {
return wp.element.createElement(
'small',
{},
props.attributes.content
);
},
} );
18 changes: 18 additions & 0 deletions development/plugins/interactivity-api/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2
30 changes: 30 additions & 0 deletions development/plugins/interactivity-api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory used by tools like istanbul
coverage

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of `npm pack`
*.tgz

# Output of `wp-scripts plugin-zip`
*.zip

# dotenv environment variables file
.env
23 changes: 23 additions & 0 deletions development/plugins/interactivity-api/interactivity-api.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* Plugin Name: Interactivity Api
* Description: Example of how to use Interactivity Api
* Requires at least: 6.1
* Requires PHP: 7.0
* Version: 0.1.0
* Author: The WordPress Contributors
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: interactivity-api
*
* @package interactivity-api
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

function interactivity_api_interactivity_api_block_init() {
register_block_type( __DIR__ . '/build/accordion' );
}
add_action( 'init', 'interactivity_api_interactivity_api_block_init' );
Loading
Loading