-
Notifications
You must be signed in to change notification settings - Fork 316
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
Update for latest gutenberg compatibility #23
Changes from 1 commit
68f28d7
a52df7c
5c0d85d
feb53a7
f4b1aba
151bd61
2518aae
112440d
87b8161
455d715
91c1699
0f82a2d
eb2d489
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Using inline styles - no external stylesheet needed. Not recommended | ||
* because all of these styles will appear in `post_content`. | ||
*/ | ||
( function( blocks, i18n, element ) { | ||
(function (blocks, i18n, element) { | ||
var el = element.createElement; | ||
var __ = i18n.__; | ||
|
||
|
@@ -17,25 +17,25 @@ | |
}; | ||
|
||
blocks.registerBlockType( 'gutenberg-examples/example-01-basic', { | ||
title: __( 'Example: Basic', 'gutenberg-examples' ), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you removing the textdomain? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not all examples have text domain and currently it throws console error as we are not loading translations. |
||
title: __( 'Example: Basic' ), | ||
icon: 'universal-access-alt', | ||
category: 'layout', | ||
edit: function() { | ||
edit: function () { | ||
return el( | ||
'p', | ||
{ style: blockStyle }, | ||
'Hello World, step 1 (from the editor).' | ||
); | ||
}, | ||
save: function() { | ||
save: function () { | ||
return el( | ||
'p', | ||
{ style: blockStyle }, | ||
'Hello World, step 1 (from the frontend).' | ||
); | ||
}, | ||
} ); | ||
} )( | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This spacing shouldn't be collapsed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still whitespace issue here; space after |
||
})( | ||
window.wp.blocks, | ||
window.wp.i18n, | ||
window.wp.element | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be space after
function
. Should be space beforefunction
.