fix: Resolve Login Page shortcode processing issue
- Fix the Trainer Login page to directly use Login_Handler class - Skip shortcode processing and call render_login_form directly - Ensure Login_Handler class is loaded before rendering the form The issue was that the shortcode registration mechanism wasn't working properly between the namespace and the static/non-static method calls. By directly instantiating the Login_Handler class and calling the render method, we bypass the shortcode system and directly render the login form. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
12e360b6e6
commit
f5ccb9085c
1 changed files with 7 additions and 1 deletions
|
|
@ -18,7 +18,13 @@ get_header(); ?>
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
<?php
|
<?php
|
||||||
// Process the shortcode directly
|
// Process the shortcode directly
|
||||||
echo do_shortcode('[hvac_community_login]');
|
// 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());
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue