mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-05 02:37:43 +08:00
Signed-off-by: Andy Fragen <andy@thefragens.com>
This commit is contained in:
parent
f918ca3981
commit
c156fddb3c
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ if ( ! class_exists( 'Fragen\\Git_Updater\\Lite' ) ) {
|
||||||
if ( empty( $this->update_server ) || is_wp_error( $this->update_server ) ) {
|
if ( empty( $this->update_server ) || is_wp_error( $this->update_server ) ) {
|
||||||
return new \WP_Error( 'invalid_domain', 'Invalid update server domain', $this->update_server );
|
return new \WP_Error( 'invalid_domain', 'Invalid update server domain', $this->update_server );
|
||||||
}
|
}
|
||||||
$url = "$this->update_server/git-updater/v1/update-api/?slug=$this->slug";
|
$url = add_query_arg(
|
||||||
|
array( 'slug' => $this->slug ),
|
||||||
|
sprintf( '%s/wp-json/git-updater/v1/update-api/', $this->update_server )
|
||||||
|
);
|
||||||
$response = get_site_transient( "git-updater-lite_{$this->file}" );
|
$response = get_site_transient( "git-updater-lite_{$this->file}" );
|
||||||
if ( ! $response ) {
|
if ( ! $response ) {
|
||||||
$response = wp_remote_post( $url );
|
$response = wp_remote_post( $url );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue