'canvas/opt-in-form',
'title' => esc_html__( 'Opt-In Form', 'powerkit' ),
'description' => '',
'category' => 'canvas',
'keywords' => array( 'form', 'subscription', 'mailchimp' ),
'icon' => '
',
'supports' => array(
'className' => true,
'anchor' => true,
'html' => false,
'canvasSpacings' => true,
'canvasBorder' => true,
'canvasResponsive' => true,
),
'styles' => array(),
'location' => array(),
'sections' => array(
'general' => array(
'title' => esc_html__( 'Block Settings', 'powerkit' ),
'priority' => 5,
'open' => true,
),
),
'layouts' => array(),
'fields' => array(
array(
'key' => 'listId',
'label' => esc_html__( 'List ID', 'powerkit' ),
'help' => '
' . esc_html__( 'If empty, List ID from Settings → Opt-In Forms will be used.', 'powerkit' ) . '
- ' . esc_html__( 'Log in to your', 'powerkit' ) . ' ' . esc_html__( 'MailChimp account', 'powerkit' ) . '
- ' . esc_html__( 'Go to your Lists.', 'powerkit' ) . '
- ' . esc_html__( 'Select the desired list and in the drop-down menu and go to Settings.', 'powerkit' ) . '
- ' . esc_html__( 'Copy your list ID from the field “Unique ID for list …”.', 'powerkit' ) . '
',
'section' => 'general',
'type' => 'text',
'default' => '',
),
array(
'key' => 'showName',
'label' => esc_html__( 'Display First Name Field', 'powerkit' ),
'help' => esc_html__( 'Make sure you map the field in the MailChimp settings', 'powerkit' ),
'section' => 'general',
'type' => 'toggle',
'default' => false,
),
array(
'key' => 'colorLegend',
'label' => esc_html__( 'Color Legend', 'powerkit' ),
'section' => 'general',
'type' => 'color',
'output' => array(
array(
'element' => '$ .pk-subscribe-form-wrap .pk-privacy label',
'property' => 'color',
),
),
),
),
'template' => dirname( __FILE__ ) . '/block/render.php',
// enqueue registered scripts/styles.
'editor_style' => 'powerkit-subscription-block-editor-style',
);
return $blocks;
}
}
new Powerkit_Subscription_Block();