function adminForm() { require_once PHPX_DIR . 'phpx_form.php'; $form = new phpx_form(); $pages = get_pages(); foreach ($pages as $p) { $pageArray[$p->ID] = $p->post_title; } $adminURL = 'tools.php?page=loginx/includes/loginx_admin_obj.php'; if ($message || $_GET['message']) { $text .= '<p>Options Saved</p>'; } $text .= $form->startForm($adminURL, 'loginxForm'); $text .= $form->hidden('nonce', wp_create_nonce('loginx_admin')); $text .= $form->hidden('checkFields', 1); $text .= $form->dropDown('Profile Page', 'profile_page', $this->options['profile_page'], $pageArray, true); $text .= $form->dropDown('Register Page', 'register_page', $this->options['register_page'], $pageArray, true); $text .= $form->dropDown('Login Page', 'login_page', $this->options['login_page'], $pageArray, true); $text .= $form->checkbox('Restrict Admin Area', 'user_admin_redirect', $this->options['user_admin_redirect']); $text .= $form->dropDown('Redirect Admin Area To', 'redirect_admin_page', $this->options['redirect_admin_page'], $pageArray, true); $text .= $form->checkbox('Restrict Wordpress Login Page', 'user_login_redirect', $this->options['user_login_redirect']); $text .= $form->checkbox('Require Email Validation on Register', 'email_valid', $this->options['email_valid']); $text .= $form->checkbox('Allow Guests to view Profiles', 'anon_profiles', $this->options['anon_profiles']); $text .= $form->checkbox('Show Purchases on Profile', 'show_purchases', $this->options['show_purchases']); $text .= $form->textField('ReCaptcha Public Key', 'captcha_public', $this->options['captcha_public']); $text .= $form->textField('ReCaptcha Private Key', 'captcha_private', $this->options['captcha_private']); $text .= $form->startFieldSet('WooCommerce'); $text .= $form->checkbox('Use WooCommerce Login/Registration', 'use_woo', $this->options['use_woo']); $text .= $form->checkbox('Add Links to WooCommerce Login Widget', 'woo_login_widget', $this->options['woo_login_widget']); $text .= $form->endFieldSet(); $text .= $form->endForm(); return $text; }