- Added explicit checks to prevent authentication redirects on registration page - Added ensure_registration_page_public() method with priority 1 to run before other auth checks - Included registration-pending and training-login pages in public pages list - Added fallback function in main plugin file to remove auth hooks on registration page This ensures that users can access /trainer/registration/ without being logged in, as intended for new trainer signups.
51 lines
No EOL
1.4 KiB
PHP
51 lines
No EOL
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: HVAC Community Login
|
|
*
|
|
* This is the custom template for the community login page.
|
|
*
|
|
* @package HVAC_Community_Events
|
|
*/
|
|
|
|
get_header(); ?>
|
|
|
|
<style>
|
|
/* Override theme constraints for login page */
|
|
#primary, #main, .content-area, .site-main {
|
|
max-width: none !important;
|
|
width: 100% !important;
|
|
margin: 0 !important;
|
|
padding: 0 !important;
|
|
}
|
|
|
|
/* Hide default page title */
|
|
.entry-header {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Ensure full-width wrapper */
|
|
.hvac-community-login-wrapper {
|
|
width: 100vw !important;
|
|
margin-left: calc(-50vw + 50%) !important;
|
|
padding: 60px 20px !important;
|
|
min-height: 70vh !important;
|
|
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
|
|
}
|
|
</style>
|
|
|
|
<div id="primary" class="content-area">
|
|
<main id="main" class="site-main" role="main">
|
|
<?php
|
|
// Process the shortcode directly
|
|
// First instantiate the login handler class to ensure shortcode is registered
|
|
if (!class_exists('\\HVAC_Community_Events\\Community\\Login_Handler')) {
|
|
require_once HVAC_CE_PLUGIN_DIR . 'includes/community/class-login-handler.php';
|
|
}
|
|
$login_handler = new \HVAC_Community_Events\Community\Login_Handler();
|
|
// Now call the render method directly
|
|
echo $login_handler->render_login_form(array());
|
|
?>
|
|
</main><!-- #main -->
|
|
</div><!-- #primary -->
|
|
|
|
<?php get_footer(); ?>
|