居中窗口的更新
在下面添加这 2 个计算provider = $(this).attr("data-provider");
:
datop = (($(document).height()-400)/2);
daleft = (($(document).width()-225)/2);
将这 2 个参数添加到属性中:
top="+datop+",left="+daleft+""
像这样:
"location=1,status=0,scrollbars=0,width=225,height=400,top="+datop+",left="+daleft+""
结尾
编辑
您可以在此处找到该文件:wp-content/plugins/wordpress-social-login/assets/js/connect.js
结束编辑
该文件是“wordpress-social-login\assets\js\connect.js”我不知道该文件将安装在哪里,但可能您可以在包含登录名的每个页面中找到其中的函数(如果您可以找到它,您可以卸载、编辑文件并重新安装修改过的文件)。这应该是您正在搜索的功能:
(function($){
$(function(){
$(".wsl_connect_with_provider").click(function(){//selector.event
popupurl = $("#wsl_popup_base_url").val();//assign text of the element with id #wls_popup_base..
provider = $(this).attr("data-provider");//assign the attribute data-provider of the element with class .wls_connect..
window.open(
popupurl+"provider="+provider,//url
"hybridauth_social_sing_on", //window name
"location=1,status=0,scrollbars=0,width=1000,height=600"//attributes of the window
);
});
});
})(jQuery);
这应该是弹出窗口的代码
window.open(
popupurl+"provider="+provider,
"hybridauth_social_sing_on",
"location=1,status=0,scrollbars=0,width=1000,height=600"
);
要更改宽度和高度,请编辑这 2 个参数:..width=1000,height=600"
请注意,我添加注释是为了让您了解该功能的作用以及您在做什么