public function doShortcode($atts, $content, $tag) { $shortcodes = $this->settings->getShortcodes(); $customShortcodes = $this->customElements; $sliderShortcodes = $this->sliderElements; if (!empty($shortcodes[$tag])) { $obj = $shortcodes[$tag]; $default = $this->settings->getShortcodeDefaults($tag); if (empty($atts) || !is_array($atts)) { $atts = array(); } $atts = array_merge($default, $atts); return $this->getTemplate($obj->template, $atts); } elseif (!empty($customShortcodes[$tag])) { return $this->doCustomShortcode($atts, $content, $tag); } elseif (!empty($sliderShortcodes[$tag])) { return $this->doSliderShortcode($atts, $content, $tag); } }