Skip to content

Commit

Permalink
Issue #1 - improve strings and add keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jul 29, 2020
1 parent 23758d1 commit c434659
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/breadcrumbs-block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';

import { ServerSideRender } from '@wordpress/editor';
import { Fragment} from '@wordpress/element';
//import { InspectorControls } from '@wordpress/block-editor';
Expand All @@ -30,9 +28,7 @@ import './editor.scss';
* @return {WPElement} Element to render.
*/
export default function edit ( { attributes, className, isSelected, setAttributes } ) {
const color = __( 'color', 'sb-breadcrumbs-block');
var col = color;
return (
return (
<Fragment>
<ServerSideRender
block="sb/breadcrumbs-block" attributes={attributes}
Expand Down
20 changes: 18 additions & 2 deletions src/breadcrumbs-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,35 @@ registerBlockType( 'sb/breadcrumbs-block', {
* This is a short description for your block, can be translated with `i18n` functions.
* It will be shown in the Block Tab in the Settings Sidebar.
*/
description: __( 'Show breadcrumbs of the current content as a link.', 'sb-breadcrumbs-block' ),
description: __( 'Show breadcrumb links to the current content.', 'sb-breadcrumbs-block' ),

/**
* Blocks are grouped into categories to help users browse and discover them.
* The categories provided by core are `common`, `embed`, `formatting`, `layout` and `widgets`.
*
* In WordPress 5.5 some of the categories have changed:
* Replace | With
* ------ | -----
* Common | Text
* Formatting | Text
* layout | Design
*
* Widgets, Embeds and Reusable blocks will remain the same.
* There's a new category: Media
*/
category: 'widgets',

/**
* An icon property should be specified to make it easier to identify a block.
* These can be any of WordPress’ Dashicons, or a custom svg element.
*/
icon: 'link',
icon: 'arrow-right-alt2',

keywords: [
__( 'Breadcrumbs', 'sb-breadcrumbs-block' ),
__( 'Trail', 'sb-breadcrumbs-block' ),
__( 'Ancestors', 'sb-breadcrumbs-block' ),
],

/**
* Optional block extended support features.
Expand Down
1 change: 0 additions & 1 deletion src/breadcrumbs-block/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
*/
export default function save() {
return null;

}

0 comments on commit c434659

Please sign in to comment.