我在function.php 中使用了一些X 钩子。我需要知道哪个页面触发了此操作,需要获取引荐来源网址并使用成功消息重定向到该页面。
function bp_plugin_hook_activity_posted_update( $content, $user_id, $activity_id, $event_id ) {
$userEmails = 'xxx@gmail.com';
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 回复,
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: