intersynergy-login-plugin.php
/**
     * A shortcode for rendering the login form.
     *
     * @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 login form.
@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 login form . @param array $attributes Shortcode attributes . @param string $content The text content for shortcode . Not used . @return string The shortcode output
public function render_login_form($attributes, $content = null)
    {
        $default_attributes = array('show_title' => false);
        $attributes = shortcode_atts($default_attributes, $attributes);
        $show_title = $attributes['show_title'];
        if (is_user_logged_in()) {
            return __('You are already signed in.', 'intersynergy-login-plugin');
        }
        $attributes['redirect'] = '';
        if (isset($_REQUEST['redirect_to'])) {
            $attributes['redirect'] = wp_validate_redirect($_REQUEST['redirect_to'], $attributes['redirect']);
        }
        $attributes['logged_out'] = isset($_REQUEST['logged_out']) && $_REQUEST['logged_out'] == true;
        $attributes['registered'] = isset($_REQUEST['registered']);
        $attributes['lost_password_sent'] = isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm';
        $attributes['password_updated'] = isset($_REQUEST['password']) && $_REQUEST['password'] == 'changed';
        return $this->get_template_html('login_form', $attributes);
    }
public function render_login_form ( $ attributes , $ content = null ) { $ default_attributes = array ( 'show_title' => false ) ; $ attributes = shortcode_atts ( $ default_attributes , $ attributes ) ; $ show_title = $ attributes [ 'show_title' ] ; if ( is_user_logged_in ( ) ) { return __ ( 'You are already signed in.' , 'intersynergy-login-plugin' ) ; } $ attributes [ 'redirect' ] = '' ; if ( isset ( $ _REQUEST [ 'redirect_to' ] ) ) { $ attributes [ 'redirect' ] = wp_validate_redirect ( $ _REQUEST [ 'redirect_to' ] , $ attributes [ 'redirect' ] ) ; } $ attributes [ 'logged_out' ] = isset ( $ _REQUEST [ 'logged_out' ] ) && $ _REQUEST [ 'logged_out' ] == true ; $ attributes [ 'registered' ] = isset ( $ _REQUEST [ 'registered' ] ) ; $ attributes [ 'lost_password_sent' ] = isset ( $ _REQUEST [ 'checkemail' ] ) && $ _REQUEST [ 'checkemail' ] == 'confirm' ; $ attributes [ 'password_updated' ] = isset ( $ _REQUEST [ 'password' ] ) && $ _REQUEST [ 'password' ] == 'changed' ; return $ this -> get_template_html ( 'login_form' , $ attributes ) ; }
A shortcode for rendering the login form.
A shortcode for rendering the login form .
// Parse shortcode attributes // Pass the redirect parameter to the WordPress login functionality: by default, // don't specify a redirect, but if a valid redirect URL has been passed as // request parameter, use it. // Check if user just logged out // Check if the user just registered // Check if the user just requested a new password // Check if user just updated password // Render the login form using an external template