do_shortcode
-
I can make the do_shortcode works in template, codes are copied from
clean_login_load_before_headers();. My post do not content any shortcode. Is there any better way, more simpler than this?$url = clean_login_url_cleaner( wp_get_referer() ); // LOGIN if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'login' ) { $url = get_option( 'cl_login_url', ''); $user = wp_signon(); if ( is_wp_error( $user ) ) $url = esc_url( add_query_arg( 'authentication', 'failed', $url ) ); else { // if the user is disabled if( empty($user->roles) ) { wp_logout(); $url = esc_url( add_query_arg( 'authentication', 'disabled', $url ) ); } else $url = get_option('cl_login_redirect', false) ? esc_url(get_option('cl_login_redirect_url')): esc_url( add_query_arg( 'authentication', 'success', $url ) ); } wp_safe_redirect( $url ); } get_header(); if( !is_user_logged_in() ){ echo do_shortcode('[clean-login]'); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘do_shortcode’ is closed to new replies.