public function _pre_set_site_transient_update_themes( $transient ) {
		$current  = wp_get_theme( $this->theme_name );
		$api_data = $this->_get_transient_api_data();

		if ( is_wp_error( $api_data ) ) {
			$this->_set_notice_error_about_github_api();
			return $transient;
		}

		if ( ! isset( $api_data->tag_name ) ) {
			return $transient;
		}

		if ( ! $this->_should_update( $current['Version'], $api_data->tag_name ) ) {
			return $transient;
		}

		$package = $this->_get_zip_url( $api_data );
		$http_status_code = $this->_get_http_status_code( $package );
		if ( ! $package || ! in_array( $http_status_code, [ 200, 302 ] ) ) {
			error_log( 'Inc2734_WP_GitHub_Theme_Updater error. zip url not found. ' . $http_status_code . ' ' . $package );
			return $transient;
		}

		$transient->response[ $this->theme_name ] = [
			'theme'       => $this->theme_name,
			'new_version' => $api_data->tag_name,
			'url'         => ( ! empty( $this->fields['homepage'] ) ) ? $this->fields['homepage'] : '',
			'package'     => $package,
		];

		return $transient;
	}
public function _pre_set_site_transient_update_themes( $transient ) {
		$current  = wp_get_theme( $this->theme_name );
		$api_data = $this->_get_transient_api_data();

		if ( is_wp_error( $api_data ) ) {
			$this->_set_notice_error_about_github_api();
			return $transient;
		}

		if ( ! isset( $api_data->tag_name ) ) {
			return $transient;
		}

		if ( ! $this->_should_update( $current['Version'], $api_data->tag_name ) ) {
			return $transient;
		}

		$package = $this->_get_zip_url( $api_data );
		$http_status_code = $this->_get_http_status_code( $package );
		if ( ! $package || ! in_array( $http_status_code, [ 200, 302 ] ) ) {
			error_log( 'Inc2734_WP_GitHub_Theme_Updater error. zip url not found. ' . $http_status_code . ' ' . $package );
			return $transient;
		}

		$transient->response[ $this->theme_name ] = [
			'theme'       => $this->theme_name,
			'new_version' => $api_data->tag_name,
			'url'         => ( ! empty( $this->fields['homepage'] ) ) ? $this->fields['homepage'] : '',
			'package'     => $package,
		];

		return $transient;
	}
public function _pre_set_site_transient_update_themes ( $ transient ) { $ current = wp_get_theme ( $ this -> theme_name ) ; $ api_data = $ this -> _get_transient_api_data ( ) ; if ( is_wp_error ( $ api_data ) ) { $ this -> _set_notice_error_about_github_api ( ) ; return $ transient ; } if ( ! isset ( $ api_data -> tag_name ) ) { return $ transient ; } if ( ! $ this -> _should_update ( $ current [ 'Version' ] , $ api_data -> tag_name ) ) { return $ transient ; } $ package = $ this -> _get_zip_url ( $ api_data ) ; $ http_status_code = $ this -> _get_http_status_code ( $ package ) ; if ( ! $ package || ! in_array ( $ http_status_code , [ 200 , 302 ] ) ) { error_log ( 'Inc2734_WP_GitHub_Theme_Updater error. zip url not found. ' . $ http_status_code . ' ' . $ package ) ; return $ transient ; } $ transient -> response [ $ this -> theme_name ] = [ 'theme' => $ this -> theme_name , 'new_version' => $ api_data -> tag_name , 'url' => ( ! empty ( $ this -> fields [ 'homepage' ] ) ) ? $ this -> fields [ 'homepage' ] : '' , 'package' => $ package , ] ; return $ transient ; }
Overwirte site_transient_update_themes from GitHub API

@param false|array $transient
@return false|array
Overwirte site_transient_update_themes from GitHub API