Skip to content

Commit

Permalink
Added copied key button #36
Browse files Browse the repository at this point in the history
  • Loading branch information
iamakram22 committed Jul 28, 2023
1 parent 1b3871f commit 917a0a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/wpem-rest-api-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function update_api_key(){
$response['consumer_secret'] = $consumer_secret;
$response['app_key'] = $app_key;
$response['message'] = __('API Key generated successfully. Make sure to copy your new keys now as the secret key will be hidden once you leave this page.', 'wpem-rest-api');
$response['revoke_url'] = '<a class="wpem-backend-theme-button wpem-revoke-button" href="' . esc_url(wp_nonce_url(add_query_arg(array( 'revoke-key' => $key_id ), admin_url('edit.php?post_type=event_listing&page=wpem-rest-api-settings&tab=api-access')), 'revoke')) . '">' . __('Revoke key', 'wpem-rest-api') . '</a>';
$response['revoke_url'] = '<a class="wpem-backend-theme-button" href="' . esc_url(admin_url('edit.php?post_type=event_listing&page=wpem-rest-api-settings&tab=api-access')) . '">' . __('I have Copied the Keys', 'wpem-rest-api') . '</a> <br/><br/> <a class="wpem-backend-theme-button wpem-revoke-button" href="' . esc_url(wp_nonce_url(add_query_arg(array( 'revoke-key' => $key_id ), admin_url('edit.php?post_type=event_listing&page=wpem-rest-api-settings&tab=api-access')), 'revoke')) . '">' . __('Revoke key', 'wpem-rest-api') . '</a>';
}
} catch ( Exception $e ) {
wp_send_json_error(array( 'message' => $e->getMessage() ));
Expand Down

0 comments on commit 917a0a6

Please sign in to comment.