| | |
| | | protected function renderHeaderActions():void |
| | | { |
| | | $uploadConfig = [ |
| | | 'type' => 'image', |
| | | 'type' => 'upload', |
| | | 'subtype' => 'image', |
| | | 'mode' => (jvbCheck('single_image', $this->config)) ? 'direct' : 'selection', |
| | | 'create_new' => true, |
| | | 'label' => (array_key_exists('image_title', $this->config)) ? $this->config['image_title'] : 'Upload More '.$this->config['plural'], |
| | |
| | | 'singular' => $this->singular, |
| | | 'plural' => $this->plural, |
| | | 'multiple' => true, |
| | | 'destination' => 'post' |
| | | ]; |
| | | if (!jvbCheck('single_image', $this->config)) { |
| | | $uploadConfig['imageType'] = 'groupable'; |
| | | $uploadConfig['destination'] = 'post_group'; |
| | | } |
| | | |
| | | $uploadConfig['destination'] = 'post_group'; |
| | | if (!jvbCheck('single_image', $this->config)) { |
| | | $uploadConfig['group_title'] = 'Create '.$this->config['plural']; |
| | | $uploadConfig['group_description'] = '<p>Drag images into groups. Each group becomes its own '.$this->singular.'.</p> |