Skip to content

Commit

Permalink
Fix: typos inside /docs (#55472)
Browse files Browse the repository at this point in the history
* multiple typos have been fixed inside docs

* fixing check error
  • Loading branch information
parikshit-adhikari authored Oct 19, 2023
1 parent e14c08c commit 71191fd
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To see a list of all of your available iOS devices, use `xcrun simctl list devic

### Customizing the Demo Editor

By default, the Demo editor renders most of the supported core blocks. This is helpful to showcase the editor's capabilities, but can be distracting when focusing on a specific block or feature. One can customize the editor's intial state by leveraging the `native.block_editor_props` hook in a `packages/react-native-editor/src/setup-local.js` file.
By default, the Demo editor renders most of the supported core blocks. This is helpful to showcase the editor's capabilities, but can be distracting when focusing on a specific block or feature. One can customize the editor's initial state by leveraging the `native.block_editor_props` hook in a `packages/react-native-editor/src/setup-local.js` file.

<details><summary>Example setup-local.js</summary>

Expand Down
2 changes: 1 addition & 1 deletion docs/explanations/architecture/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ wp.data.dispatch( 'core' ).saveEditedEntityRecord( 'postType', 'post', 1 );

Since the WordPress editors allow multiple entity records to be edited at the same time, the `core-data` package keeps track of all the entity records that have been fetched and edited in a common undo/redo stack. Each step in the undo/redo stack contains a list of "edits" that should be undone or redone at the same time when calling the `undo` or `redo` action.

And to be able to perform both undo and redo operations propertly, each modification in the list of edits contains the following information:
And to be able to perform both undo and redo operations properly, each modification in the list of edits contains the following information:

- Entity kind and name: Each entity in core-data is identified by the pair _(kind, name)_. This corresponds to the identifier of the modified entity.
- Entity Record ID: The ID of the modified record.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ import { InspectorControls } from '@wordpress/block-editor';

export const withBookQueryControls = ( BlockEdit ) => ( props ) => {
// We only want to add these controls if it is our variation,
// so here we can implement a custom logic to check for that, similiar
// so here we can implement a custom logic to check for that, similar
// to the `isActive` function described above.
// The following assumes that you wrote a custom `isMyBooksVariation`
// function to handle that.
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-guides/enqueueing-assets-in-the-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Do you want to add styling or JavaScript to the user-generated content (blocks)

There are different hooks to use depending on the answers to these questions, and if you are building a block or a theme, there are additional approaches to consider. Refer to the designated sections below.

## Scenarios for enqueing assets
## Scenarios for enqueuing assets
### Editor scripts and styles

Whenever you need to enqueue assets for the Editor itself (i.e. not the user-generated content), you should use the [`enqueue_block_editor_assets`](https://developer.wordpress.org/reference/hooks/enqueue_block_editor_assets/) hook coupled with the standard [`wp_enqueue_script`](https://developer.wordpress.org/reference/functions/wp_enqueue_script/) and [`wp_enqueue_style`](https://developer.wordpress.org/reference/functions/wp_enqueue_style/) functions.
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/platform/custom-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Here is a brief summary of what's going on:
- `src/` (directory) - This is where the JavaScript and CSS source files will live. These files are _not_ directly enqueued by the plugin.
- `webpack.config.js` - A custom Webpack config extending the defaults provided by the [`@wordpress/scripts`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/) npm package to allow for custom CSS styles (via Sass).

The only item not shown above is the `build/` directory, which is where the _compiled_ JS and CSS files are outputted by `@wordpress/scripts`. These files are enqueued by the plugin seperately.
The only item not shown above is the `build/` directory, which is where the _compiled_ JS and CSS files are outputted by `@wordpress/scripts`. These files are enqueued by the plugin separately.

<div class="callout callout-info">
Throughout this guide, filename references will be placed in a comment at the top of each code snippet so you can follow along.
Expand Down Expand Up @@ -168,7 +168,7 @@ wp_enqueue_script( $script_handle, $script_url, $script_asset['dependencies'], $

To save time and space, the `$script_` variables assignment has been omitted. You can [review these here](https://github.com/getdave/standalone-block-editor/blob/974a59dcbc539a0595e8fa34670e75ec541853ab/init.php#L19).

Note the third arguement for script dependencies, `$script_asset['dependencies']`. These dependencies are
Note the third argument for script dependencies, `$script_asset['dependencies']`. These dependencies are
dynamically generated using [@wordpress/dependency-extraction-webpack-plugin](https://developer.wordpress.org/block-editor/packages/packages-dependency-extraction-webpack-plugin/) which will
[ensure that](https://developer.wordpress.org/block-editor/packages/packages-scripts/#default-webpack-config) WordPress provided scripts are not included in the built
bundle.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ add_action( 'init', 'myplugin_register_template' );

_Options:_

- `contentOnly` — prevents all operations. Additionally, the block types that don't have content are hidden from the list view and can't gain focus within the block list. Unlike the other lock types, this is not overrideable by children.
- `contentOnly` — prevents all operations. Additionally, the block types that don't have content are hidden from the list view and can't gain focus within the block list. Unlike the other lock types, this is not overridable by children.
- `all` — prevents all operations. It is not possible to insert new blocks, move existing blocks, or delete blocks.
- `insert` — prevents inserting or removing blocks, but allows moving existing blocks.

Expand Down
6 changes: 3 additions & 3 deletions docs/reference-guides/block-api/block-transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ A transformation of type `enter` is an object that takes the following parameter

**Example: from --- to Separator block**

To create a separator block when the user types the hypen three times and then hits the ENTER key we can use the following code:
To create a separator block when the user types the hyphen three times and then hits the ENTER key we can use the following code:

```js
transforms = {
Expand Down Expand Up @@ -162,7 +162,7 @@ This type of transformations support the _from_ direction, allowing blocks to be
A transformation of type `prefix` is an object that takes the following parameters:

- **type** _(string)_: the value `prefix`.
- **prefix** _(string)_: the character or sequence of characters that match this transfrom.
- **prefix** _(string)_: the character or sequence of characters that match this transform.
- **transform** _(function)_: a callback that receives the content introduced. It should return a block object or an array of block objects.
- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.

Expand Down Expand Up @@ -260,7 +260,7 @@ schema = ({ phrasingContentSchema }) => {

When we successfully match this content every HTML attribute will be stripped away except for `data-post-id` and if we have other arrangements of HTML inside of a given `div` then it won't match our transformer. Likewise we'd fail to match if we found an `<h3>` in there instead of an `<h2>`.

Schemas are most-important when wanting to match HTML snippets containing non-phrasing content, such as `<details>` with a `<summary>`. Without declaring the custom schema the editor will skip over these other contructions before attempting to run them through any block transforms.
Schemas are most-important when wanting to match HTML snippets containing non-phrasing content, such as `<details>` with a `<summary>`. Without declaring the custom schema the editor will skip over these other constructions before attempting to run them through any block transforms.

### Shortcode

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/filters/editor-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This is a PHP filter which is applied before sending settings to the WordPress b

You may find details about this filter [on its WordPress Code Reference page](https://developer.wordpress.org/reference/hooks/block_editor_settings_all/).

The filter will send any setting to the initialized Editor, which means any editor setting that is used to configure the editor at initialiation can be filtered by a PHP WordPress plugin before being sent.
The filter will send any setting to the initialized Editor, which means any editor setting that is used to configure the editor at initialization can be filtered by a PHP WordPress plugin before being sent.

_Example:_

Expand Down

0 comments on commit 71191fd

Please sign in to comment.