Change callback and function names
[MAILPOET-6376]
This commit is contained in:
committed by
Rostislav Wolný
parent
e56fe9a95e
commit
62b77b724c
@ -138,7 +138,7 @@ const personalizationTagsLiveContentUpdate = createHigherOrderComponent(
|
||||
);
|
||||
|
||||
// Memoized function to replace content tags
|
||||
const updatedContent = useCallback( () => {
|
||||
const updateContent = useCallback( () => {
|
||||
if ( ! content ) {
|
||||
return '';
|
||||
}
|
||||
@ -176,7 +176,7 @@ const personalizationTagsLiveContentUpdate = createHigherOrderComponent(
|
||||
{ ...props }
|
||||
attributes={ {
|
||||
...attributes,
|
||||
content: updatedContent(),
|
||||
content: updateContent(),
|
||||
} }
|
||||
setAttributes={ handleSetAttributes }
|
||||
/>
|
||||
@ -192,7 +192,7 @@ const personalizationTagsLiveContentUpdate = createHigherOrderComponent(
|
||||
/**
|
||||
* Replace written personalization tags with HTML comments in real-time.
|
||||
*/
|
||||
function replaceWrittenPersonalizationTags() {
|
||||
function activatePersonalizationTagsReplacing() {
|
||||
addFilter(
|
||||
'editor.BlockEdit',
|
||||
'mailpoet-email-editor/with-live-content-update',
|
||||
@ -203,5 +203,5 @@ function replaceWrittenPersonalizationTags() {
|
||||
export {
|
||||
disableCertainRichTextFormats,
|
||||
extendRichTextFormats,
|
||||
replaceWrittenPersonalizationTags,
|
||||
activatePersonalizationTagsReplacing,
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ import { disableImageFilter, hideExpandOnClick } from './core/image';
|
||||
import {
|
||||
disableCertainRichTextFormats,
|
||||
extendRichTextFormats,
|
||||
replaceWrittenPersonalizationTags,
|
||||
activatePersonalizationTagsReplacing,
|
||||
} from './core/rich-text';
|
||||
import { enhanceButtonBlock } from './core/button';
|
||||
import { enhanceButtonsBlock } from './core/buttons';
|
||||
@ -30,7 +30,7 @@ export function initBlocks() {
|
||||
enhanceColumnsBlock();
|
||||
enhancePostContentBlock();
|
||||
extendRichTextFormats();
|
||||
replaceWrittenPersonalizationTags();
|
||||
activatePersonalizationTagsReplacing();
|
||||
alterSupportConfiguration();
|
||||
registerCoreBlocks();
|
||||
}
|
||||
|
Reference in New Issue
Block a user