<?php
/**
 * Custom login form template used when a custom login slug is set.
 *
 * @package Plugin_Compass_Appointment_Manager
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

/**
 * Redirect to the default WordPress login page if the custom slug is not set.
 */
$custom_slug = get_option( 'plugin_name_custom_login_url', '' );
if ( empty( $custom_slug ) ) {
    wp_redirect( wp_login_url() );
    exit;
}

/**
 * Show a simple notice for the custom login URL.
 */
?>
<div class="login-url-container">
    <h2><?php esc_html_e( 'Custom Login Page', 'plugin-name' ); ?></h2>
    <p><?php esc_html_e( 'Please use the login form at the new URL.', 'plugin-name' ); ?></p>
    <p><a href="<?php echo esc_url( wp_login_url() ); ?>"><?php esc_html_e( 'Log In', 'plugin-name' ); ?></a></p>
</div>