-
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.
Issue #1 - Prototype a Single Block plugin, server side rendered, Bre…
…adcrumbs block with i18n.
- Loading branch information
0 parents
commit f5ac7b4
Showing
22 changed files
with
17,364 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,21 @@ | ||
# 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] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,27 @@ | ||
# 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 | ||
|
||
# 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,104 @@ | ||
# SB Children block | ||
![banner](https://raw.githubusercontent.com/bobbingwide/children-block/master/assets/children-block-banner-772x250.jpg) | ||
* Contributors: bobbingwide | ||
* Tags: block, children, parent, links | ||
* Requires at least: 5.4.2 | ||
* Tested up to: 5.4.2 | ||
* Stable tag: 0.3.2 | ||
* Requires PHP: 7.2.0 | ||
* License: GPL-2.0-or-later | ||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
List children of the current content as links. | ||
|
||
## Description | ||
The children-block provides two blocks | ||
|
||
1. oik/children-block - to list children of the current content as links. | ||
2. oik/parent-block - to display a link to the parent. | ||
|
||
## Installation | ||
|
||
1. Upload the plugin files to the `/wp-content/plugins/children-block` directory, or install the plugin through the WordPress plugins screen directly. | ||
1. Activate the plugin through the 'Plugins' screen in WordPress | ||
|
||
## Frequently Asked Questions | ||
|
||
# What are the values for the depth parameter? | ||
|
||
- Value - Meaning | ||
- 0 - Display all descendents in a tree | ||
- 1 - Display Children only | ||
- 2 - Display Children and Grandchildren | ||
- > 2 - Display more descendents | ||
- -1 - Display all descendents in a list | ||
|
||
# Why doesn't the parent block show multiple levels? | ||
|
||
That could be implemented using another block; a breadcrumbs block. | ||
|
||
## Screenshots | ||
1. Children block depth=0 | ||
2. Children block depth=1 | ||
3. Children block depth=-1 | ||
|
||
## Upgrade Notice | ||
# 0.3.2 | ||
Upgrade for some improved usage notes. | ||
|
||
# 0.3.1 | ||
Upgrade for some usage notes. | ||
|
||
# 0.3.0 | ||
Use the Parent block in child pages to link back to the parent page. | ||
|
||
# 0.2.0 | ||
Now implements the child list using server side rendering and supports the depth parameter | ||
|
||
# 0.1.0 | ||
Initial version generated by npm wp-create-block | ||
|
||
## Changelog | ||
# 0.3.2 | ||
* Changed: Attempted to improve usage notes in the readme. | ||
|
||
# 0.3.1 | ||
* Changed: Add screenshots, banner and update the readme. | ||
|
||
# 0.3.0 | ||
* Added: Parent block https://github.com/bobbingwide/children-block/issues/3 | ||
* Changed: Prepare for multiple blocks https://github.com/bobbingwide/children-block/issues/2 | ||
* Tested: With WordPress 5.4.2 and WordPress Multi Site | ||
* Tested: With PHP 7.3 and PHP 7.4 | ||
|
||
# 0.2.0 | ||
* Changed: Now implements the child list using server side rendering and supports the depth= parameter https://github.com/bobbingwide/children-block/issues/1 | ||
|
||
# 0.1.0 | ||
* First version as generated by npm wp-create-block | ||
|
||
## Build process | ||
|
||
- To build the blocks during development. | ||
|
||
`npm start` | ||
|
||
Press Ctrl-C to to stop process. | ||
|
||
- To build the blocks for runtime. | ||
|
||
`npm run build` | ||
|
||
The routine should terminate when the build is complete. | ||
|
||
* Note: The scripts don't yet support internationalization. | ||
|
||
Pre-requisite: | ||
|
||
You need to have `npm` - Node Package Manager - installed. | ||
|
||
For some basic instructions see the [oik-blocks summary of blocks README](https://github.com/bobbingwide/oik-blocks/tree/master/blocks) | ||
|
||
Most people run the `npm` command from the command line. | ||
|
||
|
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,14 @@ | ||
{ | ||
"name": "sb/breadcrumbs-block", | ||
"title": "Breadcrumbs block", | ||
"category": "widgets", | ||
"icon": "link", | ||
"description": "Display a lt.", | ||
"textdomain": "sb-parent-block", | ||
"supports": { | ||
"html": false | ||
}, | ||
"editorScript": "file:./build/index.js", | ||
"editorStyle": "file:./build/index.css", | ||
"style": "file:./build/style-index.css" | ||
} |
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('wp-blocks', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '40ff2cd7d053a2e8ceaa1e7ee4a5dc84'); |
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.
Oops, something went wrong.