Make the send button label configurable
[MAILPOET-6429]
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { Button } from '@wordpress/components';
|
import { Button } from '@wordpress/components';
|
||||||
import { useEntityProp } from '@wordpress/core-data';
|
import { useEntityProp } from '@wordpress/core-data';
|
||||||
|
import { applyFilters } from '@wordpress/hooks';
|
||||||
import { useSelect } from '@wordpress/data';
|
import { useSelect } from '@wordpress/data';
|
||||||
import {
|
import {
|
||||||
// @ts-expect-error No types available for useEntitiesSavedStatesIsDirty
|
// @ts-expect-error No types available for useEntitiesSavedStatesIsDirty
|
||||||
@ -44,6 +45,11 @@ export function SendButton( { validateContent, isContentInvalid } ) {
|
|||||||
isDirty;
|
isDirty;
|
||||||
|
|
||||||
const mailpoetEmailData: MailPoetEmailData = mailpoetEmail;
|
const mailpoetEmailData: MailPoetEmailData = mailpoetEmail;
|
||||||
|
const label = applyFilters(
|
||||||
|
'mailpoet_email_editor_send_button_label',
|
||||||
|
__( 'Send', 'mailpoet' )
|
||||||
|
) as string;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
@ -55,7 +61,7 @@ export function SendButton( { validateContent, isContentInvalid } ) {
|
|||||||
} }
|
} }
|
||||||
disabled={ isDisabled }
|
disabled={ isDisabled }
|
||||||
>
|
>
|
||||||
{ __( 'Send', 'mailpoet' ) }
|
{ label }
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user