-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f872685
commit 0c24aec
Showing
25 changed files
with
20,876 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"[css][scss][javascript][json][markdown][yaml][typescript][typescriptreact]": { | ||
|
||
"editor.formatOnSave": true | ||
}, | ||
"phpcbf.enable": true, | ||
"phpcbf.executablePath": "${workspaceFolder}/vendor/bin/phpcbf", | ||
"phpcbf.onsave": false, | ||
"phpcbf.standard": "./phpcs.xml", | ||
"phpcs.enable": true, | ||
"phpcs.executablePath": "./vendor/bin/phpcs", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import apiFetch from '@wordpress/api-fetch'; | ||
let settings; | ||
export default { | ||
label: __( 'Excerpt' ), | ||
name: 'twitch/excerpt', | ||
getValues( { select, context, bindings } ) { | ||
if ( settings === undefined ) { | ||
apiFetch( { path: '/wp/v2/settings' } ).then( ( res ) => { | ||
console.log( 'calling' ); | ||
settings = res; | ||
} ); | ||
} | ||
|
||
return { | ||
content: settings?.description, | ||
}; | ||
// return { | ||
// content: | ||
// select( 'core/editor' ).getEditedPostAttribute( 'excerpt' ), | ||
// }; | ||
}, | ||
|
||
setValues( { select, dispatch, context, bindings } ) { | ||
// dispatch( 'core/editor' ).editPost( { | ||
// excerpt: bindings?.content?.newValue, | ||
// } ); | ||
}, | ||
|
||
canUserEditValue( { select, context } ) { | ||
return true; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Block Manifest | ||
* Description: Example block scaffolded with Create Block tool. | ||
* Requires at least: 6.6 | ||
* Requires PHP: 7.2 | ||
* 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: block-manifest | ||
* | ||
* @package Twitch | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; // Exit if accessed directly. | ||
} | ||
|
||
/** | ||
* 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 | ||
* through the block editor in the corresponding context. | ||
* | ||
* @see https://developer.wordpress.org/reference/functions/register_block_type/ | ||
*/ | ||
function twitch_block_manifest_block_init() { | ||
register_block_type( __DIR__ . '/build' ); | ||
} | ||
add_action( 'init', 'twitch_block_manifest_block_init' ); |
Oops, something went wrong.