bp_activity_admin_edit ()
显示单个活动编辑屏幕。
描述
源
文件:bp-activity / bp-activity-admin.php
function bp_activity_admin_edit() {// @todo: Check if user is allowed to edit activity items // if (!Current_user_can ('bp_edit_activity')) if (!Is_super_admin ()) die('-1');//从数据库获取活动。$activity = bp_activity_get(array('in' => !empty($_REQUEST['aid']) ?(int) $ _REQUEST[‘援助’]:0,“马克斯”= > 1,show_hidden = > true, '垃圾' = > '所有',' display_comments ' = > 0));如果(!$activity = $activity['activities'][0];//使用WP的touch_time()而不复制该函数的解决方案。 $GLOBALS['comment'] = new stdClass; $GLOBALS['comment']->comment_date = $activity->date_recorded; } else { $activity = ''; } // Construct URL for form. $form_url = remove_query_arg( array( 'action', 'deleted', 'error', 'spammed', 'unspammed', ), $_SERVER['REQUEST_URI'] ); $form_url = add_query_arg( 'action', 'save', $form_url ); /** * Fires before activity edit form is displays so plugins can modify the activity. * * @since BuddyPress 1.6.0 * * @param array $value Array holding single activity object that was passed by reference. */ do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) ); ?>%3$s', __( 'No activity found with this ID.', 'buddyboss' ), esc_url( bp_get_admin_url( 'admin.php?page=bp-activity' ) ), __( 'Go back and try again.', 'buddyboss' ) ); ?>
更新日志
版本 | 描述 |
---|---|
BuddyPress 1.6.0 | 介绍了。 |