Skip to content

Commit

Permalink
Change block style references to omit "varations" (#45650)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaisyOlsen authored Nov 9, 2022
1 parent a2f6e21 commit 3284f34
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/block-editor/src/components/block-styles/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { _x } from '@wordpress/i18n';
/**
* Returns the active style from the given className.
*
* @param {Array} styles Block style variations.
* @param {Array} styles Block styles.
* @param {string} className Class name
*
* @return {Object?} The active style.
Expand Down Expand Up @@ -59,7 +59,7 @@ export function replaceActiveStyle( className, activeStyle, newStyle ) {
* act as a fallback for when there is no active style applied to a block. The default item also serves
* as a switch on the frontend to deactivate non-default styles.
*
* @param {Array} styles Block style variations.
* @param {Array} styles Block styles.
*
* @return {Array<Object?>} The style collection.
*/
Expand All @@ -83,7 +83,7 @@ export function getRenderedStyles( styles ) {
/**
* Returns a style object from a collection of styles where that style object is the default block style.
*
* @param {Array} styles Block style variations.
* @param {Array} styles Block styles.
*
* @return {Object?} The default style object, if found.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ _Parameters_
### registerBlockStyle
Registers a new block style variation for the given block.
Registers a new block style for the given block.
For more information on connecting the styles with CSS [the official documentation](/docs/reference-guides/block-api/block-styles.md#styles)
Expand Down Expand Up @@ -970,7 +970,7 @@ _Returns_

### unregisterBlockStyle

Unregisters a block style variation for the given block.
Unregisters a block style for the given block.

_Usage_

Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ export const hasChildBlocksWithInserterSupport = ( blockName ) => {
};

/**
* Registers a new block style variation for the given block.
* Registers a new block style for the given block.
*
* For more information on connecting the styles with CSS [the official documentation](/docs/reference-guides/block-api/block-styles.md#styles)
*
Expand Down Expand Up @@ -691,7 +691,7 @@ export const registerBlockStyle = ( blockName, styleVariation ) => {
};

/**
* Unregisters a block style variation for the given block.
* Unregisters a block style for the given block.
*
* @param {string} blockName Name of block (example: “core/latest-posts”).
* @param {string} styleVariationName Name of class applied to the block.
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function blockTypes( state = {}, action ) {
}

/**
* Reducer managing the block style variations.
* Reducer managing the block styles.
*
* @param {Object} state Current state.
* @param {Object} action Dispatched action.
Expand Down

0 comments on commit 3284f34

Please sign in to comment.