| 1 |
<?php |
| 2 |
/** |
| 3 |
* Opt In Form block template |
| 4 |
* |
| 5 |
* @var $attributes - block attributes |
| 6 |
* @var $options - layout options |
| 7 |
* |
| 8 |
* @link https://codesupply.co |
| 9 |
* @since 1.0.0 |
| 10 |
* |
| 11 |
* @package PowerKit |
| 12 |
* @subpackage PowerKit/templates |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! $attributes['listId'] ) { |
| 16 |
$attributes['listId'] = 'default'; |
| 17 |
} |
| 18 |
|
| 19 |
$params = array( |
| 20 |
'privacy' => powerkit_mailchimp_get_privacy_text(), |
| 21 |
'type' => 'block', |
| 22 |
'title' => '', |
| 23 |
'text' => '', |
| 24 |
'bg_image_id' => 0, |
| 25 |
'list_id' => $attributes['listId'], |
| 26 |
'display_name' => $attributes['showName'], |
| 27 |
); |
| 28 |
|
| 29 |
echo '<div class="' . esc_attr( $attributes['className'] ) . '" ' . ( isset( $attributes['anchor'] ) ? ' id="' . esc_attr( $attributes['anchor'] ) . '"' : '' ) . '>'; |
| 30 |
|
| 31 |
// Subscription output. |
| 32 |
do_action( 'powerkit_subscribe_template', $params ); |
| 33 |
|
| 34 |
echo '</div>'; |
| 35 |
|