<?php
$stickycta = array (
'key' => 'stickyctafield',
'label' => 'Sticky CTA',
'name' => 'sticky-cta-block',
'type' => 'text',
'sub_fields' => array (
array(
'key' => 'field_5c07e8ff28e61',
'label' => 'CTA text',
'name' => 'label',
'type' => 'text',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'maxlength' => '',
),
array(
'key' => 'field_5c07e93028e62',
'label' => 'CTA type',
'name' => 'type',
'type' => 'select',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'choices' => array(
'Link' => 'Link',
'Download' => 'Download',
),
'default_value' => array(
),
'allow_null' => 0,
'multiple' => 0,
'ui' => 0,
'return_format' => 'value',
'ajax' => 0,
'placeholder' => '',
),
array(
'key' => 'field_5c07e95f28e63',
'label' => 'CTA link url',
'name' => 'url',
'type' => 'link',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_5c07e93028e62',
'operator' => '==',
'value' => 'Link',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
),
array(
'key' => 'field_5c07e99b28e64',
'label' => 'Download',
'name' => 'download',
'type' => 'file',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_5c07e93028e62',
'operator' => '==',
'value' => 'Download',
),
),
),
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
'library' => 'all',
'min_size' => '',
'max_size' => '',
'mime_types' => '',
),
),
'location' => array(
array(
array(
'param' => 'post_type',
'operator' => '==',
'value' => 'post',
),
),
),
'menu_order' => 0,
'position' => 'normal',
'style' => 'default',
'label_placement' => 'top',
'instruction_placement' => 'label',
'hide_on_screen' => '',
'active' => 1,
'description' => '',
);
array_push($_SESSION["blocks"], $stickycta);