getBase(), $this->loadedShortcodes)) { $this->loadedShortcodes[$shortcode->getBase()] = $shortcode; } } /** * Adds all shortcodes. * * @see ShortcodeLoader::addShortcode() */ private function addShortcodes() { $this->addShortcode(new ButtonV2()); $this->addShortcode(new CallToActionSection()); $this->addShortcode(new CardsSlider()); $this->addShortcode(new CardsSliderItem()); $this->addShortcode(new CardsGallery()); $this->addShortcode(new CrossfadeImages()); $this->addShortcode(new ItemShowcase()); $this->addShortcode(new ItemShowcaseListItem()); $this->addShortcode(new GradientIconWithText()); } /** * Calls ShortcodeLoader::addShortcodes and than loops through added shortcodes and calls render method * of each shortcode object */ public function load() { $this->addShortcodes(); foreach($this->loadedShortcodes as $shortcode) { add_shortcode($shortcode->getBase(), array($shortcode, 'render')); } } } $shortcodeLoader = ShortcodeLoader::getInstance(); $shortcodeLoader->load();