芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/envato-elements/inc/api/class-subscription-api.php
get_param('token') ); if(!$extensions_token){ return $this->format_error( 'verifyElementsToken', 'missing_data', 'Please provide a token' ); } $subscriptionClass = Subscription::get_instance(); $token_response = $subscriptionClass->verify_token_and_cache_user_info($extensions_token); if($token_response['valid']){ // we received a valid token from Extensions API if($token_response['status'] === $subscriptionClass::SUBSCRIPTION_PAID) { // return success if they have a paid subscription: return $this->format_success( $token_response ); }else{ // return failure if they haven't an active paid subscription return $this->format_error( 'verifyElementsToken', 'no_paid_account', 'Verification Failed - you need a paid, Envato Elements subscription to continue' ); } }else{ // token was invalid, see if we have an 'error' code from Extensions API: if(!empty($token_response['error']) && !empty($token_response['error']['code'])){ return $this->format_error( 'verifyElementsToken', $token_response['error']['code'], $token_response['error']['message'] ); } // Unknown error from verification process: return $this->format_error( 'verifyElementsToken', 'invalid_token', 'Invalid token provided', $token_response ); } } public function register_api_endpoints() { $this->register_endpoint( 'verifyExtensionsToken', [ $this, 'verify_extensions_token' ] ); } }