add_filter('wsl_process_login_get_redirect_to','wp_social_plugin_custom_redirect');
function wp_social_plugin_custom_redirect() {
return get_permalink(2);
}
add_filter('login_redirect','bpdev_redirect_to_profile',100,3);
function wp_custom_redirect( $redirect_to, $request, $user ) {
global $user;
if ( isset( $user->roles ) && is_array( $user->roles ) ) {
if ( in_array( 'administrator', $user->roles ) ) {
// redirect them to the default place
return $redirect_to;
} else {
return get_permalink();
}
} else {
return $redirect_to;
}
}
function wp_social_plugin_custom_redirect() {
return get_permalink(2);
}
add_filter('login_redirect','bpdev_redirect_to_profile',100,3);
function wp_custom_redirect( $redirect_to, $request, $user ) {
global $user;
if ( isset( $user->roles ) && is_array( $user->roles ) ) {
if ( in_array( 'administrator', $user->roles ) ) {
// redirect them to the default place
return $redirect_to;
} else {
return get_permalink();
}
} else {
return $redirect_to;
}
}