0
我在function.php中使用了一些X鉤子。我需要知道哪個頁面觸發了這個動作,需要獲取引薦網址並通過成功消息重定向到該頁面。在wp-admin-ajax.php中獲取引薦來源網址
function bp_plugin_hook_activity_posted_update($content, $user_id, $activity_id, $event_id) {
$userEmails = '[email protected]';
if(!empty($userEmails))
wp_mail($userEmails, 'shared an event!', "content" , 'Content-Type: text/html');
}
add_action('bp_activity_posted_update', 'bp_plugin_hook_activity_posted_update', 10, 3);
請參考下AJAX resuest,
action:post_update
cookie:bp-members-scope%3Dall%26bp-activity-oldestpage%3D1
_wpnonce_post_update:df8c1689d4
content:http://localhost/sitename/event/atx-startup-crawl-at-austin-startup-week-2017/
event_id:1132
visibility:followers
object:
_bp_as_nonce:
你能解釋一下簡要位 – GNANA
@GNANA我沒有看到你的代碼。抽象地 –
引用我的更新問題 – GNANA