Skip to content

Commit

Permalink
✨ 优化快捷登录跳转页面
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Nov 13, 2022
1 parent aaec3c2 commit 80373a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/ajax/page-front-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function pk_front_forget_password_reset_exec()
function pk_front_login_page_callback()
{
$redirect = $_GET['redirect'] ?? get_edit_profile_url();
$forget_password_url = pk_ajax_url('pk_font_login_page', ['redirect' => $_SERVER['REQUEST_URI']]);
$forget_password_url = pk_ajax_url('pk_font_login_page', ['redirect' => $redirect]);
$open_register = get_option('users_can_register') == 1;
?>

Expand Down
3 changes: 2 additions & 1 deletion inc/fun/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ function get_all_category_id_row($type = null)
//获取菜单数据
function pk_get_main_menu($mobile = false)
{
global $wp;
$menus = get_nav_menu_object('primary');
$out = $mobile ? "<ul class='puock-links t-md'>" : "<ul>";
if ($menus && count($menus) > 0) {
Expand All @@ -612,7 +613,7 @@ function pk_get_main_menu($mobile = false)
$out .= '<li><a data-no-instant data-toggle="tooltip" title="用户中心" href="' . get_edit_profile_url() . '"><img alt="用户中心" src="' . $avatar . '" class="min-avatar"></a></li>';
} else {
if (pk_is_checked('show_login_url')) {
$url = pk_ajax_url('pk_font_login_page', ['redirect' => $_SERVER['REQUEST_URI']]);
$url = pk_ajax_url('pk_font_login_page', ['redirect' => home_url( $wp->request )]);
$out .= '<li><a data-no-instant data-toggle="tooltip" title="登入" data-title="登入" href="javascript:void(0)" class="pk-modal-toggle" data-id="front-login" data-url="' . $url . '"><i class="fa fa-right-to-bracket"></i></a></li>';
}
}
Expand Down

0 comments on commit 80373a5

Please sign in to comment.