# charitable/1.7.0.1/templates/shortcodes/logout.php

Charitable – Donation &amp; Fundraising Platform (Donation Forms, Recurring Donations &amp; Fundraising Campaigns), version 1.7.0.1. 24 lines.

- Page: https://pluginprobe.com/plugins/charitable/1.7.0.1/code/templates/shortcodes/logout.php
- Raw: https://pluginprobe.com/plugins/charitable/1.7.0.1/raw/templates/shortcodes/logout.php
- Modified: 2022-09-21T15:01:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/charitable/1.7.0.1/code/templates/shortcodes/logout.php#L10-L20`.

```php
<?php
/**
 * The template used to display the logout link. Provided here primarily as a way to make
 * it easier to override using theme templates.
 *
 * Override this template by copying it to yourtheme/charitable/shortcodes/logout.php
 *
 * @author  David Bisset
 * @package Charitable/Templates/Account
 * @since   1.5.0
 * @version 1.5.0
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! array_key_exists( 'redirect', $view_args ) || ! array_key_exists( 'text', $view_args ) ) {
	return;
}

?>
<a href="<?php echo wp_logout_url( $view_args['redirect'] ) ?>"><?php echo $view_args['text'] ?></a>
```
