cacheable = false; } /** * Return the endpoint ID. * * @since 1.5.0 * * @return string */ public static function get_endpoint_id() { return self::ID; } /** * Return the endpoint URL. * * @since 1.5.0 * * @global WP_Rewrite $wp_rewrite * @param array $args Mixed args. * @return string */ public function get_page_url( $args = array() ) { $page = charitable_get_option( 'registration_page', 'wp' ); return 'wp' == $page ? wp_registration_url() : get_permalink( $page ); } /** * Return whether we are currently viewing the endpoint. * * @since 1.5.0 * * @global WP_Post $post * @param array $args Mixed args. * @return boolean */ public function is_page( $args = array() ) { global $post; $page = charitable_get_option( 'registration_page', 'wp' ); if ( 'wp' == $page ) { return wp_registration_url() == charitable_get_current_url(); } if ( is_object( $post ) ) { return $page == $post->ID; } return false; } /** * Get the nav menu object. * * @since 1.6.29 * * @return object */ public function nav_menu_object() { return $this->get_nav_menu_object( __( 'Register', 'charitable' ) ); } } endif;