-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit c6c7d6d
Showing
22 changed files
with
43,134 additions
and
0 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
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,26 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 2, | ||
"name": "wpdev/double-image", | ||
"version": "0.1.0", | ||
"title": "Double Image", | ||
"category": "widgets", | ||
"icon": "smiley", | ||
"description": "Example block scaffolded with Create Block tool.", | ||
"supports": { | ||
"html": false | ||
}, | ||
"attributes": { | ||
"imageOne": { | ||
"type": "integer" | ||
}, | ||
"imageTwo": { | ||
"type": "integer" | ||
} | ||
}, | ||
"textdomain": "double-image", | ||
"editorScript": "file:./index.js", | ||
"editorStyle": "file:./index.css", | ||
"style": "file:./style-index.css", | ||
"render": "file:./render.php" | ||
} |
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 @@ | ||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-rich-text', 'wp-url'), 'version' => '9ad480287acafeb4cf4b'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,22 @@ | ||
<?php | ||
/** | ||
* Block render callback. | ||
* | ||
* @param array $attributes The block attributes. | ||
* @param string $content The block content. | ||
* @param WP_Block $block The block object. | ||
* | ||
* @package double-image | ||
*/ | ||
?> | ||
|
||
<div <?php echo get_block_wrapper_attributes(); ?> tabindex="0"> | ||
<?php | ||
if ( $attributes['imageOne'] ) { | ||
echo wp_get_attachment_image( $attributes['imageOne'], 'full' ); | ||
} | ||
if ( $attributes['imageTwo'] ) { | ||
echo wp_get_attachment_image( $attributes['imageTwo'], 'full' ); | ||
} | ||
?> | ||
</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,26 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Double Image | ||
* Description: Example block scaffolded with Create Block tool. | ||
* 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: double-image | ||
* | ||
* @package wpdev | ||
*/ | ||
|
||
/** | ||
* 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 wpdev_double_image_block_init() { | ||
register_block_type( __DIR__ . '/build' ); | ||
} | ||
add_action( 'init', 'wpdev_double_image_block_init' ); |
Oops, something went wrong.