Skip to content

Commit

Permalink
Fix php notices
Browse files Browse the repository at this point in the history
  • Loading branch information
miled committed Jul 22, 2017
1 parent 08ae9d0 commit 1e9ac6c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions includes/admin/components/auth-paly/index.php
Expand Up @@ -125,28 +125,32 @@ function wsl_component_authtest()
</tr>
<?php endif; ?>

<?php if( $adapter->getAccessToken()["access_token"] ): ?>
<?php
$accessToken = $adapter->getAccessToken();
?>

<?php if( isset($accessToken["access_token"]) ): ?>
<tr>
<th width="200"><label><?php _wsl_e("Access token", 'wordpress-social-login') ?></label></th>
<td><div style="max-width:650px"><?php echo $adapter->getAccessToken()["access_token"]; ?></div></td>
</tr>
<?php endif; ?>

<?php if( $adapter->getAccessToken()["access_token_secret"] ): ?>
<?php if( isset($accessToken["access_token_secret"]) ): ?>
<tr>
<th width="200"><label><?php _wsl_e("Access token secret", 'wordpress-social-login') ?></label></th>
<td><?php echo $adapter->getAccessToken()["access_token_secret"]; ?></td>
</tr>
<?php endif; ?>

<?php if( $adapter->getAccessToken()["expires_in"] ): ?>
<?php if( isset($accessToken["expires_in"]) ): ?>
<tr>
<th width="200"><label><?php _wsl_e("Access token expires in", 'wordpress-social-login') ?></label></th>
<td><?php echo (int) $adapter->getAccessToken()["expires_at"] - time(); ?> <?php _wsl_e("second(s)", 'wordpress-social-login') ?></td>
</tr>
<?php endif; ?>

<?php if( $adapter->getAccessToken()["expires_at"] ): ?>
<?php if( isset($accessToken["expires_at"]) ): ?>
<tr>
<th width="200"><label><?php _wsl_e("Access token expires at", 'wordpress-social-login') ?></label></th>
<td><?php echo date( DATE_W3C, $adapter->getAccessToken()["expires_at"] ); ?></td>
Expand Down

0 comments on commit 1e9ac6c

Please sign in to comment.