Files
wp-multisite-waas/views/dashboard-widgets/login-form.php
David Stone d88e50df38 Prep Plugin for release on WordPress.org (#23)
* Update translation text domain
* Escape everything that should be escaped.
* Add nonce checks where needed.
* Sanitize all inputs.
* Apply Code style changes across the codebase.
* Correct many deprecation notices.
* Optimize load order of many filters.
* Add Proper Build script
* Use emojii flags
* Fix i18n deprecation  notice for translating too early
* Put all scripts in footer and load async
2025-04-14 11:36:46 -06:00

68 lines
1.3 KiB
PHP

<?php
/**
* Login Form
*
* @since 2.0.0
*/
?>
<div class="wu-styling <?php echo esc_attr($className); ?>">
<?php if ($logged) : ?>
<!-- Already Logged Block -->
<div class="wu-p-4 wu-bg-yellow-200 wu-rounded <?php echo wu_env_picker('wu-mb-4', 'wu-mt-2 wu-shadow-sm'); ?>">
<?php
// translators: 1$s is the display name of the user currently logged in.
printf(wp_kses_post(__('Not %1$s? <a href="%2$s" class="wu-no-underline">Log in</a> using your account.', 'wp-multisite-waas')), esc_html(wp_get_current_user()->display_name), esc_url($login_url));
?>
</div>
<!-- Already Logged Block - End -->
<?php else : ?>
<!-- Title Element -->
<div class="wu-pb-4 wu-flex wu-items-center">
<?php if ($display_title) : ?>
<h2 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo esc_html($title); ?>
</h2>
<?php endif; ?>
<?php if (wu_get_setting('enable_registration', true)) : ?>
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('Update Billing Address', 'wp-multisite-waas'); ?>"
class="wu-text-sm wu-no-underline button"
href="<?php echo wu_get_registration_url(); ?>"
>
<?php esc_html_e('Create an Account', 'wp-multisite-waas'); ?>
</a>
</div>
<?php endif; ?>
</div>
<!-- Title Element - End -->
<?php $form->render(); ?>
<?php endif; ?>
</div>