Skip to content

Commit

Permalink
Custom Classname block support: Update code comments to remove refere…
Browse files Browse the repository at this point in the history
…nce to anchor id (#48709)
  • Loading branch information
andrewserong authored Mar 5, 2023
1 parent 95d52c4 commit 33665ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/block-editor/src/hooks/custom-class-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import { createHigherOrderComponent } from '@wordpress/compose';
import { InspectorControls } from '../components';

/**
* Filters registered block settings, extending attributes with anchor using ID
* of the first node.
* Filters registered block settings, extending attributes to include `className`.
*
* @param {Object} settings Original block settings.
*
Expand All @@ -42,6 +41,7 @@ export function addAttribute( settings ) {
/**
* Override the default edit UI to include a new block inspector control for
* assigning the custom class name, if block supports custom class name.
* The control is displayed within the Advanced panel in the block inspector.
*
* @param {WPComponent} BlockEdit Original component.
*
Expand Down Expand Up @@ -89,8 +89,8 @@ export const withInspectorControl = createHigherOrderComponent(
);

/**
* Override props assigned to save component to inject anchor ID, if block
* supports anchor. This is only applied if the block's save result is an
* Override props assigned to save component to inject the className, if block
* supports customClassName. This is only applied if the block's save result is an
* element and not a markup string.
*
* @param {Object} extraProps Additional props applied to save element.
Expand Down
7 changes: 3 additions & 4 deletions packages/block-editor/src/hooks/custom-class-name.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { addFilter } from '@wordpress/hooks';
import { hasBlockSupport } from '@wordpress/blocks';

/**
* Filters registered block settings, extending attributes with anchor using ID
* of the first node.
* Filters registered block settings, extending attributes to include `className`.
*
* @param {Object} settings Original block settings.
*
Expand All @@ -32,8 +31,8 @@ export function addAttribute( settings ) {
}

/**
* Override props assigned to save component to inject anchor ID, if block
* supports anchor. This is only applied if the block's save result is an
* Override props assigned to save component to inject the className, if block
* supports customClassName. This is only applied if the block's save result is an
* element and not a markup string.
*
* @param {Object} extraProps Additional props applied to save element.
Expand Down

0 comments on commit 33665ae

Please sign in to comment.