prefix)) { // set modowner with custom prefix $this->modowner = $this->prefix; } // check whether the same results have been already cached if (!isset(static::$shortcodes[$this->modowner])) { // init the cache static::$shortcodes[$this->modowner] = []; /** * Force the client path because we need to load the shortcodes model * always from the back-end folder. * * An issue occurred since WP 5.8, after the refactoring of the widgets * management page, where the client now results to be "site" in place * of "admin". * * @since 10.1.34 */ $model = JModel::getInstance($this->modowner, 'shortcodes', 'admin'); if ($model) { foreach ($model->all() as $item) { if ($item->post_id) { static::$shortcodes[$this->modowner][$item->post_id] = get_the_title($item->post_id) . " - {$item->type}"; } } } } // join the default options with the cached values return $options + static::$shortcodes[$this->modowner]; } }