Skip to content

Commit

Permalink
Remove the private prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Feb 14, 2024
1 parent 03a8d89 commit a75bb56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function RichTextWrapper(
__unstableDisableFormats: disableFormats,
disableLineBreaks,
__unstableAllowPrefixTransformations,
privateDisableEditing,
disableEditing,
...props
},
forwardedRef
Expand Down Expand Up @@ -192,7 +192,7 @@ export function RichTextWrapper(
isBlockSelected,
] );

const shouldDisableEditing = privateDisableEditing || disableBoundBlocks;
const shouldDisableEditing = disableEditing || disableBoundBlocks;

const { getSelectionStart, getSelectionEnd, getBlockRootClientId } =
useSelect( blockEditorStore );
Expand Down Expand Up @@ -463,11 +463,7 @@ PrivateRichText.isEmpty = ( value ) => {
*/
const PublicForwardedRichTextContainer = forwardRef( ( props, ref ) => {
return (
<PrivateRichText
ref={ ref }
{ ...props }
privateDisableEditing={ false }
/>
<PrivateRichText ref={ ref } { ...props } disableEditing={ false } />
);
} );

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ export default function Image( {
insertBlocksAfter={ insertBlocksAfter }
label={ __( 'Image caption text' ) }
showToolbarButton={ isSingleSelected && hasNonContentControls }
privateDisableEditing={ lockCaption }
disableEditing={ lockCaption }
/>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/utils/caption.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function Caption( {
label = __( 'Caption text' ),
showToolbarButton = true,
className,
privateDisableEditing,
disableEditing,
} ) {
const caption = attributes[ key ];
const prevCaption = usePrevious( caption );
Expand Down Expand Up @@ -109,7 +109,7 @@ export function Caption( {
createBlock( getDefaultBlockName() )
)
}
privateDisableEditing={ privateDisableEditing }
disableEditing={ disableEditing }
/>
) }
</>
Expand Down

0 comments on commit a75bb56

Please sign in to comment.