Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php buddypress中发送好友请求钩子后如何获取通知\u id_Php_Wordpress_Buddypress - Fatal编程技术网

Php buddypress中发送好友请求钩子后如何获取通知\u id

Php buddypress中发送好友请求钩子后如何获取通知\u id,php,wordpress,buddypress,Php,Wordpress,Buddypress,我正在使用buddypress 2.4.0 我想在这次行动后打电话给GCM 发送好友请求 接受好友请求 但我没有得到任何合适的钩子。我正在使用的挂钩没有参数通知id。请帮助我解决此问题。使用此挂钩: do_action_ref_array( 'bp_notification_after_save', array( &$this ) ); 位于: buddypress\bp-notifications\classes\class-bp-notifications-notification

我正在使用buddypress 2.4.0 我想在这次行动后打电话给GCM

  • 发送好友请求
  • 接受好友请求
  • 但我没有得到任何合适的钩子。我正在使用的挂钩没有参数通知id。请帮助我解决此问题。

    使用此挂钩:

    do_action_ref_array( 'bp_notification_after_save', array( &$this ) );
    
    位于:

    buddypress\bp-notifications\classes\class-bp-notifications-notification.php
    
    检查传递的数组中的
    组件名称
    ,如果它类似于
    朋友
    -继续执行任务。

    使用此钩子:

    do_action_ref_array( 'bp_notification_after_save', array( &$this ) );
    
    位于:

    buddypress\bp-notifications\classes\class-bp-notifications-notification.php
    

    检查传递的数组中的
    组件\u名称
    ,如果它类似于
    朋友
    -继续执行您的任务。

    Hye谢谢,工作得很好,谢谢您帮助我。@SumitDey-欢迎您。请接受答案。谢谢,工作得很有魅力,谢谢你帮助我。@SumitDey-不客气。请接受答案。