Fragen\GitHub_Updater\Settings::filter_options PHP Метод

filter_options() приватный Метод

Filter options so that sub-tab options are grouped in single $options variable.
private filter_options ( ) : array | mixed
Результат array | mixed
    private function filter_options()
    {
        $plugins = Plugin::instance()->get_plugin_configs();
        $themes = Theme::instance()->get_theme_configs();
        $repos = array_merge($plugins, $themes);
        $options = parent::$options;
        $non_repo_options = array('github_access_token', 'bitbucket_username', 'bitbucket_password', 'gitlab_access_token', 'gitlab_enterprise_token', 'branch_switch', 'db_version');
        $repos = array_map(function ($e) {
            return $e->repo = null;
        }, $repos);
        array_filter($non_repo_options, function ($e) use(&$options) {
            unset($options[$e]);
        });
        $intersect = array_intersect($options, $repos);
        $db_version = array('db_version' => parent::$options['db_version']);
        $options = array_merge($intersect, $_POST['github_updater'], $db_version);
        return $options;
    }