/** * * Flexible Content: Media * * @author Michael W. Delaney * @since 1.0 * * Flexible Content field for Calls to Action */ function media($min = 0, $max = 1, $thisKey = 'flexible') { $FCBFlexibleContentFields = new Fields($this->layout, __FUNCTION__); return array('key' => $this->key . $thisKey . '-' . $this->getCallingFunctionName() . __FUNCTION__, 'label' => 'Media', 'name' => 'media', 'type' => 'flexible_content', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'acf-media', 'id' => ''), 'min' => $min, 'max' => $max, 'button_label' => 'Add Media', 'layouts' => array(array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-image', 'name' => 'image', 'label' => 'Image', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_image())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-video', 'name' => 'video', 'label' => 'Video', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_video())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-gallery', 'name' => 'gallery', 'label' => 'Gallery', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->gallery())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-content', 'name' => 'content', 'label' => 'Content', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_content())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-code', 'name' => 'code', 'label' => 'Code', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_code())), array('key' => $this->key . $this->getCallingFunctionName() . __FUNCTION__ . '-map', 'name' => 'map', 'label' => 'Map', 'display' => 'block', 'sub_fields' => array($FCBFlexibleContentFields->media_map())))); }