← All changes
|
includes/endpoints/class-charitable-registration-endpoint.php
+21
-5
1.6.7
→
1.8.13
View file →
| @@ -2,16 +2,18 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Registration endpoint. |
| 4 | 4 | * |
| 5 | 5 | * @package Charitable/Classes/Charitable_Registration_Endpoint |
| 6 | - * @author Eric Daams | |
| 7 | - * @copyright Copyright (c) 2018, Studio 164a | |
| 6 | + * @author David Bisset | |
| 7 | + * @copyright Copyright (c) 2023, WP Charitable LLC | |
| 8 | 8 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 | 9 | * @since 1.5.0 |
| 10 | - * @version 1.5.4 | |
| 10 | + * @version 1.6.37 | |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit; | |
| 15 | +} | |
| 14 | 16 | |
| 15 | 17 | if ( ! class_exists( 'Charitable_Registration_Endpoint' ) ) : |
| 16 | 18 | |
| 17 | 19 | /** |
| @@ -20,11 +22,14 @@ | ||
| 20 | 22 | * @since 1.5.0 |
| 21 | 23 | */ |
| 22 | 24 | class Charitable_Registration_Endpoint extends Charitable_Endpoint { |
| 23 | 25 | |
| 24 | - /* @var string */ | |
| 26 | + /** Endpoint ID. */ | |
| 25 | 27 | const ID = 'registration'; |
| 26 | 28 | |
| 29 | + /** The endpoint's priority in terms of when it should be loaded. */ | |
| 30 | + const PRIORITY = 20; | |
| 31 | + | |
| 27 | 32 | /** |
| 28 | 33 | * Object instantiation. |
| 29 | 34 | * |
| 30 | 35 | * @since 1.5.4 |
| @@ -81,8 +86,19 @@ | ||
| 81 | 86 | return $page == $post->ID; |
| 82 | 87 | } |
| 83 | 88 | |
| 84 | 89 | return false; |
| 90 | + } | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * Get the nav menu object. | |
| 94 | + * | |
| 95 | + * @since 1.6.29 | |
| 96 | + * | |
| 97 | + * @return object | |
| 98 | + */ | |
| 99 | + public function nav_menu_object() { | |
| 100 | + return $this->get_nav_menu_object( __( 'Register', 'charitable' ) ); | |
| 85 | 101 | } |
| 86 | 102 | } |
| 87 | 103 | |
| 88 | 104 | endif; |