| 1 |
<?php |
| 2 |
/** |
| 3 |
* OAuth Authorization Error Template. |
| 4 |
* |
| 5 |
* Renders a styled error page using WordPress login page chrome, |
| 6 |
* consistent with the consent form in oauth-authorize.php. |
| 7 |
* |
| 8 |
* @package Activitypub |
| 9 |
* |
| 10 |
* Variables available (passed via include from class-server.php): |
| 11 |
* @var string $error_message The error message to display. |
| 12 |
*/ |
| 13 |
|
| 14 |
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- Variables passed via include. |
| 15 |
|
| 16 |
$login_errors = new WP_Error( |
| 17 |
'oauth_error', |
| 18 |
esc_html( $error_message ) |
| 19 |
); |
| 20 |
|
| 21 |
login_header( |
| 22 |
esc_html__( 'Authorization Error', 'activitypub' ), |
| 23 |
'', |
| 24 |
$login_errors |
| 25 |
); |
| 26 |
?> |
| 27 |
|
| 28 |
<p style="margin-top: 20px; text-align: center;"> |
| 29 |
<a href="<?php echo esc_url( home_url() ); ?>"><?php esc_html_e( 'Go to homepage', 'activitypub' ); ?></a> |
| 30 |
</p> |
| 31 |
|
| 32 |
<?php |
| 33 |
login_footer(); |
| 34 |
|