'30px',
'font-weight' => '300',
'line-height' => 'normal',
'margin' => '0px',
'color' => 'inherit',
]
);
if ( isset( $attributes['rich_text'] ) ) {
$content = '
' . $attributes['rich_text'] . '
';
} else {
$content = __( 'Email Heading', 'yaymail' );
$content = '' . $content . '
';
}
self::$icon = '';
return [
'id' => uniqid(),
'type' => self::$type,
'name' => __( 'Email Heading', 'yaymail' ),
'icon' => self::$icon,
'group' => 'basic',
'available' => true,
'position' => 20,
'data' => [
'container_group_definition' => [
'component' => 'GroupDefinition',
'title' => __( 'Container settings', 'yaymail' ),
'description' => __( 'Handle container layout settings', 'yaymail' ),
],
'padding' => [
'value_path' => 'padding',
'component' => 'Spacing',
'title' => __( 'Padding', 'yaymail' ),
'default_value' => isset( $attributes['padding'] ) ? $attributes['padding'] : [
'top' => '40',
'right' => '50',
'bottom' => '40',
'left' => '50',
],
'type' => 'style',
],
'background_color' => [
'value_path' => 'background_color',
'component' => 'Color',
'title' => __( 'Background color', 'yaymail' ),
'default_value' => isset( $attributes['background_color'] ) ? $attributes['background_color'] : YAYMAIL_COLOR_WC_DEFAULT,
'type' => 'style',
],
'content_breaker' => [
'component' => 'LineBreaker',
],
'content_group_definition' => [
'component' => 'GroupDefinition',
'title' => __( 'Content settings', 'yaymail' ),
'description' => __( 'Handle content settings', 'yaymail' ),
],
'font_family' => [
'value_path' => 'font_family',
'component' => 'FontFamilySelector',
'title' => __( 'Font family', 'yaymail' ),
'default_value' => isset( $attributes['font_family'] ) ? $attributes['font_family'] : YAYMAIL_DEFAULT_FAMILY,
'type' => 'style',
],
'text_color' => [
'value_path' => 'text_color',
'component' => 'Color',
'title' => __( 'Text color', 'yaymail' ),
'default_value' => isset( $attributes['text_color'] ) ? $attributes['text_color'] : '#ffffff',
'type' => 'style',
],
'rich_text' => [
'value_path' => 'rich_text',
'component' => 'RichTextEditor',
'title' => __( 'Content', 'yaymail' ),
'default_value' => $content,
'type' => 'content',
],
],
];
}
}