/** * Render shortcode form * @param ctShortcode[] $shortcodes * @param array $instance * @return void */ protected function renderShortcodeForm($shortcodes, $instance) { $preffix = $this->childShortcode ? '[]' : ''; $d = new ctShortcodeDecorator($shortcodes, false, $this->childShortcode); $d->setSchemaFormat('widget-' . $this->id_base . '[' . $this->number . ']' . '%parent%[%name%]' . $preffix); $d->setDefaultValues($instance['child']); $d->setBannedAttributes($this->getDefaultAttributes()); $d->setInputSubstitutes(array('image' => 'input')); if ($this->shortcode && $this->childShortcode) { $d->setParentShortcode($this->shortcode); $d->setParentDefaultValues(isset($instance['parent']) ? $instance['parent'] : array()); } echo $d; }