/** * Get all JSN PageBuilder shortcodes * * @return array An array of shortcodes */ public static function getShortcodeTags() { // If the shortcodes were fetech before, then use if (self::$shortcodeTags) { return self::$shortcodeTags; } // Get shortcodes from cache, if it is existed, then used it $cachedShortCodes = self::getShortCodePluginsFromCache(); if (count($cachedShortCodes)) { if (!self::$shortcodeTags) { self::$shortcodeTags = $cachedShortCodes; } return $cachedShortCodes; } // Get additional shortcodes $additionalShortCodes = self::getAdditionalShortCodePlugins(); // Get default shortcodes $defaultShortCodes = self::getDefaultShortcodePlugins(); // Merge additional shortcodes and default shortcodes $shortcodes = array_merge($additionalShortCodes, $defaultShortCodes); //Add all shortcode to cache self::setShortCodePluginsToCache($shortcodes); //add article id to cache JSNPagebuilderHelpersArticles::updateArticleUsedPageBuilderToPlugin(); if (!self::$shortcodeTags) { self::$shortcodeTags = $shortcodes; } return $shortcodes; }