bp_media_update_activity_media_meta (美元的内容,user_id美元,activity_id美元)
更新活动媒体
描述
参数
- 美元的内容
-
(必需)
- user_id美元
-
(必需)
- activity_id美元
-
(必需)
返回
(保龄球)
源
文件:bp-media / bp-media-filters.php
函数bp_media_update_activity_media_meta($content, $user_id, $activity_id) {if (!isset($_POST['media']) || empty($_POST['media'])) {return false;} $_POST['medias'] = $_POST['medias']; / /将medias改为medias$ _POST [' bp_activity_update '] = true;$ _POST [' bp_activity_id '] = $ activity_id;//更新附加的活动注释与父文档隐私。如果(!$parent_activity = new BP_Activity_Activity($ activity_activity ($ activity_activity), $parent_activity ($parent_activity), $parent_activity ($parent_activity), $parent_activity ($parent_activity), $parent_activity ($parent_activity), $parent_activity ($parent_activity), $parent_activity ($parent_activity));if ($parent_activity->component === 'groups') {$_POST['privacy'] = 'grouponly';} elseif (! empty( $parent_activity->privacy ) ) { $_POST['privacy'] = $parent_activity->privacy; } } remove_action( 'bp_activity_posted_update', 'bp_media_update_activity_media_meta', 10, 3 ); remove_action( 'bp_groups_posted_update', 'bp_media_groups_activity_update_media_meta', 10, 4 ); remove_action( 'bp_activity_comment_posted', 'bp_media_activity_comments_update_media_meta', 10, 3 ); remove_action( 'bp_activity_comment_posted_notification_skipped', 'bp_media_activity_comments_update_media_meta', 10, 3 ); $media_ids = bp_media_add_handler(); add_action( 'bp_activity_posted_update', 'bp_media_update_activity_media_meta', 10, 3 ); add_action( 'bp_groups_posted_update', 'bp_media_groups_activity_update_media_meta', 10, 4 ); add_action( 'bp_activity_comment_posted', 'bp_media_activity_comments_update_media_meta', 10, 3 ); add_action( 'bp_activity_comment_posted_notification_skipped', 'bp_media_activity_comments_update_media_meta', 10, 3 ); // save media meta for activity. if ( ! empty( $activity_id ) ) { bp_activity_update_meta( $activity_id, 'bp_media_ids', implode( ',', $media_ids ) ); } }
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍了。 |