| 1 |
<?php |
| 2 |
/** |
| 3 |
* Endpoint interface. |
| 4 |
* |
| 5 |
* This defines a strict interface that all endpoint classes must implement. |
| 6 |
* |
| 7 |
* @package Charitable/Interfaces/Charitable_Endpoint_Interface |
| 8 |
* @author Eric Daams |
| 9 |
* @copyright Copyright (c) 2020, Studio 164a |
| 10 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 11 |
* @since 1.5.0 |
| 12 |
* @version 1.5.9 |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit; |
| 17 |
} |
| 18 |
|
| 19 |
if ( ! interface_exists( 'Charitable_Endpoint_Interface' ) ) : |
| 20 |
|
| 21 |
/** |
| 22 |
* Charitable_Endpoint_Interface interface. |
| 23 |
* |
| 24 |
* @since 1.5.0 |
| 25 |
*/ |
| 26 |
interface Charitable_Endpoint_Interface { |
| 27 |
|
| 28 |
/** |
| 29 |
* Return the endpoint ID. |
| 30 |
* |
| 31 |
* @since 1.5.0 |
| 32 |
* |
| 33 |
* @return string |
| 34 |
*/ |
| 35 |
public static function get_endpoint_id(); |
| 36 |
|
| 37 |
/** |
| 38 |
* Return the endpoint URL. |
| 39 |
* |
| 40 |
* @since 1.5.0 |
| 41 |
* |
| 42 |
* @param array $args Mixed args. |
| 43 |
* @return string |
| 44 |
*/ |
| 45 |
public function get_page_url( $args = array() ); |
| 46 |
|
| 47 |
/** |
| 48 |
* Return whether we are currently viewing the endpoint. |
| 49 |
* |
| 50 |
* @since 1.5.0 |
| 51 |
* |
| 52 |
* @param array $args Mixed args. |
| 53 |
* @return boolean |
| 54 |
*/ |
| 55 |
public function is_page( $args = array() ); |
| 56 |
} |
| 57 |
|
| 58 |
endif; |
| 59 |
|