| 1 |
<?php |
| 2 |
/** |
| 3 |
* Charitable Email interface. |
| 4 |
* |
| 5 |
* This defines a strict interface that emails must implement. |
| 6 |
* |
| 7 |
* @version 1.5.0 |
| 8 |
* @package Charitable/Interfaces/Charitable_Email_Interface |
| 9 |
* @author Eric Daams |
| 10 |
* @copyright Copyright (c) 2020, Studio 164a |
| 11 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
if ( ! interface_exists( 'Charitable_Email_Interface' ) ) : |
| 20 |
|
| 21 |
/** |
| 22 |
* Charitable_Email_Interface interface. |
| 23 |
* |
| 24 |
* @since 1.2.0 |
| 25 |
*/ |
| 26 |
interface Charitable_Email_Interface { |
| 27 |
|
| 28 |
/** |
| 29 |
* Returns the email's ID. |
| 30 |
* |
| 31 |
* @since 1.2.0 |
| 32 |
* |
| 33 |
* @return string |
| 34 |
*/ |
| 35 |
public static function get_email_id(); |
| 36 |
|
| 37 |
/** |
| 38 |
* Resend an email. |
| 39 |
* |
| 40 |
* @since 1.5.0 |
| 41 |
* |
| 42 |
* @param int $object_id An object ID. |
| 43 |
* @param array $args Mixed set of arguments. |
| 44 |
* @return boolean |
| 45 |
*/ |
| 46 |
public static function resend( $object_id, $args = array() ); |
| 47 |
|
| 48 |
/** |
| 49 |
* Checks whether an email can be resent. |
| 50 |
* |
| 51 |
* @since 1.5.0 |
| 52 |
* |
| 53 |
* @param int $object_id An object ID. |
| 54 |
* @param array $args Mixed set of arguments. |
| 55 |
* @return boolean |
| 56 |
*/ |
| 57 |
public static function can_be_resent( $object_id, $args = array() ); |
| 58 |
} |
| 59 |
|
| 60 |
endif; |
| 61 |
|