diff --git a/src/Modules/Licenser.php b/src/Modules/Licenser.php index 5eb8ea88..99b2d2bb 100644 --- a/src/Modules/Licenser.php +++ b/src/Modules/Licenser.php @@ -147,9 +147,10 @@ public function license_view() { -webkit-border-radius: 3px; border-radius: 3px; } - button.button.themeisle-sdk-licenser-button-cta{ + + button.button.themeisle-sdk-licenser-button-cta { line-height: 26px; - height:29px; + height: 29px; vertical-align: top; } @@ -493,7 +494,7 @@ function update_nag() { '%1$s %2$s is available. Check out what\'s new or update now.', $theme->get( 'Name' ), $api_response->new_version, - '#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog', + sprintf( '%s&TB_iframe=true&width=1024&height=800', $this->product->get_changelog() ), $theme->get( 'Name' ), $update_url, $update_onclick @@ -566,18 +567,17 @@ private function get_version_data() { $api_params = array( 'edd_action' => 'get_version', 'version' => $this->product->get_version(), - 'license' => $this->license_key, - 'name' => $this->product->get_name(), + 'license' => empty( $this->license_key ) ? 'free' : '', + 'name' => rawurlencode( $this->product->get_name() ), 'slug' => $this->product->get_slug(), - 'author' => $this->get_distributor_name(), + 'author' => rawurlencode( $this->get_distributor_name() ), 'url' => rawurlencode( home_url() ), ); $response = wp_remote_get( - $this->get_api_url(), + add_query_arg( $api_params, $this->get_api_url() ), array( 'timeout' => 15, 'sslverify' => false, - 'body' => $api_params, ) ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { diff --git a/src/Product.php b/src/Product.php index bb711355..a02b57a0 100644 --- a/src/Product.php +++ b/src/Product.php @@ -345,7 +345,7 @@ public function get_store_name() { public function get_store_url() { if ( strpos( $this->store_url, '/themeisle.com' ) !== false ) { - return 'https://store.themeisle.com'; + return 'https://store.themeisle.com/'; } return $this->store_url; @@ -360,6 +360,21 @@ public function get_basefile() { return $this->basefile; } + /** + * Get changelog url. + * + * @return string Changelog url. + */ + public function get_changelog() { + return add_query_arg( + [ + 'name' => rawurlencode( $this->get_name() ), + 'edd_action' => 'view_changelog', + ], + $this->get_store_url() + ); + } + /** * Returns product filename. *