Fragen\GitHub_Updater\Settings::display_ghu_repos PHP Méthode

display_ghu_repos() private méthode

Places a lock dashicon before the repo name if it's a private repo.
private display_ghu_repos ( $type )
$type
    private function display_ghu_repos($type)
    {
        $plugins = Plugin::instance()->get_plugin_configs();
        $themes = Theme::instance()->get_theme_configs();
        $repos = array_merge($plugins, $themes);
        $type_repos = array_filter($repos, function ($e) use($type) {
            return false !== stristr($e->type, $type);
        });
        $display_data = array_map(function ($e) {
            return $e = array('type' => $e->type, 'repo' => $e->repo, 'name' => $e->name, 'private' => isset($e->is_private) ? $e->is_private : false);
        }, $type_repos);
        $lock = '&nbsp;<span class="dashicons dashicons-lock"></span>';
        printf('<h2>' . esc_html__('Installed Plugins and Themes', 'github-updater') . '</h2>');
        foreach ($display_data as $data) {
            $dashicon = '<span class="dashicons dashicons-admin-plugins"></span>&nbsp;&nbsp;';
            $is_private = $data['private'] ? $lock : null;
            if (false !== strpos($data['type'], 'theme')) {
                $dashicon = '<span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;';
            }
            printf('<p>' . $dashicon . $data['name'] . $is_private . '</p>');
        }
    }