| | |
| | | <?php |
| | | namespace JVBase\managers; |
| | | |
| | | use JVBase\blocks\CustomBlocks; |
| | | use JVBase\forms\TaxonomySelector; |
| | | use JVBase\meta\MetaManager; |
| | | use JVBase\meta\MetaForm; |
| | | use JVBase\managers\AjaxRateLimiter; |
| | | use JVBase\meta\Form; |
| | | |
| | | use JVBase\utility\Features; |
| | | use WP_Error; |
| | | use WP_User; |
| | |
| | | class LoginManager |
| | | { |
| | | protected Features $siteFeatures; |
| | | protected ?MetaForm $metaForm = null; |
| | | protected CacheManager $cache; |
| | | protected ?Form $form = null; |
| | | protected Cache $cache; |
| | | |
| | | |
| | | protected array $forms =[]; |
| | |
| | | $this->siteFeatures = Features::forSite(); |
| | | |
| | | |
| | | $this->cache = CacheManager::for('login'); |
| | | $this->cache = Cache::for('login'); |
| | | |
| | | // Initialize magic link support if enabled |
| | | if ($this->siteFeatures->has('magicLink')) { |
| | |
| | | |
| | | protected function renderForms():void |
| | | { |
| | | $this->metaForm = new MetaForm(); |
| | | $form = $this->action.'form'; |
| | | ?> |
| | | <section class="login-box col btw"> |
| | |
| | | do_action('jvb_add_token_inputs', $this->action); |
| | | |
| | | foreach ($this->fields as $name => $config) { |
| | | $this->metaForm->render($name, '', $config); |
| | | echo Form::render($name, '', $config); |
| | | } |
| | | |
| | | $this->maybeTurnstile(); |