Created
October 9, 2012 17:52
-
-
Save pippinsplugins/3860317 to your computer and use it in GitHub Desktop.
Custom RCP Login Form Short Code to Redirect User to Previous Pag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// user login form | |
function pw_rcp_login_form( $atts, $content = null ) { | |
global $post; | |
$prev_page = $_SERVER['HTTP_REFERER']; | |
extract( shortcode_atts( array( | |
'redirect' => $prev_page, | |
'class' => 'rcp_form' | |
), $atts ) ); | |
$output = ''; | |
global $rcp_load_css; | |
// set this to true so the CSS is loaded | |
$rcp_load_css = true; | |
$output = rcp_login_form_fields( array( 'redirect' => $redirect, 'class' => $class ) ); | |
return $output; | |
} | |
remove_shortcode( 'login_form', 'rcp_login_form' ); | |
add_shortcode( 'login_form', 'pw_rcp_login_form' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment