Skip to content

Commit 8b62719

Browse files
committed
Show key/secret on the client page
Also adds description on the name.
1 parent 6319e15 commit 8b62719

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

admin.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ function json_oauth_admin_edit_page() {
238238
<input type="text" class="regular-text"
239239
name="name" id="oauth-name"
240240
value="<?php echo esc_attr( $data['name'] ) ?>" />
241+
<p class="description"><?php echo esc_html( 'This is shown to users during authorization and in their profile.' ) ?></p>
241242
</td>
242243
</tr>
243244
<tr>
@@ -249,6 +250,25 @@ function json_oauth_admin_edit_page() {
249250
cols="30" rows="5" style="width: 500px"><?php echo esc_textarea( $data['description'] ) ?></textarea>
250251
</td>
251252
</tr>
253+
254+
<?php if ( ! empty( $consumer ) ): ?>
255+
<tr>
256+
<th scope="row">
257+
<?php echo esc_html( 'Client Key' ) ?>
258+
</th>
259+
<td>
260+
<code><?php echo esc_html( $consumer->key ) ?></code>
261+
</td>
262+
</tr>
263+
<tr>
264+
<th scope="row">
265+
<?php echo esc_html( 'Client Secret' ) ?>
266+
</th>
267+
<td>
268+
<code><?php echo esc_html( $consumer->secret ) ?></code>
269+
</td>
270+
</tr>
271+
<?php endif ?>
252272
</table>
253273

254274
<?php

0 commit comments

Comments
 (0)