From 00454e469955fa699bf7c6e49bd06039ccb5f044 Mon Sep 17 00:00:00 2001 From: Garrett Hyder Date: Mon, 4 Mar 2019 04:24:23 -0800 Subject: [PATCH] Lowercase Block Editor to block editor as per the core spelling Best Practices (#14205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description I've updated all references to Block Editor to be lowercase as they aren't proper nouns. This conforms to the core spelling Best Practices; “block editor” or “block-based editor” | “Block Editor” or “Gutenberg” | When referring to the new editor. Reference - https://make.wordpress.org/core/handbook/best-practices/spelling/ Also ties back to the original discussion around the capitalization convention here; https://github.com/WordPress/gutenberg/pull/12856 Previously opened #14203 to handle the Classic Editor changes. ## How has this been tested? Only tested that it didn't break anything. ## Types of changes Mostly comment changes, there was one string change and a couple translator comment changes. ## Checklist: - [x] My code is tested. - [x] My code follows the WordPress code style. - [x] My code follows the accessibility standards. - [x] My code has proper inline documentation. - [x] I've included developer documentation if appropriate. --- docs/designers-developers/designers/README.md | 2 +- .../javascript/extending-the-block-editor.md | 2 +- .../tutorials/javascript/loading-javascript.md | 4 ++-- .../developers/tutorials/javascript/readme.md | 4 ++-- .../metabox/meta-block-2-register-meta.md | 2 +- .../tutorials/metabox/meta-block-3-add.md | 2 +- .../developers/tutorials/metabox/readme.md | 2 +- .../developers/tutorials/notices/README.md | 18 +++++++++--------- gutenberg.php | 2 +- packages/block-editor/README.md | 2 +- packages/block-editor/package.json | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/designers-developers/designers/README.md b/docs/designers-developers/designers/README.md index 362cf794885f2..a630847b37661 100644 --- a/docs/designers-developers/designers/README.md +++ b/docs/designers-developers/designers/README.md @@ -1,3 +1,3 @@ # Designer Documentation -For those designing blocks and other Block Editor integrations, this documentation will provide resources for creating beautiful and intuitive layouts. +For those designing blocks and other block editor integrations, this documentation will provide resources for creating beautiful and intuitive layouts. diff --git a/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md b/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md index 8d175ef3e6d9b..024b1f50e9367 100644 --- a/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md +++ b/docs/designers-developers/developers/tutorials/javascript/extending-the-block-editor.md @@ -32,7 +32,7 @@ The last argument in the `wp_enqueue_script()` function is an array of dependenc See [Packages](/docs/designers-developers/developers/packages.md) for list of available packages and what objects they export. -After you have updated both JavaScript and PHP files, go to the Block Editor and create a new post. +After you have updated both JavaScript and PHP files, go to the block editor and create a new post. Add a quote block, and in the right sidebar under Styles, you will see your new Fancy Quote style listed. Click the Fancy Quote to select and apply that style to your quote block. diff --git a/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md b/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md index 813b8fa3e2bdb..c3805f26845cc 100644 --- a/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md +++ b/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md @@ -30,7 +30,7 @@ If your code is registered and enqueued correctly, you should see a message in y ![Console Log Message Success](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/js-tutorial-console-log-success.png) -**Note for Theme Developers:** The above method of enqueing is used for plugins. If you are extending the Block Editor for your theme there is a minor difference, you will use the `get_template_directory_uri()` function instead of `plugins_url()`. So for a theme, the enqueue example is: +**Note for Theme Developers:** The above method of enqueing is used for plugins. If you are extending the block editor for your theme there is a minor difference, you will use the `get_template_directory_uri()` function instead of `plugins_url()`. So for a theme, the enqueue example is: ```php function myguten_enqueue() { @@ -46,4 +46,4 @@ add_action( 'enqueue_block_editor_assets', 'myguten_enqueue' ); At this point, you have a plugin in the directory `wp-content/plugins/myguten-plugin` with two files: the PHP server-side code in `myguten-plugin.php`, and the JavaScript which runs in the browser in `myguten.js`. -This puts all the initial pieces in place for you to start extending the Block Editor. +This puts all the initial pieces in place for you to start extending the block editor. diff --git a/docs/designers-developers/developers/tutorials/javascript/readme.md b/docs/designers-developers/developers/tutorials/javascript/readme.md index 55628c1cd398e..f425f2726df67 100644 --- a/docs/designers-developers/developers/tutorials/javascript/readme.md +++ b/docs/designers-developers/developers/tutorials/javascript/readme.md @@ -1,12 +1,12 @@ # Getting Started with JavaScript -The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new Block Editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is get you comfortable on how to use the API reference and snippets of code found within. +The purpose of this tutorial is to step through getting started with JavaScript and WordPress, specifically around the new block editor. The Gutenberg Handbook documentation contains information on the APIs available for working with the block editor. The goal of this tutorial is get you comfortable on how to use the API reference and snippets of code found within. ### What is JavaScript JavaScript is a programming language which is loaded and executed in your web browser; compared to PHP which is run by a web server with the results sent to the browser, typically as HTML. -The Block Editor introduced in WordPress 5.0 is written entirely in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires to learn how to use JavaScript to extend and enhance the Block Editor. +The block editor introduced in WordPress 5.0 is written entirely in JavaScript, with the code run in the browser, and not on the server, this allows for a richer and more dynamic user experience. It also requires to learn how to use JavaScript to extend and enhance the block editor. ### Table of Contents diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md index e58889c7599df..795bd722ece29 100644 --- a/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md +++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta.md @@ -2,7 +2,7 @@ A post meta field is a WordPress object used to store extra data about a post. You need to first register a new meta field prior to use. See Managing [Post Metadata](https://developer.wordpress.org/plugins/metadata/managing-post-metadata/) to learn more about post meta. -When registering the field, note the `show_in_rest` parameter. This ensures the data will be included in the REST API, which the Block Editor uses to load and save meta data. See the [`register_meta`](https://developer.wordpress.org/reference/functions/register_meta/) function definition for extra information. +When registering the field, note the `show_in_rest` parameter. This ensures the data will be included in the REST API, which the block editor uses to load and save meta data. See the [`register_meta`](https://developer.wordpress.org/reference/functions/register_meta/) function definition for extra information. To register the field, create a PHP plugin file called `myguten-meta-block.php` including: diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md index e1e6749c17ff7..0a173a539a82b 100644 --- a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md +++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md @@ -6,7 +6,7 @@ For this block, you will use the TextControl component, which is similar to an H Attributes are the information displayed in blocks. As shown in the block tutorial, the source of attributes come from the text or HTML a user writes in the editor. For your meta block, the attribute will come from the post meta field. -By specifying the source of the attributes as `meta`, the Block Editor automatically handles the loading and storing of the data; no REST API or data functions are needed. +By specifying the source of the attributes as `meta`, the block editor automatically handles the loading and storing of the data; no REST API or data functions are needed. Add this code to your JavaScript file (this tutorial will call the file `myguten.js`): diff --git a/docs/designers-developers/developers/tutorials/metabox/readme.md b/docs/designers-developers/developers/tutorials/metabox/readme.md index aa13df05ff580..a1e29fb2beeff 100644 --- a/docs/designers-developers/developers/tutorials/metabox/readme.md +++ b/docs/designers-developers/developers/tutorials/metabox/readme.md @@ -4,7 +4,7 @@ Prior to the block editor, custom meta boxes were used to extend the editor. Wit The new block editor does support most existing meta boxes, see [this backward compatibility article](/docs/designers-developers/developers/backward-compatibility/meta-box.md) for more support details . -Here are two mini-tutorials for creating similar functionality to meta boxes in the Block Editor. +Here are two mini-tutorials for creating similar functionality to meta boxes in the block editor. ## Use Blocks to Store Meta diff --git a/docs/designers-developers/developers/tutorials/notices/README.md b/docs/designers-developers/developers/tutorials/notices/README.md index 63296f41dfb4d..cde3670e8bf00 100644 --- a/docs/designers-developers/developers/tutorials/notices/README.md +++ b/docs/designers-developers/developers/tutorials/notices/README.md @@ -2,7 +2,7 @@ Notices are informational UI displayed near the top of admin pages. WordPress core, themes, and plugins all use notices to indicate the result of an action, or to draw the user's attention to necessary information. -In the Classic Editor, notices hooked onto the `admin_notices` action can render whatever HTML they'd like. In the Block Editor, notices are restricted to a more formal API. +In the Classic Editor, notices hooked onto the `admin_notices` action can render whatever HTML they'd like. In the block editor, notices are restricted to a more formal API. ## Notices in the Classic Editor @@ -33,13 +33,13 @@ function myguten_admin_notice() { add_action( 'admin_notices', 'myguten_admin_notice' ); ``` -Importantly, the `admin_notices` hook allows a developer to render whatever HTML they'd like. One advantage is that the developer has a great amount of flexibility. The key disadvantage is that arbitrary HTML makes future iterations on notices more difficult, if not possible, because the iterations need to accommodate for arbitrary HTML. This is why the Block Editor has a formal API. +Importantly, the `admin_notices` hook allows a developer to render whatever HTML they'd like. One advantage is that the developer has a great amount of flexibility. The key disadvantage is that arbitrary HTML makes future iterations on notices more difficult, if not possible, because the iterations need to accommodate for arbitrary HTML. This is why the block editor has a formal API. ## Notices in the Block Editor -In the Block Editor, here's an example of the "Post published" notice: +In the block editor, here's an example of the "Post published" notice: -![Post published in the Block Editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/block-editor-notice.png) +![Post published in the block editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/notices/block-editor-notice.png) Producing an equivalent "Post published" notice would require code like this: @@ -67,14 +67,14 @@ You'll want to use this _Notices Data API_ when producing a notice from within t To better understand the specific code example above: * `wp` is WordPress global window variable. -* `wp.data` is an object provided by the Block Editor for accessing the Block Editor data store. -* `wp.data.dispatch('core/notices')` accesses functionality registered to the Block Editor data store by the Notices package. -* `createNotice()` is a function offered by the Notices package to register a new notice. The Block Editor reads from the notice data store in order to know which notices to display. +* `wp.data` is an object provided by the block editor for accessing the block editor data store. +* `wp.data.dispatch('core/notices')` accesses functionality registered to the block editor data store by the Notices package. +* `createNotice()` is a function offered by the Notices package to register a new notice. The block editor reads from the notice data store in order to know which notices to display. -Check out the [_Loading JavaScript_](/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md) tutorial for a primer on how to load your custom JavaScript into the Block Editor. +Check out the [_Loading JavaScript_](/docs/designers-developers/developers/tutorials/javascript/loading-javascript.md) tutorial for a primer on how to load your custom JavaScript into the block editor. ## Learn More -The Block Editor offers a complete API for generating notices. The official documentation is a great place to review what's possible. +The block editor offers a complete API for generating notices. The official documentation is a great place to review what's possible. For a full list of the available actions and selectors, refer to the [Notices Data Handbook](/docs/designers-developers/developers/data/data-core-notices.md) page. diff --git a/gutenberg.php b/gutenberg.php index 2ff8f5e26254b..feb70cd894c8b 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -34,7 +34,7 @@ function the_gutenberg_project() { Classic Editor plugin.', 'gutenberg' ), + __( 'The block editor requires JavaScript. Please try the Classic Editor plugin.', 'gutenberg' ), __( 'https://wordpress.org/plugins/classic-editor/', 'gutenberg' ) ); ?> diff --git a/packages/block-editor/README.md b/packages/block-editor/README.md index 9e07cf10eb2ce..f58305a4d15d1 100644 --- a/packages/block-editor/README.md +++ b/packages/block-editor/README.md @@ -1,6 +1,6 @@ # Block Editor -Generic Block Editor Module. +Generic block editor module. ## Installation diff --git a/packages/block-editor/package.json b/packages/block-editor/package.json index 6f593a1063edf..232ed8a681fcd 100644 --- a/packages/block-editor/package.json +++ b/packages/block-editor/package.json @@ -1,7 +1,7 @@ { "name": "@wordpress/block-editor", "version": "1.0.0-alpha.0", - "description": "Generic Block Editor.", + "description": "Generic block editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", "keywords": [