3
好傢伙,我需要執行一些功能成功即所有用戶憑據存儲例如用戶登錄的cookie和session等如何在WordPress的成功登錄後執行插件
所以後(寫爲WordPress插件)我的代碼,
function do_this_shit() {
//some code here
}
add_action(???, 'do_this_shit');
好傢伙,我需要執行一些功能成功即所有用戶憑據存儲例如用戶登錄的cookie和session等如何在WordPress的成功登錄後執行插件
所以後(寫爲WordPress插件)我的代碼,
function do_this_shit() {
//some code here
}
add_action(???, 'do_this_shit');
你要使用wp_login鉤:
add_action('wp_login', 'do_this_shit');
在找不到關於它的文檔很多,但這裏是它:http://codex.wordpress.org/Plugin_API/Action_Reference/wp_login
WordPress的說功能已被棄用http://codex.wordpress.org/Function_Reference/wp_login – Wh0RU
啊,對不起,我沒有看到 – Demelziraptor
雖然,這是折舊的功能,而不是行動掛鉤?它仍然在這個應該是最新的列表:http://codex.wordpress.org/Plugin_API/Action_Reference – Demelziraptor