intersynergy-login-plugin.php
/**
     * A shortcode for rendering the form used to reset a user's password.
     *
     * @param array  $attributes Shortcode attributes.
     * @param string $content    The text content for shortcode. Not used.
     *
     * @return string The shortcode output
     */
A shortcode for rendering the form used to reset a user's password.
@param array  $attributes Shortcode attributes.
@param string $content    The text content for shortcode. Not used.

@return string The shortcode output
A shortcode for rendering the form used to reset a user ' s password . @param array $attributes Shortcode attributes . @param string $content The text content for shortcode . Not used . @return string The shortcode output
public function render_password_reset_form($attributes, $content = null)
    {
        $default_attributes = array('show_title' => false);
        $attributes = shortcode_atts($default_attributes, $attributes);
        if (is_user_logged_in()) {
            return __('You are already signed in.', 'intersynergy-login-plugin');
        } else {
            if (isset($_REQUEST['login']) && isset($_REQUEST['key'])) {
                $attributes['login'] = $_REQUEST['login'];
                $attributes['key'] = $_REQUEST['key'];
                $errors = array();
                if (isset($_REQUEST['error'])) {
                    $error_codes = explode(',', $_REQUEST['error']);
                    foreach ($error_codes as $code) {
                        $errors [] = $this->get_error_message($code);
                    }
                }
                $attributes['errors'] = $errors;
                return $this->get_template_html('password_reset_form', $attributes);
            } else {
                return __('Invalid password reset link.', 'intersynergy-login-plugin');
            }
        }
    }
public function render_password_reset_form ( $ attributes , $ content = null ) { $ default_attributes = array ( 'show_title' => false ) ; $ attributes = shortcode_atts ( $ default_attributes , $ attributes ) ; if ( is_user_logged_in ( ) ) { return __ ( 'You are already signed in.' , 'intersynergy-login-plugin' ) ; } else { if ( isset ( $ _REQUEST [ 'login' ] ) && isset ( $ _REQUEST [ 'key' ] ) ) { $ attributes [ 'login' ] = $ _REQUEST [ 'login' ] ; $ attributes [ 'key' ] = $ _REQUEST [ 'key' ] ; $ errors = array ( ) ; if ( isset ( $ _REQUEST [ 'error' ] ) ) { $ error_codes = explode ( ',' , $ _REQUEST [ 'error' ] ) ; foreach ( $ error_codes as $ code ) { $ errors [ ] = $ this -> get_error_message ( $ code ) ; } } $ attributes [ 'errors' ] = $ errors ; return $ this -> get_template_html ( 'password_reset_form' , $ attributes ) ; } else { return __ ( 'Invalid password reset link.' , 'intersynergy-login-plugin' ) ; } } }
A shortcode for rendering the form used to reset a user's password.
A shortcode for rendering the form used to reset a user ' s password .
// Parse shortcode attributes // Error messages