/** * Reset Password Dialog. * * Loads the form for resetting password. * * @since 2.1.0 * * @return string $str the generated html fo the reset password form. */ function wpmem_inc_resetpassword() { // Create the default inputs. $default_inputs = array(array('name' => __('Username'), 'type' => 'text', 'tag' => 'user', 'class' => 'username', 'div' => 'div_text'), array('name' => __('Email'), 'type' => 'text', 'tag' => 'email', 'class' => 'password', 'div' => 'div_text')); /** * Filter the array of reset password form fields. * * @since 2.9.0 * * @param array $default_inputs An array matching the elements used by default. */ $default_inputs = apply_filters('wpmem_inc_resetpassword_inputs', $default_inputs); $defaults = array('heading' => __('Reset Forgotten Password', 'wp-members'), 'action' => 'pwdreset', 'button_text' => __('Reset Password'), 'inputs' => $default_inputs); /** * Filter the arguments to override reset password form defaults. * * @since 2.9.0 * * @param array $args An array of arguments to use. Default null. */ $args = apply_filters('wpmem_inc_resetpassword_args', ''); $arr = wp_parse_args($args, $defaults); $str = wpmem_login_form('page', $arr); return $str; }
/** * Reset Password Dialog * * Loads the form for resetting password. * * @since 2.1 * * @uses wpmem_login_form() * * @return string $str the generated html fo the reset password form */ function wpmem_inc_resetpassword() { $arr = array(__('Reset Forgotten Password', 'wp-members'), __('Username', 'wp-members'), 'text', 'user', __('Email', 'wp-members'), 'text', 'email', 'pwdreset', __('Reset Password', 'wp-members'), 'username', 'textbox'); $str = wpmem_login_form('page', $arr); return $str; }
/** * Forgot Username Form. * * Loads the form for retrieving a username. * * @since 3.0.8 * * @return string $str The generated html for the forgot username form. */ function wpmem_inc_forgotusername() { // create the default inputs $default_inputs = array(array('name' => __('Email Address', 'wp-members'), 'type' => 'text', 'tag' => 'user_email', 'class' => 'username', 'div' => 'div_text')); /** * Filter the array of forgot username form fields. * * @since 2.9.0 * * @param array $default_inputs An array matching the elements used by default. */ $default_inputs = apply_filters('wpmem_inc_forgotusername_inputs', $default_inputs); $defaults = array('heading' => __('Retrieve username', 'wp-members'), 'action' => 'getusername', 'button_text' => __('Retrieve username', 'wp-members'), 'inputs' => $default_inputs); /** * Filter the arguments to override change password form defaults. * * @since * * @param array $args An array of arguments to use. Default null. */ $args = apply_filters('wpmem_inc_forgotusername_args', ''); $arr = wp_parse_args($args, $defaults); $str = wpmem_login_form('page', $arr); return $str; }
/** * Login Dialog * * Loads the login form for user login * * @since 1.8 * * @uses apply_filters Calls wpmem_restricted_msg filters message content * @uses wpmem_login_form() * * @param string $page * @return string the generated html for the login form */ function wpmem_inc_login($page = "page") { global $wpmem_regchk; $str = ''; $arr = get_option('wpmembers_dialogs'); if ($page == "page") { if ($wpmem_regchk != "success") { // this shown above blocked content $str = '<p>' . stripslashes($arr[0]) . '</p>'; // filter blocked content message $str = apply_filters('wpmem_restricted_msg', $str); } } //$arr = array( __( 'Existing users Login', 'wp-members' ), __( 'Username', 'wp-members' ), 'text', 'log', __( 'Password', 'wp-members' ), 'password', 'pwd', 'login', __( 'Login', 'wp-members' ), 'username', 'password' ); $arr = array(__('Existing users Login', 'wp-members'), __('Username or Email', 'wp-members'), 'text', 'log', __('Password', 'wp-members'), 'password', 'pwd', 'login', __('Login', 'wp-members'), 'username', 'password'); $str = $str . wpmem_login_form($page, $arr); return $str; }