private function display_ghu_repos( $git ) {
		$lock_title    = esc_html__( 'This is a private repository.', 'github-updater' );
		$broken_title  = esc_html__( 'This repository has not connected to the API or was unable to connect.', 'github-updater' );
		$dot_org_title = esc_html__( 'This repository is hosted on WordPress.org.', 'github-updater' );

		$plugins  = Singleton::get_instance( 'Plugin', $this )->get_plugin_configs();
		$themes   = Singleton::get_instance( 'Theme', $this )->get_theme_configs();
		$repos    = array_merge( $plugins, $themes );
		$bbserver = [ 'bitbucket', 'bbserver' ];

		$type_repos = array_filter(
			$repos,
			function ( $e ) use ( $git, $bbserver ) {
				if ( ! empty( $e->enterprise ) && in_array( $git, $bbserver, true ) ) {
					return false !== stripos( $e->git, 'bitbucket' ) && 'bbserver' === $git;
				}

				return false !== stripos( $e->git, $git );
			}
		);

		$display_data = array_map(
			function ( $e ) {
				return [
					'type'    => $e->type,
					'slug'    => $e->slug,
					'file'    => isset( $e->file ) ? $e->file : $e->slug,
					'branch'  => $e->branch,
					'name'    => $e->name,
					'private' => isset( $e->is_private ) ? $e->is_private : false,
					'broken'  => ! isset( $e->remote_version ) || '0.0.0' === $e->remote_version,
					'dot_org' => isset( $e->dot_org ) ? $e->dot_org : false,
				];
			},
			$type_repos
		);

		$lock    = '&nbsp;<span title="' . $lock_title . '" class="dashicons dashicons-lock"></span>';
		$broken  = '&nbsp;<span title="' . $broken_title . '" style="color:#f00;" class="dashicons dashicons-warning"></span>';
		$dot_org = '&nbsp;<span title="' . $dot_org_title . '" class="dashicons dashicons-wordpress"></span></span>';
		printf( '<h2>' . esc_html__( 'Installed Plugins and Themes', 'github-updater' ) . '</h2>' );
		foreach ( $display_data as $data ) {
			$dashicon   = false !== strpos( $data['type'], 'theme' )
				? '<span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;'
				: '<span class="dashicons dashicons-admin-plugins"></span>&nbsp;&nbsp;';
			$is_private = $data['private'] ? $lock : null;
			$is_broken  = $data['broken'] ? $broken : null;
			$override   = $this->override_dot_org( $data['type'], $data );
			$is_dot_org = $data['dot_org'] && ! $override ? $dot_org : null;
			printf( '<p>' . $dashicon . $data['name'] . $is_private . $is_dot_org . $is_broken . '</p>' );
		}
	}
private function display_ghu_repos( $git ) {
		$lock_title    = esc_html__( 'This is a private repository.', 'github-updater' );
		$broken_title  = esc_html__( 'This repository has not connected to the API or was unable to connect.', 'github-updater' );
		$dot_org_title = esc_html__( 'This repository is hosted on WordPress.org.', 'github-updater' );

		$plugins  = Singleton::get_instance( 'Plugin', $this )->get_plugin_configs();
		$themes   = Singleton::get_instance( 'Theme', $this )->get_theme_configs();
		$repos    = array_merge( $plugins, $themes );
		$bbserver = [ 'bitbucket', 'bbserver' ];

		$type_repos = array_filter(
			$repos,
			function ( $e ) use ( $git, $bbserver ) {
				if ( ! empty( $e->enterprise ) && in_array( $git, $bbserver, true ) ) {
					return false !== stripos( $e->git, 'bitbucket' ) && 'bbserver' === $git;
				}

				return false !== stripos( $e->git, $git );
			}
		);

		$display_data = array_map(
			function ( $e ) {
				return [
					'type'    => $e->type,
					'slug'    => $e->slug,
					'file'    => isset( $e->file ) ? $e->file : $e->slug,
					'branch'  => $e->branch,
					'name'    => $e->name,
					'private' => isset( $e->is_private ) ? $e->is_private : false,
					'broken'  => ! isset( $e->remote_version ) || '0.0.0' === $e->remote_version,
					'dot_org' => isset( $e->dot_org ) ? $e->dot_org : false,
				];
			},
			$type_repos
		);

		$lock    = '&nbsp;<span title="' . $lock_title . '" class="dashicons dashicons-lock"></span>';
		$broken  = '&nbsp;<span title="' . $broken_title . '" style="color:#f00;" class="dashicons dashicons-warning"></span>';
		$dot_org = '&nbsp;<span title="' . $dot_org_title . '" class="dashicons dashicons-wordpress"></span></span>';
		printf( '<h2>' . esc_html__( 'Installed Plugins and Themes', 'github-updater' ) . '</h2>' );
		foreach ( $display_data as $data ) {
			$dashicon   = false !== strpos( $data['type'], 'theme' )
				? '<span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;'
				: '<span class="dashicons dashicons-admin-plugins"></span>&nbsp;&nbsp;';
			$is_private = $data['private'] ? $lock : null;
			$is_broken  = $data['broken'] ? $broken : null;
			$override   = $this->override_dot_org( $data['type'], $data );
			$is_dot_org = $data['dot_org'] && ! $override ? $dot_org : null;
			printf( '<p>' . $dashicon . $data['name'] . $is_private . $is_dot_org . $is_broken . '</p>' );
		}
	}
private function display_ghu_repos ( $ git ) { $ lock_title = esc_html__ ( 'This is a private repository.' , 'github-updater' ) ; $ broken_title = esc_html__ ( 'This repository has not connected to the API or was unable to connect.' , 'github-updater' ) ; $ dot_org_title = esc_html__ ( 'This repository is hosted on WordPress.org.' , 'github-updater' ) ; $ plugins = Singleton :: get_instance ( 'Plugin' , $ this ) -> get_plugin_configs ( ) ; $ themes = Singleton :: get_instance ( 'Theme' , $ this ) -> get_theme_configs ( ) ; $ repos = array_merge ( $ plugins , $ themes ) ; $ bbserver = [ 'bitbucket' , 'bbserver' ] ; $ type_repos = array_filter ( $ repos , function ( $ e ) use ( $ git , $ bbserver ) { if ( ! empty ( $ e -> enterprise ) && in_array ( $ git , $ bbserver , true ) ) { return false !== stripos ( $ e -> git , 'bitbucket' ) && 'bbserver' === $ git ; } return false !== stripos ( $ e -> git , $ git ) ; } ) ; $ display_data = array_map ( function ( $ e ) { return [ 'type' => $ e -> type , 'slug' => $ e -> slug , 'file' => isset ( $ e -> file ) ? $ e -> file : $ e -> slug , 'branch' => $ e -> branch , 'name' => $ e -> name , 'private' => isset ( $ e -> is_private ) ? $ e -> is_private : false , 'broken' => ! isset ( $ e -> remote_version ) || '0.0.0' === $ e -> remote_version , 'dot_org' => isset ( $ e -> dot_org ) ? $ e -> dot_org : false , ] ; } , $ type_repos ) ; $ lock = '&nbsp;<span title="' . $ lock_title . '" class="dashicons dashicons-lock"></span>' ; $ broken = '&nbsp;<span title="' . $ broken_title . '" style="color:#f00;" class="dashicons dashicons-warning"></span>' ; $ dot_org = '&nbsp;<span title="' . $ dot_org_title . '" class="dashicons dashicons-wordpress"></span></span>' ; printf ( '<h2>' . esc_html__ ( 'Installed Plugins and Themes' , 'github-updater' ) . '</h2>' ) ; foreach ( $ display_data as $ data ) { $ dashicon = false !== strpos ( $ data [ 'type' ] , 'theme' ) ? '<span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;' : '<span class="dashicons dashicons-admin-plugins"></span>&nbsp;&nbsp;' ; $ is_private = $ data [ 'private' ] ? $ lock : null ; $ is_broken = $ data [ 'broken' ] ? $ broken : null ; $ override = $ this -> override_dot_org ( $ data [ 'type' ] , $ data ) ; $ is_dot_org = $ data [ 'dot_org' ] && ! $ override ? $ dot_org : null ; printf ( '<p>' . $ dashicon . $ data [ 'name' ] . $ is_private . $ is_dot_org . $ is_broken . '</p>' ) ; } }
Write out listing of installed plugins and themes using GitHub Updater.
Places a lock dashicon after the repo name if it's a private repo.
Places a WordPress dashicon after the repo name if it's in dot org.

@param string $git (github|bitbucket|bbserver|gitlab|gitea)
Write out listing of installed plugins and themes using GitHub Updater . Places a lock dashicon after the repo name if it s a private repo . Places a WordPress dashicon after the repo name if it s in dot org .