| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template used to display the logout link. Provided here primarily as a way to make |
| 4 |
* it easier to override using theme templates. |
| 5 |
* |
| 6 |
* Override this template by copying it to yourtheme/charitable/shortcodes/logout.php |
| 7 |
* |
| 8 |
* @author David Bisset |
| 9 |
* @package Charitable/Templates/Account |
| 10 |
* @since 1.5.0 |
| 11 |
* @version 1.5.0 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
if ( ! array_key_exists( 'redirect', $view_args ) || ! array_key_exists( 'text', $view_args ) ) { |
| 20 |
return; |
| 21 |
} |
| 22 |
|
| 23 |
?> |
| 24 |
<a href="<?php echo wp_logout_url( $view_args['redirect'] ) ?>"><?php echo $view_args['text'] ?></a> |