Add our self-hosted autoupdate plugin to the filter transient

@param $transient
@return object $ transient
541112
public function check_update( $transient )
	{
		if ( empty( $transient->checked ) ) {
			return $transient;
		}

		// Get the remote version
		$remote_version = $this->getRemote_version();

		// If a newer version is available, add the update
		if ( version_compare( $this->current_version, $remote_version->new_version, '<' ) ) {
			$obj = new \stdClass();
			$obj->slug = $this->slug;
			$obj->new_version = $remote_version->new_version;
			$obj->url = $remote_version->url;
			$obj->plugin = $this->plugin_slug;
			$obj->package = $remote_version->package;
			$transient->response[$this->plugin_slug] = $obj;
		}
		return $transient;
	}
978472
protected function reload(AbstractModel $self)
    {
        $this->_initVars();
        $this->extract($self->selfToArray(), false);
        return $this;
    }
1316648
public function updateInsertQuery($insert)
    {
        if ($this->relation) {
            $insert = $this->relation->dsql;
        }

        $insert->set(
            $this->actual_field ?: $this->short_name,
            $this->getSQL()
        );

        return $this;
    }
699948
public function update(Functions\Aggregator $aggregatorFunction)
    {
        if ($this->aggregatorFunction === $aggregatorFunction) {
            return $this;
        }

        return new self($aggregatorFunction);
    }
1009148
public function withEpochSecond(int $epochSecond) : Instant
    {
        if ($epochSecond === $this->epochSecond) {
            return $this;
        }

        return new Instant($epochSecond, $this->nano);
    }
624468
public function plusSeconds(int $seconds) : Instant
    {
        if ($seconds === 0) {
            return $this;
        }

        return new Instant($this->epochSecond + $seconds, $this->nano);
    }
246628
public function setPersistent($persistent)
    {
        Argument::i()->test(1, 'bool');

        $this->persistent = 1;

        if($persistent) {
            $this->persistent = 2;
        }

        return $this;
    }
757004
private function add(JWESerializer $serializer): self
    {
        $this->serializers[$serializer->name()] = $serializer;

        return $this;
    }
1312527
public function to(Model $destination)
    {
        $this->destination = $destination;

        if (!$this->destination->persistence) {
            $this->source->persistence->add($this->destination);
        }

        return $this;
    }
199167
public function preload($preload)
    {
        $validPreloadAttrs = ['auto', 'metadata', 'none'];
        
        if (\in_array($preload, $validPreloadAttrs, true)) {
            $this->attributes['preload'] = $preload;
        }

        return $this;
    }
571317
public function prependPlugin(Plugin ...$plugins)
    {
        $plugins = \array_reverse($plugins);

        foreach ($plugins as $plugin) {
            \array_unshift($this->prependPlugins, $plugin);
        }

        return $this;
    }
936456
public function allow_major_auto_core_updates( $update ) {
		if ( ! apply_filters( 'Boldgrid\Library\Update\isEnalbed', false ) ) {
			return $update;
		}

		return $update || ! empty( $this->settings['wpcore']['all'] ) ||
			! empty( $this->settings['wpcore']['major'] );
	}
701857
public function withAutoplay(bool $autoPlay): self
    {
        if ($this->autoPlay == $autoPlay) {
            return $this;
        }

        $url = clone $this;
        $url->autoPlay = $autoPlay;

        return $url;
    }
1104700
public function update_site_transient( $transient ) {
		$locales = get_available_languages();
		$locales = ! empty( $locales ) ? $locales : [ get_locale() ];
		$repos   = [];

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

		if ( 'site_transient_update_plugins' === current_filter() ) {
			$repos        = Singleton::get_instance( 'Plugin', $this )->get_plugin_configs();
			$translations = wp_get_installed_translations( 'plugins' );
		}
		if ( 'site_transient_update_themes' === current_filter() ) {
			$repos        = Singleton::get_instance( 'Theme', $this )->get_theme_configs();
			$translations = wp_get_installed_translations( 'themes' );
		}

		$repos = array_filter(
			$repos,
			function ( $e ) {
				return isset( $e->language_packs );
			}
		);

		foreach ( $repos as $repo ) {
			foreach ( $locales as $locale ) {
				$lang_pack_mod   = isset( $repo->language_packs->$locale )
					? strtotime( $repo->language_packs->$locale->updated )
					: 0;
				$translation_mod = isset( $translations[ $repo->slug ][ $locale ] )
					? strtotime( $translations[ $repo->slug ][ $locale ]['PO-Revision-Date'] )
					: 0;
				if ( $lang_pack_mod > $translation_mod ) {
					$transient->translations[] = (array) $repo->language_packs->$locale;
				}
			}
		}

		$transient->translations = array_unique( $transient->translations, SORT_REGULAR );

		return $transient;
	}
1107619
public function preFlushModifiedAt(\Doctrine\ORM\Event\PreFlushEventArgs $args) : self
    {
        if (is_null($this->getModifiedAt())) {
            $this->setModifiedAt(new \DateTime('now'));
        }

        return $this;
    }
881682
public function push($object): self
    {
        $this->internalDataListUpdate();
        array_push($this->internalDataListData, $object);
        return $this;
    }
548588
public function update($object, $flushed = true)
    {
        $this->preUpdate($object, $flushed);
        $em = $this->getEntityManager();
        $em->persist($object);
        if ($flushed) {
            $em->flush($object);
        }
        $this->postUpdate($object, $flushed);
        return $object;
    }