TitanFramework::getInternalAdminOptions PHP Метод

getInternalAdminOptions() защищенный Метод

Gets all the admin page options (not meta & customizer) and loads them from the database into a class variable. This is needed because all our admin page options are contained in a single entry.
С версии: 1.9
protected getInternalAdminOptions ( ) : array
Результат array All admin options currently in the instance
    protected function getInternalAdminOptions()
    {
        // Reload options if blog has been switched
        if (empty($this->adminOptions) || get_current_blog_id() !== $this->blogId) {
            $this->adminOptions = array();
        }
        if (!empty($this->adminOptions)) {
            return $this->adminOptions;
        }
        // Check if we have options saved already.
        $currentOptions = get_option($this->optionNamespace . '_options');
        // First time run, this action hook can be used to trigger something.
        if (false === $currentOptions) {
            do_action('tf_init_no_options_' . $this->optionNamespace);
        }
        // Put all the available options in our global variable for future checking.
        if (!empty($currentOptions) && !count($this->adminOptions)) {
            $this->adminOptions = unserialize($currentOptions);
        }
        if (empty($this->adminOptions)) {
            $this->adminOptions = array();
        }
        return $this->adminOptions;
    }