Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
default: null,
},
// Deprecated
has_form_settings_set: {
type: 'string',
default: null,
},
submit_button_text: {
type: 'string',
default: __( 'Submit' ),
},
},
edit: JetpackContactForm,
save: InnerBlocks.Content,
deprecated: [
{
attributes: {
subject: {
type: 'string',
default: '',
},
to: {
type: 'string',
default: '',
},
submit_button_text: {
type: 'string',
default: __( 'Submit' ),
},
has_form_settings_set: {
submitButtonText: attr.submit_button_text,
hasFormSettingsSet: attr.has_form_settings_set,
to: attr.to,
subject: attr.subject,
};
},
isEligible: attr => {
// when the deprecated, snake_case values are default, no need to migrate
if ( ! attr.has_form_settings_set && attr.submit_button_text === 'Submit' ) {
return false;
}
return true;
},
save: InnerBlocks.Content,
},
],
};
const FieldDefaults = {
category: 'jetpack',
parent: [ 'jetpack/contact-form' ],
supports: {
reusable: false,
html: false,
},
attributes: {
label: {
type: 'string',
default: null,
},