public function update_site_transient( $transient ) {
		foreach ( (array) $this->config as $theme ) {
			if ( $this->can_update_repo( $theme ) ) {
				$response = [
					'theme'       => $theme->slug,
					'new_version' => $theme->remote_version,
					'url'         => $theme->uri,
					'package'     => $theme->download_link,
					'branch'      => $theme->branch,
					'branches'    => array_keys( $theme->branches ),
					'type'        => "{$theme->git}-{$theme->type}",
				];

				// Skip on RESTful updating.
				if ( isset( $_GET['action'], $_GET['theme'] ) &&
					'github-updater-update' === $_GET['action'] &&
					$response['theme'] === $_GET['theme']
				) {
					continue;
				}

				// Pull update from dot org if not overriding.
				if ( ! $this->override_dot_org( 'theme', $theme ) ) {
					continue;
				}

				$transient->response[ $theme->slug ] = $response;
			} else {
				/**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */
				$overrides = apply_filters( 'github_updater_override_dot_org', [] );
				if ( isset( $transient->response[ $theme->slug ] ) && in_array( $theme->slug, $overrides, true ) ) {
					unset( $transient->response[ $theme->slug ] );
				}
			}

			// Set transient for rollback.
			if ( isset( $_GET['theme'], $_GET['rollback'] ) && $theme->slug === $_GET['theme']
			) {
				$transient->response[ $theme->slug ] = $this->set_rollback_transient( 'theme', $theme );
			}
		}

		return $transient;
	}
public function update_site_transient( $transient ) {
		foreach ( (array) $this->config as $theme ) {
			if ( $this->can_update_repo( $theme ) ) {
				$response = [
					'theme'       => $theme->slug,
					'new_version' => $theme->remote_version,
					'url'         => $theme->uri,
					'package'     => $theme->download_link,
					'branch'      => $theme->branch,
					'branches'    => array_keys( $theme->branches ),
					'type'        => "{$theme->git}-{$theme->type}",
				];

				// Skip on RESTful updating.
				if ( isset( $_GET['action'], $_GET['theme'] ) &&
					'github-updater-update' === $_GET['action'] &&
					$response['theme'] === $_GET['theme']
				) {
					continue;
				}

				// Pull update from dot org if not overriding.
				if ( ! $this->override_dot_org( 'theme', $theme ) ) {
					continue;
				}

				$transient->response[ $theme->slug ] = $response;
			} else {
				/**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */
				$overrides = apply_filters( 'github_updater_override_dot_org', [] );
				if ( isset( $transient->response[ $theme->slug ] ) && in_array( $theme->slug, $overrides, true ) ) {
					unset( $transient->response[ $theme->slug ] );
				}
			}

			// Set transient for rollback.
			if ( isset( $_GET['theme'], $_GET['rollback'] ) && $theme->slug === $_GET['theme']
			) {
				$transient->response[ $theme->slug ] = $this->set_rollback_transient( 'theme', $theme );
			}
		}

		return $transient;
	}
public function update_site_transient ( $ transient ) { foreach ( ( array ) $ this -> config as $ theme ) { if ( $ this -> can_update_repo ( $ theme ) ) { $ response = [ 'theme' => $ theme -> slug , 'new_version' => $ theme -> remote_version , 'url' => $ theme -> uri , 'package' => $ theme -> download_link , 'branch' => $ theme -> branch , 'branches' => array_keys ( $ theme -> branches ) , 'type' => "{$theme->git}-{$theme->type}" , ] ; // Skip on RESTful updating. if ( isset ( $ _GET [ 'action' ] , $ _GET [ 'theme' ] ) && 'github-updater-update' === $ _GET [ 'action' ] && $ response [ 'theme' ] === $ _GET [ 'theme' ] ) { continue ; } // Pull update from dot org if not overriding. if ( ! $ this -> override_dot_org ( 'theme' , $ theme ) ) { continue ; } $ transient -> response [ $ theme -> slug ] = $ response ; } else { /**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */ $ overrides = apply_filters ( 'github_updater_override_dot_org' , [ ] ) ; if ( isset ( $ transient -> response [ $ theme -> slug ] ) && in_array ( $ theme -> slug , $ overrides , true ) ) { unset ( $ transient -> response [ $ theme -> slug ] ) ; } } // Set transient for rollback. if ( isset ( $ _GET [ 'theme' ] , $ _GET [ 'rollback' ] ) && $ theme -> slug === $ _GET [ 'theme' ] ) { $ transient -> response [ $ theme -> slug ] = $ this -> set_rollback_transient ( 'theme' , $ theme ) ; } } return $ transient ; }
Hook into site_transient_update_themes to update.
Finds newest tag and compares to current tag.

@param array $transient

@return array|\stdClass
Hook into site_transient_update_themes to update . Finds newest tag and compares to current tag .